From ab582f10545535d17011cf29f391886e57b9fc9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:58:53 -0400 Subject: [PATCH 1/5] Bump to xamarin/Java.Interop/main@3436a30 (#8799) Changes: https://github.com/xamarin/java.interop/compare/a7e09b7be4dc9dbc1c1a65b5f2c1e8fcf028b209...3436a306bd23eb4755f769ad88d955323138321f * xamarin/java.interop@3436a306: [ci] Build dotnet release branches and PRs against dotnet release branches. (xamarin/java.interop#1204) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- external/Java.Interop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/Java.Interop b/external/Java.Interop index a7e09b7be4d..3436a306bd2 160000 --- a/external/Java.Interop +++ b/external/Java.Interop @@ -1 +1 @@ -Subproject commit a7e09b7be4dc9dbc1c1a65b5f2c1e8fcf028b209 +Subproject commit 3436a306bd23eb4755f769ad88d955323138321f From 4d1fca774756cb24ef2db5402a549ed3ebc2216c Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:56:34 -0500 Subject: [PATCH 2/5] Bump to dotnet/installer/main@e911f5c82c 9.0.100-preview.3.24161.2 (#8802) Changes: https://github.com/dotnet/installer/compare/893b762b6e...e911f5c82c Changes: https://github.com/dotnet/runtime/compare/5e603d595e...3eb8c7f108 Changes: https://github.com/dotnet/emsdk/compare/0f3e462442...a5f4de78fc Changes: https://github.com/dotnet/cecil/compare/0d0bc8e0f4...ba53c75483 Updates: * Microsoft.Dotnet.Sdk.Internal: from 9.0.100-preview.3.24153.2 to 9.0.100-preview.3.24161.2 * Microsoft.NETCore.App.Ref: from 9.0.0-preview.3.24129.2 to 9.0.0-preview.3.24160.3 * Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport: from 9.0.0-preview.3.24126.1 to 9.0.0-preview.3.24156.3 * Microsoft.NET.ILLink.Tasks: from 9.0.0-preview.3.24129.2 to 9.0.0-preview.3.24160.3 * Microsoft.DotNet.Cecil: from 0.11.4-alpha.24120.1 to 0.11.4-alpha.24158.1 --- eng/Version.Details.xml | 20 ++++++++++---------- eng/Versions.props | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ca7fbcde99d..e7cec78de4d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,24 +1,24 @@ - + https://github.com/dotnet/installer - 893b762b6e36d558df7ae6fccdfd8034f83a1c2e + e911f5c82cc02aea96e227596e16c830d54cf03a - + https://github.com/dotnet/runtime - 5e603d595e63ddc5cdce9777a40608279abdcc37 + 3eb8c7f1086b79b28a27b57a935f97be3b7fcccb - + https://github.com/dotnet/runtime - 5e603d595e63ddc5cdce9777a40608279abdcc37 + 3eb8c7f1086b79b28a27b57a935f97be3b7fcccb - + https://github.com/dotnet/emsdk - 0f3e462442af5fe65271e3185d5b645ad40a6041 + a5f4de78fca42544771977f8e8e04c4aa83e1d02 - + https://github.com/dotnet/cecil - 0d0bc8e0f47fdae9834e1eac678f364c50946133 + ba53c75483aa4980a332fa48e61076f80adfec40 diff --git a/eng/Versions.props b/eng/Versions.props index 346f1e1fc29..f16fd164c98 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,15 +1,15 @@ - 9.0.100-preview.3.24153.2 - 9.0.0-preview.3.24129.2 - 9.0.0-preview.3.24129.2 + 9.0.100-preview.3.24161.2 + 9.0.0-preview.3.24160.3 + 9.0.0-preview.3.24160.3 7.0.0-beta.22103.1 7.0.0-beta.22103.1 - 9.0.0-preview.3.24126.1 + 9.0.0-preview.3.24156.3 $(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion) 7.0.100-rc.1.22410.7 - 0.11.4-alpha.24120.1 + 0.11.4-alpha.24158.1 $(MicrosoftNETCoreAppRefPackageVersion) From 3ed7de3d27a71198ca5ce332428b3568a0c050ce Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Tue, 12 Mar 2024 19:58:08 -0400 Subject: [PATCH 3/5] Bump to xamarin/monodroid/main@77124dc1 (#8804) Changes: https://github.com/xamarin/monodroid/compare/e13723e701307f9f6966d4b309c3eba10a741694...77124dc16985a92077e62b0cfeaeb007c4d4fd2a * xamarin/monodroid@77124dc16: Bump to xamarin/xamarin-android/main@4d1fca7 (xamarin/monodroid#1447) * xamarin/monodroid@9caae8213: Bump to xamarin/androidtools/main@7818dc5 (xamarin/monodroid#1446) * xamarin/monodroid@84a7fcd54: Bump to xamarin/android-sdk-installer/main@438cf89 (xamarin/monodroid#1448) * xamarin/monodroid@cdb452cf0: [tools/fastdev] Use chmod to set files as readonly (xamarin/monodroid#1425) * xamarin/monodroid@b99fa9086: Bump to xamarin/xamarin-android@5cd9a267e2 (xamarin/monodroid#1444) --- .external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.external b/.external index 8f7749a446e..97fd41cb9e1 100644 --- a/.external +++ b/.external @@ -1 +1 @@ -xamarin/monodroid:main@e13723e701307f9f6966d4b309c3eba10a741694 +xamarin/monodroid:main@77124dc16985a92077e62b0cfeaeb007c4d4fd2a From dd6e7071b23e9de754ef6e726140f79198fdcfd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:17:57 -0400 Subject: [PATCH 4/5] Bump external/Java.Interop from `3436a30` to `5bca8ad` (#8803) Change: https://github.com/xamarin/java.interop/compare/3436a306bd23eb4755f769ad88d955323138321f...5bca8ad6e5cf28d1c1a0bac37d2e0aa311795aa8 * xamarin/java.interop@5bca8ad6: [build] Automatically add NullableAttributes.cs for netstandard2.0 (xamarin/java.interop#1188) * xamarin/java.interop@45437e22: [Java.Interop] suppress IL3050 with `#pragma` (xamarin/java.interop#1201) * xamarin/java.interop@1c9c8c9c: [Java.Interop.Tools.Maven] Initial commit. (xamarin/java.interop#1179) With xamarin/java.interop@5bca8ad6, all instances of nullable attributes types defined in `NullableAttributes.cs` are now `internal`. However, `Xamarin.Android.Build.Tasks` was consuming the `public` types from its reference to `Java.Interop.Tools.JavaCallableWrappers`, so this change resulted in a build break: MavenExtensions.cs(26,32): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level MamJsonParser.cs(92,43): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level MamJsonParser.cs(92,81): error CS0122: 'NotNullWhenAttribute' is inaccessible due to its protection level We can apply almost the same logic from xamarin/java.interop@5bca8ad6 to `xamarin-android`; the difference is that neither of the `netstandard2.0` projects in xamarin-android that need the attributes have `$(Nullable)='enabled'` and thus our `Condition` fails. (`Xamarin.Android.Build.Tasks.csproj` and `Xamarin.Android.Tools.JavadocImporter.csproj` include `.cs` files from `external/Java.Interop` that have been NRT annotated and thus need the nullable attribute types.) We add `$(Nullable)='annotations'` to the `@(Compile)` which allows one to use NRT syntax but does not emit any NRT warnings since these assemblies have not been converted. We then modify the `NullableAttributes.cs` inclusion logic to additionally key off the `$(Nullable)=annotations` value. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonathan Pobst --- Directory.Build.targets | 9 +++++++++ external/Java.Interop | 2 +- .../Xamarin.Android.Build.Tasks.csproj | 1 + .../Xamarin.Android.Tools.JavadocImporter.csproj | 4 +--- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 8e03cb5cdf5..c9365209289 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -7,4 +7,13 @@ + + + + + + + $(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES + + diff --git a/external/Java.Interop b/external/Java.Interop index 3436a306bd2..5bca8ad6e5c 160000 --- a/external/Java.Interop +++ b/external/Java.Interop @@ -1 +1 @@ -Subproject commit 3436a306bd23eb4755f769ad88d955323138321f +Subproject commit 5bca8ad6e5cf28d1c1a0bac37d2e0aa311795aa8 diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj index d2304de5a5d..3bef384882d 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj @@ -19,6 +19,7 @@ 8632 false ..\..\product.snk + annotations $(NoWarn);CA1310;CA1305 diff --git a/src/Xamarin.Android.Tools.JavadocImporter/Xamarin.Android.Tools.JavadocImporter.csproj b/src/Xamarin.Android.Tools.JavadocImporter/Xamarin.Android.Tools.JavadocImporter.csproj index 8529f06fb6b..1cf29a3ea74 100644 --- a/src/Xamarin.Android.Tools.JavadocImporter/Xamarin.Android.Tools.JavadocImporter.csproj +++ b/src/Xamarin.Android.Tools.JavadocImporter/Xamarin.Android.Tools.JavadocImporter.csproj @@ -6,6 +6,7 @@ false true $(NoWarn);CA1305 + annotations @@ -27,9 +28,6 @@ Crc64.Table.cs - - NullableAttributes.cs - From c20d51fcf8e910b8fb46c5351c26e55ed1fab90c Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Tue, 12 Mar 2024 14:19:03 -1000 Subject: [PATCH 5/5] [Mono.Android] Fix missing enum issues that cause BG8800 warnings. (#8707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/xamarin/xamarin-android/issues/8703 xamarin/xamarin-android#8730 reported that we did not bind [`HardwareBuffer.create(int width, int height, int format, int layers, long usage)`][0]. Indeed, in the build logs for `src/Mono.Android`, there is a BG8800 warning about it! obj/Debug/net9.0/android-34/mcw/api-34.xml(32327,10): warning BG8800: Unknown parameter type 'Android.Hardware.HardwareBufferUsage' for member 'Android.Hardware.HardwareBuffer.Create (int, int, Android.Hardware.HardwareBufferFormat, int, Android.Hardware.HardwareBufferUsage)' The BG8800 was generated because we attempted to map `long usage` to an `enum`, but no enum was created as the values are of type `long`, not `int`. Manually create a `long`-based `HardwareBufferUsage` enum: [Flags] /* partial */ enum HardwareBufferUsage : long { None = 0, UsageComposerOverlay = 0x800, // … } However, `generator` does not support `long` enums, and generates marshalling code using an `int`. Thus, we need to manually bind `HardwareBuffer.create()` and [`HardwareBuffer.getUsage()`][1] so we can replace the `int` machinery with `long`. While we're at it, audit all of the `BG8800` warnings that are caused by improper enumification and fix them: warning BG8800: Unknown parameter type 'Android.Hardware.HardwareBufferUsage' for member 'Android.Hardware.HardwareBuffer.Create (int, int, Android.Hardware.HardwareBufferFormat, int, Android.Hardware.Hardw... warning BG8800: Unknown parameter type 'Android.Hardware.HardwareBufferUsage' for member 'Android.Hardware.HardwareBuffer.IsSupported (int, int, Android.Hardware.HardwareBufferFormat, int, Android.Hardware.... warning BG8800: Unknown parameter type 'Android.App.Bind' for member 'Android.Content.Context'. warning BG8800: Unknown parameter type 'Android.App.Bind' for member 'Android.Content.Context.BindIsolatedService (Android.Content.Intent, Android.App.Bind, java.lang.String, java.util.concurrent.Executor, ... warning BG8800: Unknown parameter type 'Android.Graphics.ImageDecoderAllocatorType' for member 'Android.Graphics.ImageDecoder.SetAllocator (Android.Graphics.ImageDecoderAllocatorType)'. warning BG8800: Unknown parameter type 'Android.Net.WpsFailureReason' for member 'Android.Net.Wifi.WifiManager.WpsCallback.OnFailed (Android.Net.WpsFailureReason)'. warning BG8800: Unknown parameter type 'Android.OS.DeviceTemperatureSource' for member 'Android.OS.HardwarePropertiesManager.GetDeviceTemperatures (Android.OS.DeviceTemperatureType, Android.OS.DeviceTempera... warning BG8800: Unknown parameter type 'Android.Telephony.Mbms.DownloadStatus' for member 'Android.Telephony.Mbms.DownloadStatusListener.OnStatusUpdated (Android.Telephony.Mbms.DownloadRequest, Android.Tel... warning BG8800: Unknown parameter type 'Android.Telephony.StreamingMethod' for member 'Android.Telephony.Mbms.StreamingServiceCallback.OnStreamMethodUpdated (Android.Telephony.StreamingMethod)'. warning BG8800: Unknown parameter type 'Android.Telephony.StreamingState' for member 'Android.Telephony.Mbms.StreamingServiceCallback.OnStreamStateUpdated (Android.Telephony.StreamingState, Android.Telepho... warning BG8800: Unknown parameter type 'Android.Icu.Text.CollatorReorderCodes' for member 'Android.Icu.Text.Collator.GetEquivalentReorderCodes (Android.Icu.Text.CollatorReorderCodes)'. warning BG8800: Unknown parameter type 'params Android.Icu.Text.CollatorReorderCodes[]' for member 'Android.Icu.Text.Collator.SetReorderCodes (params Android.Icu.Text.CollatorReorderCodes[])'. This results in new API being surfaced that was previously not being bound, requiring updates to `src/Mono.Android/PublicAPI/API-34/PublicAPI.Unshipped.txt`. One of these new APIs is [`WpsCallback.OnFailed(WpsFailureReason)`][2], which is a *new* `abstract` method on an existing non-`abstract` type. Although this is a breaking change, this type previously could not have been inherited from as the Java-side `abstract` method would not have been implemented; consider this C# code: // This C# code compiles, no warnings or errors: class MyCallback : Android.Net.Wifi.WifiManager.WpsCallback { public override void OnStarted(string? pin) {} public override void OnSucceeded() {} } However, the `.csproj` containing `MyCallback` will fail to build: obj/Debug/net8.0-android/android/src/crc64475861335642e0f6/MyCallback.java(4,8): javac error JAVAC0000: error: MyCallback is not abstract and does not override abstract method onFailed(int) in WpsCallback Thus, add it as an "acceptable breakage". [0]: https://developer.android.com/reference/android/hardware/HardwareBuffer?hl=en#create(int,%20int,%20int,%20int,%20long) [1]: https://developer.android.com/reference/android/hardware/HardwareBuffer?hl=en#getUsage() [2]: https://developer.android.com/reference/android/net/wifi/WifiManager.WpsCallback?hl=en#onFailed(int) --- .../Android.Hardware/HardwareBuffer.cs | 44 +++++++++++++ .../Android.Hardware/HardwareBufferUsage.cs | 64 +++++++++++++++++++ .../StreamingService.cs | 24 +++++++ .../Android.Telephony/MbmsDownloadSession.cs | 41 ++++++++++++ src/Mono.Android/Mono.Android.csproj | 4 ++ .../PublicAPI/API-34/PublicAPI.Unshipped.txt | 43 ++++++++++++- src/Mono.Android/map.csv | 16 ++--- src/Mono.Android/metadata | 6 +- src/Mono.Android/methodmap.csv | 18 ++---- ...acceptable-breakages-vReference-net9.0.txt | 1 + 10 files changed, 239 insertions(+), 22 deletions(-) create mode 100644 src/Mono.Android/Android.Hardware/HardwareBuffer.cs create mode 100644 src/Mono.Android/Android.Hardware/HardwareBufferUsage.cs create mode 100644 src/Mono.Android/Android.Telephony.Mbms/StreamingService.cs create mode 100644 src/Mono.Android/Android.Telephony/MbmsDownloadSession.cs diff --git a/src/Mono.Android/Android.Hardware/HardwareBuffer.cs b/src/Mono.Android/Android.Hardware/HardwareBuffer.cs new file mode 100644 index 00000000000..ec3f2351cd2 --- /dev/null +++ b/src/Mono.Android/Android.Hardware/HardwareBuffer.cs @@ -0,0 +1,44 @@ +using Android.Runtime; +using Java.Interop; + +namespace Android.Hardware; + +public partial class HardwareBuffer +{ + // These are manually bound because we do not have a way to bind the `long` enum values. + // generator treats them as int, like: + // __args [4] = new JniArgumentValue ((int) usage); + + // Metadata.xml XPath method reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/method[@name='create' and count(parameter)=5 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int'] and parameter[5][@type='long']]" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + [Register ("create", "(IIIIJ)Landroid/hardware/HardwareBuffer;", "", ApiSince = 26)] + public static unsafe Android.Hardware.HardwareBuffer Create (int width, int height, [global::Android.Runtime.GeneratedEnum] Android.Hardware.HardwareBufferFormat format, int layers, Android.Hardware.HardwareBufferUsage usage) + { + const string __id = "create.(IIIIJ)Landroid/hardware/HardwareBuffer;"; + try { + JniArgumentValue* __args = stackalloc JniArgumentValue [5]; + __args [0] = new JniArgumentValue (width); + __args [1] = new JniArgumentValue (height); + __args [2] = new JniArgumentValue ((int) format); + __args [3] = new JniArgumentValue (layers); + __args [4] = new JniArgumentValue ((long) usage); + var __rm = _members.StaticMethods.InvokeObjectMethod (__id, __args); + return global::Java.Lang.Object.GetObject (__rm.Handle, JniHandleOwnership.TransferLocalRef)!; + } finally { + } + } + + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + public unsafe Android.Hardware.HardwareBufferUsage Usage { + // Metadata.xml XPath method reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/method[@name='getUsage' and count(parameter)=0]" + [Register ("getUsage", "()J", "", ApiSince = 26)] + get { + const string __id = "getUsage.()J"; + try { + var __rm = _members.InstanceMethods.InvokeAbstractInt64Method (__id, this, null); + return (Android.Hardware.HardwareBufferUsage) __rm!; + } finally { + } + } + } +} diff --git a/src/Mono.Android/Android.Hardware/HardwareBufferUsage.cs b/src/Mono.Android/Android.Hardware/HardwareBufferUsage.cs new file mode 100644 index 00000000000..49c24e4b78d --- /dev/null +++ b/src/Mono.Android/Android.Hardware/HardwareBufferUsage.cs @@ -0,0 +1,64 @@ +namespace Android.Hardware; + +[System.Flags] +[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] +public enum HardwareBufferUsage : long +{ + None = 0, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_COMPOSER_OVERLAY']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android33.0")] + UsageComposerOverlay = 2048, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_CPU_READ_OFTEN']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageCpuReadOften = 3, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_CPU_READ_RARELY']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageCpuReadRarely = 2, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_CPU_WRITE_OFTEN']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageCpuWriteOften = 48, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_CPU_WRITE_RARELY']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageCpuWriteRarely = 32, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_FRONT_BUFFER']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android33.0")] + UsageFrontBuffer = 4294967296, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_COLOR_OUTPUT']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageGpuColorOutput = 512, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_CUBE_MAP']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + UsageGpuCubeMap = 33554432, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_DATA_BUFFER']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageGpuDataBuffer = 16777216, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_MIPMAP_COMPLETE']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + UsageGpuMipmapComplete = 67108864, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_SAMPLED_IMAGE']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageGpuSampledImage = 256, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_PROTECTED_CONTENT']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageProtectedContent = 16384, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_SENSOR_DIRECT_DATA']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageSensorDirectData = 8388608, + + // Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_VIDEO_ENCODE']" + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")] + UsageVideoEncode = 65536 +} diff --git a/src/Mono.Android/Android.Telephony.Mbms/StreamingService.cs b/src/Mono.Android/Android.Telephony.Mbms/StreamingService.cs new file mode 100644 index 00000000000..8b67f05551a --- /dev/null +++ b/src/Mono.Android/Android.Telephony.Mbms/StreamingService.cs @@ -0,0 +1,24 @@ +using Android.Runtime; + +namespace Android.Telephony.Mbms; + +public partial class StreamingService +{ + // Metadata.xml XPath field reference: path="/api/package[@name='android.telephony.mbms']/class[@name='StreamingService']/field[@name='STATE_STALLED']" + [Register ("STATE_STALLED", ApiSince = 28)] + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + [global::System.Obsolete (@"This constant will be removed in a future version. Use Android.Telephony.StreamingState enum directly instead of this field.", error: true)] + public const int StateStalled = 3; + + // Metadata.xml XPath field reference: path="/api/package[@name='android.telephony.mbms']/class[@name='StreamingService']/field[@name='STATE_STARTED']" + [Register ("STATE_STARTED", ApiSince = 28)] + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + [global::System.Obsolete (@"This constant will be removed in a future version. Use Android.Telephony.StreamingState enum directly instead of this field.", error: true)] + public const int StateStarted = 2; + + // Metadata.xml XPath field reference: path="/api/package[@name='android.telephony.mbms']/class[@name='StreamingService']/field[@name='STATE_STOPPED']" + [Register ("STATE_STOPPED", ApiSince = 28)] + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + [global::System.Obsolete (@"This constant will be removed in a future version. Use Android.Telephony.StreamingState enum directly instead of this field.", error: true)] + public const int StateStopped = 1; +} diff --git a/src/Mono.Android/Android.Telephony/MbmsDownloadSession.cs b/src/Mono.Android/Android.Telephony/MbmsDownloadSession.cs new file mode 100644 index 00000000000..7962278b6a8 --- /dev/null +++ b/src/Mono.Android/Android.Telephony/MbmsDownloadSession.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Android.Runtime; + +namespace Android.Telephony; + +public partial class MbmsDownloadSession +{ + // Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_ACTIVELY_DOWNLOADING']" + [Register ("STATUS_ACTIVELY_DOWNLOADING", ApiSince = 28)] + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + [global::System.Obsolete (@"This constant will be removed in the future version. Use Android.Telephony.Mbms.DownloadStatus enum directly instead of this field.", error: true)] + public const int StatusActivelyDownloading = 1; + + // Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_PENDING_DOWNLOAD']" + [Register ("STATUS_PENDING_DOWNLOAD", ApiSince = 28)] + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + [global::System.Obsolete (@"This constant will be removed in the future version. Use Android.Telephony.Mbms.DownloadStatus enum directly instead of this field.", error: true)] + public const int StatusPendingDownload = 2; + + // Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_PENDING_DOWNLOAD_WINDOW']" + [Register ("STATUS_PENDING_DOWNLOAD_WINDOW", ApiSince = 28)] + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + [global::System.Obsolete (@"This constant will be removed in the future version. Use Android.Telephony.Mbms.DownloadStatus enum directly instead of this field.", error: true)] + public const int StatusPendingDownloadWindow = 4; + + // Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_PENDING_REPAIR']" + [Register ("STATUS_PENDING_REPAIR", ApiSince = 28)] + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + [global::System.Obsolete (@"This constant will be removed in the future version. Use Android.Telephony.Mbms.DownloadStatus enum directly instead of this field.", error: true)] + public const int StatusPendingRepair = 3; + + // Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_UNKNOWN']" + [Register ("STATUS_UNKNOWN", ApiSince = 28)] + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] + [global::System.Obsolete (@"This constant will be removed in the future version. Use Android.Telephony.Mbms.DownloadStatus enum directly instead of this field.", error: true)] + public const int StatusUnknown = 0; +} diff --git a/src/Mono.Android/Mono.Android.csproj b/src/Mono.Android/Mono.Android.csproj index 006ebd5eb41..1c833d2cd75 100644 --- a/src/Mono.Android/Mono.Android.csproj +++ b/src/Mono.Android/Mono.Android.csproj @@ -80,12 +80,16 @@ + + + + diff --git a/src/Mono.Android/PublicAPI/API-34/PublicAPI.Unshipped.txt b/src/Mono.Android/PublicAPI/API-34/PublicAPI.Unshipped.txt index 91b0e1a43b9..9233397fc10 100644 --- a/src/Mono.Android/PublicAPI/API-34/PublicAPI.Unshipped.txt +++ b/src/Mono.Android/PublicAPI/API-34/PublicAPI.Unshipped.txt @@ -1 +1,42 @@ -#nullable enable \ No newline at end of file +#nullable enable +abstract Android.Net.Wifi.WifiManager.WpsCallback.OnFailed(Android.Net.Wifi.WpsFailureReason reason) -> void +Android.Graphics.ImageDecoder.Allocator.get -> Android.Graphics.ImageDecoderAllocator +Android.Graphics.ImageDecoder.Allocator.set -> void +Android.Hardware.HardwareBuffer.Usage.get -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.None = 0 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageComposerOverlay = 2048 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageCpuReadOften = 3 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageCpuReadRarely = 2 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageCpuWriteOften = 48 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageCpuWriteRarely = 32 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageFrontBuffer = 4294967296 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageGpuColorOutput = 512 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageGpuCubeMap = 33554432 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageGpuDataBuffer = 16777216 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageGpuMipmapComplete = 67108864 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageGpuSampledImage = 256 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageProtectedContent = 16384 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageSensorDirectData = 8388608 -> Android.Hardware.HardwareBufferUsage +Android.Hardware.HardwareBufferUsage.UsageVideoEncode = 65536 -> Android.Hardware.HardwareBufferUsage +Android.Telephony.Mbms.DownloadStatus +Android.Telephony.Mbms.DownloadStatus.ActivelyDownloading = 1 -> Android.Telephony.Mbms.DownloadStatus +Android.Telephony.Mbms.DownloadStatus.PendingDownload = 2 -> Android.Telephony.Mbms.DownloadStatus +Android.Telephony.Mbms.DownloadStatus.PendingDownloadWindow = 4 -> Android.Telephony.Mbms.DownloadStatus +Android.Telephony.Mbms.DownloadStatus.PendingRepair = 3 -> Android.Telephony.Mbms.DownloadStatus +Android.Telephony.Mbms.DownloadStatus.Unknown = 0 -> Android.Telephony.Mbms.DownloadStatus +Android.Telephony.StreamingState +Android.Telephony.StreamingState.Stalled = 3 -> Android.Telephony.StreamingState +Android.Telephony.StreamingState.Started = 2 -> Android.Telephony.StreamingState +Android.Telephony.StreamingState.Stopped = 1 -> Android.Telephony.StreamingState +static Android.Hardware.HardwareBuffer.Create(int width, int height, Android.Hardware.HardwareBufferFormat format, int layers, Android.Hardware.HardwareBufferUsage usage) -> Android.Hardware.HardwareBuffer! +static Android.Hardware.HardwareBuffer.IsSupported(int width, int height, Android.Hardware.HardwareBufferFormat format, int layers, long usage) -> bool +static Android.Icu.Text.Collator.GetEquivalentReorderCodes(int reorderCode) -> int[]? +virtual Android.Content.Context.BindIsolatedService(Android.Content.Intent! service, Android.Content.Context.BindServiceFlags! flags, string! instanceName, Java.Util.Concurrent.IExecutor! executor, Android.Content.IServiceConnection! conn) -> bool +virtual Android.Content.Context.BindIsolatedService(Android.Content.Intent! service, int flags, string! instanceName, Java.Util.Concurrent.IExecutor! executor, Android.Content.IServiceConnection! conn) -> bool +virtual Android.Icu.Text.Collator.GetReorderCodes() -> int[]? +virtual Android.Icu.Text.Collator.SetReorderCodes(params int[]? order) -> void +virtual Android.OS.HardwarePropertiesManager.GetDeviceTemperatures(Android.OS.DeviceTemperatureType type, Android.OS.TemperatureSource source) -> float[]! +virtual Android.Telephony.Mbms.DownloadStatusListener.OnStatusUpdated(Android.Telephony.Mbms.DownloadRequest? request, Android.Telephony.Mbms.FileInfo? fileInfo, Android.Telephony.Mbms.DownloadStatus status) -> void +virtual Android.Telephony.Mbms.StreamingServiceCallback.OnStreamMethodUpdated(Android.Telephony.Mbms.StreamingMethod methodType) -> void +virtual Android.Telephony.Mbms.StreamingServiceCallback.OnStreamStateUpdated(Android.Telephony.StreamingState state, Android.Telephony.Mbms.StreamingStateChangedReason reason) -> void \ No newline at end of file diff --git a/src/Mono.Android/map.csv b/src/Mono.Android/map.csv index 3f264f7af74..b544c0ef35f 100644 --- a/src/Mono.Android/map.csv +++ b/src/Mono.Android/map.csv @@ -13581,9 +13581,9 @@ E,28,android/telephony/mbms/StreamingService.REASON_LEFT_MBMS_BROADCAST_AREA,6,A E,28,android/telephony/mbms/StreamingService.REASON_NONE,0,Android.Telephony.Mbms.StreamingStateChangedReason,None,remove, E,28,android/telephony/mbms/StreamingService.REASON_NOT_CONNECTED_TO_HOMECARRIER_LTE,5,Android.Telephony.Mbms.StreamingStateChangedReason,NotConnectedToHomecarrierLte,remove, E,28,android/telephony/mbms/StreamingService.REASON_OUT_OF_MEMORY,4,Android.Telephony.Mbms.StreamingStateChangedReason,OutOfMemory,remove, -I,28,android/telephony/mbms/StreamingService.STATE_STALLED,3,,,, -I,28,android/telephony/mbms/StreamingService.STATE_STARTED,2,,,, -I,28,android/telephony/mbms/StreamingService.STATE_STOPPED,1,,,, +E,28,android/telephony/mbms/StreamingService.STATE_STALLED,3,Android.Telephony.StreamingState,Stalled,keep, +E,28,android/telephony/mbms/StreamingService.STATE_STARTED,2,Android.Telephony.StreamingState,Started,keep, +E,28,android/telephony/mbms/StreamingService.STATE_STOPPED,1,Android.Telephony.StreamingState,Stopped,keep, E,28,android/telephony/mbms/StreamingService.UNICAST_METHOD,2,Android.Telephony.Mbms.StreamingMethod,Unicast,remove, I,28,android/telephony/mbms/StreamingServiceCallback.SIGNAL_STRENGTH_UNAVAILABLE,-1,,,, I,28,android/telephony/MbmsDownloadSession.RESULT_CANCELLED,2,,,, @@ -13594,11 +13594,11 @@ I,28,android/telephony/MbmsDownloadSession.RESULT_IO_ERROR,4,,,, I,28,android/telephony/MbmsDownloadSession.RESULT_OUT_OF_STORAGE,7,,,, I,28,android/telephony/MbmsDownloadSession.RESULT_SERVICE_ID_NOT_DEFINED,5,,,, I,28,android/telephony/MbmsDownloadSession.RESULT_SUCCESSFUL,1,,,, -I,28,android/telephony/MbmsDownloadSession.STATUS_ACTIVELY_DOWNLOADING,1,,,, -I,28,android/telephony/MbmsDownloadSession.STATUS_PENDING_DOWNLOAD,2,,,, -I,28,android/telephony/MbmsDownloadSession.STATUS_PENDING_DOWNLOAD_WINDOW,4,,,, -I,28,android/telephony/MbmsDownloadSession.STATUS_PENDING_REPAIR,3,,,, -I,28,android/telephony/MbmsDownloadSession.STATUS_UNKNOWN,0,,,, +E,28,android/telephony/MbmsDownloadSession.STATUS_ACTIVELY_DOWNLOADING,1,Android.Telephony.Mbms.DownloadStatus,ActivelyDownloading,keep, +E,28,android/telephony/MbmsDownloadSession.STATUS_PENDING_DOWNLOAD,2,Android.Telephony.Mbms.DownloadStatus,PendingDownload,keep, +E,28,android/telephony/MbmsDownloadSession.STATUS_PENDING_DOWNLOAD_WINDOW,4,Android.Telephony.Mbms.DownloadStatus,PendingDownloadWindow,keep, +E,28,android/telephony/MbmsDownloadSession.STATUS_PENDING_REPAIR,3,Android.Telephony.Mbms.DownloadStatus,PendingRepair,keep, +E,28,android/telephony/MbmsDownloadSession.STATUS_UNKNOWN,0,Android.Telephony.Mbms.DownloadStatus,Unknown,keep, I,0,android/telephony/NeighboringCellInfo.UNKNOWN_CID,-1,,,, I,0,android/telephony/NeighboringCellInfo.UNKNOWN_RSSI,99,,,, E,30,android/telephony/NetworkRegistrationInfo.DOMAIN_CS,1,Android.Telephony.NetworkRegistrationInfoDomain,Cs,remove, diff --git a/src/Mono.Android/metadata b/src/Mono.Android/metadata index 2bbf00bbd67..d47276795f3 100644 --- a/src/Mono.Android/metadata +++ b/src/Mono.Android/metadata @@ -1880,7 +1880,11 @@ This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead. This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead. This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead. - + + + + +