Skip to content

Commit 7971f77

Browse files
committed
Merge branch 'main' into dev/grendel/fix-proxy-throwable
* main: [Mono.Android] Fix missing enum issues that cause BG8800 warnings. (#8707) Bump external/Java.Interop from `3436a30` to `5bca8ad` (#8803) Bump to xamarin/monodroid@77124dc1 (#8804) Bump to dotnet/installer@e911f5c82c 9.0.100-preview.3.24161.2 (#8802) Bump to xamarin/Java.Interop/main@3436a30 (#8799)
2 parents 695304c + c20d51f commit 7971f77

File tree

17 files changed

+267
-42
lines changed

17 files changed

+267
-42
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
xamarin/monodroid:main@e13723e701307f9f6966d4b309c3eba10a741694
1+
xamarin/monodroid:main@77124dc16985a92077e62b0cfeaeb007c4d4fd2a

Directory.Build.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@
77
<PackageReference Update="Irony" Version="1.1.0" />
88
</ItemGroup>
99

10+
<!-- Automatically add NRT attribute support for netstandard2.0 projects using NRT -->
11+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' AND ('$(Nullable)' == 'enable' OR '$(Nullable)' == 'annotations') ">
12+
<Compile Include="$(MSBuildThisFileDirectory)external\Java.Interop\src\utils\NullableAttributes.cs" Visible="false" />
13+
</ItemGroup>
14+
15+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' AND ('$(Nullable)' == 'enable' OR '$(Nullable)' == 'annotations') ">
16+
<DefineConstants>$(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants>
17+
</PropertyGroup>
18+
1019
</Project>

eng/Version.Details.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<Dependencies>
22
<ProductDependencies>
3-
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="9.0.100-preview.3.24153.2">
3+
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="9.0.100-preview.3.24161.2">
44
<Uri>https://github.com/dotnet/installer</Uri>
5-
<Sha>893b762b6e36d558df7ae6fccdfd8034f83a1c2e</Sha>
5+
<Sha>e911f5c82cc02aea96e227596e16c830d54cf03a</Sha>
66
</Dependency>
7-
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="9.0.0-preview.3.24129.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
7+
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="9.0.0-preview.3.24160.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
88
<Uri>https://github.com/dotnet/runtime</Uri>
9-
<Sha>5e603d595e63ddc5cdce9777a40608279abdcc37</Sha>
9+
<Sha>3eb8c7f1086b79b28a27b57a935f97be3b7fcccb</Sha>
1010
</Dependency>
11-
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0-preview.3.24129.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
11+
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0-preview.3.24160.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
1212
<Uri>https://github.com/dotnet/runtime</Uri>
13-
<Sha>5e603d595e63ddc5cdce9777a40608279abdcc37</Sha>
13+
<Sha>3eb8c7f1086b79b28a27b57a935f97be3b7fcccb</Sha>
1414
</Dependency>
15-
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-preview.3.24126.1" CoherentParentDependency="Microsoft.NETCore.App.Ref">
15+
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-preview.3.24156.3" CoherentParentDependency="Microsoft.NETCore.App.Ref">
1616
<Uri>https://github.com/dotnet/emsdk</Uri>
17-
<Sha>0f3e462442af5fe65271e3185d5b645ad40a6041</Sha>
17+
<Sha>a5f4de78fca42544771977f8e8e04c4aa83e1d02</Sha>
1818
</Dependency>
19-
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.24120.1" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
19+
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.24158.1" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
2020
<Uri>https://github.com/dotnet/cecil</Uri>
21-
<Sha>0d0bc8e0f47fdae9834e1eac678f364c50946133</Sha>
21+
<Sha>ba53c75483aa4980a332fa48e61076f80adfec40</Sha>
2222
</Dependency>
2323
</ProductDependencies>
2424
<ToolsetDependencies>

eng/Versions.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project>
22
<!--Package versions-->
33
<PropertyGroup>
4-
<MicrosoftDotnetSdkInternalPackageVersion>9.0.100-preview.3.24153.2</MicrosoftDotnetSdkInternalPackageVersion>
5-
<MicrosoftNETILLinkTasksPackageVersion>9.0.0-preview.3.24129.2</MicrosoftNETILLinkTasksPackageVersion>
6-
<MicrosoftNETCoreAppRefPackageVersion>9.0.0-preview.3.24129.2</MicrosoftNETCoreAppRefPackageVersion>
4+
<MicrosoftDotnetSdkInternalPackageVersion>9.0.100-preview.3.24161.2</MicrosoftDotnetSdkInternalPackageVersion>
5+
<MicrosoftNETILLinkTasksPackageVersion>9.0.0-preview.3.24160.3</MicrosoftNETILLinkTasksPackageVersion>
6+
<MicrosoftNETCoreAppRefPackageVersion>9.0.0-preview.3.24160.3</MicrosoftNETCoreAppRefPackageVersion>
77
<MicrosoftDotNetApiCompatPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetApiCompatPackageVersion>
88
<MicrosoftDotNetBuildTasksFeedPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetBuildTasksFeedPackageVersion>
9-
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-preview.3.24126.1</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
9+
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-preview.3.24156.3</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
1010
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion)</MicrosoftNETWorkloadEmscriptenPackageVersion>
1111
<MicrosoftTemplateEngineTasksPackageVersion>7.0.100-rc.1.22410.7</MicrosoftTemplateEngineTasksPackageVersion>
12-
<MicrosoftDotNetCecilPackageVersion>0.11.4-alpha.24120.1</MicrosoftDotNetCecilPackageVersion>
12+
<MicrosoftDotNetCecilPackageVersion>0.11.4-alpha.24158.1</MicrosoftDotNetCecilPackageVersion>
1313
<SystemIOHashingPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</SystemIOHashingPackageVersion>
1414
</PropertyGroup>
1515
<PropertyGroup>

external/Java.Interop

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using Android.Runtime;
2+
using Java.Interop;
3+
4+
namespace Android.Hardware;
5+
6+
public partial class HardwareBuffer
7+
{
8+
// These are manually bound because we do not have a way to bind the `long` enum values.
9+
// generator treats them as int, like:
10+
// __args [4] = new JniArgumentValue ((int) usage);
11+
12+
// 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']]"
13+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
14+
[Register ("create", "(IIIIJ)Landroid/hardware/HardwareBuffer;", "", ApiSince = 26)]
15+
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)
16+
{
17+
const string __id = "create.(IIIIJ)Landroid/hardware/HardwareBuffer;";
18+
try {
19+
JniArgumentValue* __args = stackalloc JniArgumentValue [5];
20+
__args [0] = new JniArgumentValue (width);
21+
__args [1] = new JniArgumentValue (height);
22+
__args [2] = new JniArgumentValue ((int) format);
23+
__args [3] = new JniArgumentValue (layers);
24+
__args [4] = new JniArgumentValue ((long) usage);
25+
var __rm = _members.StaticMethods.InvokeObjectMethod (__id, __args);
26+
return global::Java.Lang.Object.GetObject<Android.Hardware.HardwareBuffer> (__rm.Handle, JniHandleOwnership.TransferLocalRef)!;
27+
} finally {
28+
}
29+
}
30+
31+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
32+
public unsafe Android.Hardware.HardwareBufferUsage Usage {
33+
// Metadata.xml XPath method reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/method[@name='getUsage' and count(parameter)=0]"
34+
[Register ("getUsage", "()J", "", ApiSince = 26)]
35+
get {
36+
const string __id = "getUsage.()J";
37+
try {
38+
var __rm = _members.InstanceMethods.InvokeAbstractInt64Method (__id, this, null);
39+
return (Android.Hardware.HardwareBufferUsage) __rm!;
40+
} finally {
41+
}
42+
}
43+
}
44+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
namespace Android.Hardware;
2+
3+
[System.Flags]
4+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
5+
public enum HardwareBufferUsage : long
6+
{
7+
None = 0,
8+
9+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_COMPOSER_OVERLAY']"
10+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android33.0")]
11+
UsageComposerOverlay = 2048,
12+
13+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_CPU_READ_OFTEN']"
14+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
15+
UsageCpuReadOften = 3,
16+
17+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_CPU_READ_RARELY']"
18+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
19+
UsageCpuReadRarely = 2,
20+
21+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_CPU_WRITE_OFTEN']"
22+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
23+
UsageCpuWriteOften = 48,
24+
25+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_CPU_WRITE_RARELY']"
26+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
27+
UsageCpuWriteRarely = 32,
28+
29+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_FRONT_BUFFER']"
30+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android33.0")]
31+
UsageFrontBuffer = 4294967296,
32+
33+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_COLOR_OUTPUT']"
34+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
35+
UsageGpuColorOutput = 512,
36+
37+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_CUBE_MAP']"
38+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
39+
UsageGpuCubeMap = 33554432,
40+
41+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_DATA_BUFFER']"
42+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
43+
UsageGpuDataBuffer = 16777216,
44+
45+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_MIPMAP_COMPLETE']"
46+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
47+
UsageGpuMipmapComplete = 67108864,
48+
49+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_GPU_SAMPLED_IMAGE']"
50+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
51+
UsageGpuSampledImage = 256,
52+
53+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_PROTECTED_CONTENT']"
54+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
55+
UsageProtectedContent = 16384,
56+
57+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_SENSOR_DIRECT_DATA']"
58+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
59+
UsageSensorDirectData = 8388608,
60+
61+
// Metadata.xml XPath field reference: path="/api/package[@name='android.hardware']/class[@name='HardwareBuffer']/field[@name='USAGE_VIDEO_ENCODE']"
62+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android26.0")]
63+
UsageVideoEncode = 65536
64+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Android.Runtime;
2+
3+
namespace Android.Telephony.Mbms;
4+
5+
public partial class StreamingService
6+
{
7+
// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony.mbms']/class[@name='StreamingService']/field[@name='STATE_STALLED']"
8+
[Register ("STATE_STALLED", ApiSince = 28)]
9+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
10+
[global::System.Obsolete (@"This constant will be removed in a future version. Use Android.Telephony.StreamingState enum directly instead of this field.", error: true)]
11+
public const int StateStalled = 3;
12+
13+
// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony.mbms']/class[@name='StreamingService']/field[@name='STATE_STARTED']"
14+
[Register ("STATE_STARTED", ApiSince = 28)]
15+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
16+
[global::System.Obsolete (@"This constant will be removed in a future version. Use Android.Telephony.StreamingState enum directly instead of this field.", error: true)]
17+
public const int StateStarted = 2;
18+
19+
// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony.mbms']/class[@name='StreamingService']/field[@name='STATE_STOPPED']"
20+
[Register ("STATE_STOPPED", ApiSince = 28)]
21+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
22+
[global::System.Obsolete (@"This constant will be removed in a future version. Use Android.Telephony.StreamingState enum directly instead of this field.", error: true)]
23+
public const int StateStopped = 1;
24+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using Android.Runtime;
7+
8+
namespace Android.Telephony;
9+
10+
public partial class MbmsDownloadSession
11+
{
12+
// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_ACTIVELY_DOWNLOADING']"
13+
[Register ("STATUS_ACTIVELY_DOWNLOADING", ApiSince = 28)]
14+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
15+
[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)]
16+
public const int StatusActivelyDownloading = 1;
17+
18+
// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_PENDING_DOWNLOAD']"
19+
[Register ("STATUS_PENDING_DOWNLOAD", ApiSince = 28)]
20+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
21+
[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)]
22+
public const int StatusPendingDownload = 2;
23+
24+
// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_PENDING_DOWNLOAD_WINDOW']"
25+
[Register ("STATUS_PENDING_DOWNLOAD_WINDOW", ApiSince = 28)]
26+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
27+
[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)]
28+
public const int StatusPendingDownloadWindow = 4;
29+
30+
// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_PENDING_REPAIR']"
31+
[Register ("STATUS_PENDING_REPAIR", ApiSince = 28)]
32+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
33+
[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)]
34+
public const int StatusPendingRepair = 3;
35+
36+
// Metadata.xml XPath field reference: path="/api/package[@name='android.telephony']/class[@name='MbmsDownloadSession']/field[@name='STATUS_UNKNOWN']"
37+
[Register ("STATUS_UNKNOWN", ApiSince = 28)]
38+
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")]
39+
[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)]
40+
public const int StatusUnknown = 0;
41+
}

src/Mono.Android/Mono.Android.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,16 @@
8080
</Compile>
8181
<Compile Include="Android.Content.PM\PackageManager.cs" />
8282
<Compile Include="Android.Graphics\PathIterator.cs" />
83+
<Compile Include="Android.Hardware\HardwareBuffer.cs" />
84+
<Compile Include="Android.Hardware\HardwareBufferUsage.cs" />
8385
<Compile Include="Android.Icu\ListFormatter.cs" />
8486
<Compile Include="Android.Icu\RelativeDateTimeFormatter.cs" />
8587
<Compile Include="Android.Icu\DateIntervalFormat.cs" />
8688
<Compile Include="Android.Runtime\DynamicMethodNameCounter.cs" />
8789
<Compile Include="Android.Runtime\IJavaObjectValueMarshaler.cs" />
8890
<Compile Include="Android.Telecom\InCallService.cs" />
91+
<Compile Include="Android.Telephony.Mbms\StreamingService.cs" />
92+
<Compile Include="Android.Telephony\MbmsDownloadSession.cs" />
8993
<Compile Include="Android.Views\WindowManagerLayoutParams.cs" />
9094
<Compile Include="Java.Lang.Invoke\MethodType.cs" />
9195
<Compile Include="Java.Time.Chrono\AbstractChronology.cs" />

0 commit comments

Comments
 (0)