Skip to content

Commit

Permalink
Merge branch 'main' into dev/grendel/fix-proxy-throwable
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
grendello committed Mar 13, 2024
2 parents 695304c + c20d51f commit 7971f77
Show file tree
Hide file tree
Showing 17 changed files with 267 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .external
Original file line number Diff line number Diff line change
@@ -1 +1 @@
xamarin/monodroid:main@e13723e701307f9f6966d4b309c3eba10a741694
xamarin/monodroid:main@77124dc16985a92077e62b0cfeaeb007c4d4fd2a
9 changes: 9 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@
<PackageReference Update="Irony" Version="1.1.0" />
</ItemGroup>

<!-- Automatically add NRT attribute support for netstandard2.0 projects using NRT -->
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' AND ('$(Nullable)' == 'enable' OR '$(Nullable)' == 'annotations') ">
<Compile Include="$(MSBuildThisFileDirectory)external\Java.Interop\src\utils\NullableAttributes.cs" Visible="false" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' AND ('$(Nullable)' == 'enable' OR '$(Nullable)' == 'annotations') ">
<DefineConstants>$(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants>
</PropertyGroup>

</Project>
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="9.0.100-preview.3.24153.2">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="9.0.100-preview.3.24161.2">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>893b762b6e36d558df7ae6fccdfd8034f83a1c2e</Sha>
<Sha>e911f5c82cc02aea96e227596e16c830d54cf03a</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="9.0.0-preview.3.24129.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="9.0.0-preview.3.24160.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5e603d595e63ddc5cdce9777a40608279abdcc37</Sha>
<Sha>3eb8c7f1086b79b28a27b57a935f97be3b7fcccb</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0-preview.3.24129.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0-preview.3.24160.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>5e603d595e63ddc5cdce9777a40608279abdcc37</Sha>
<Sha>3eb8c7f1086b79b28a27b57a935f97be3b7fcccb</Sha>
</Dependency>
<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">
<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">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>0f3e462442af5fe65271e3185d5b645ad40a6041</Sha>
<Sha>a5f4de78fca42544771977f8e8e04c4aa83e1d02</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.24120.1" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.24158.1" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
<Uri>https://github.com/dotnet/cecil</Uri>
<Sha>0d0bc8e0f47fdae9834e1eac678f364c50946133</Sha>
<Sha>ba53c75483aa4980a332fa48e61076f80adfec40</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
10 changes: 5 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>9.0.100-preview.3.24153.2</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>9.0.0-preview.3.24129.2</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>9.0.0-preview.3.24129.2</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>9.0.100-preview.3.24161.2</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>9.0.0-preview.3.24160.3</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>9.0.0-preview.3.24160.3</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-preview.3.24126.1</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-preview.3.24156.3</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<MicrosoftTemplateEngineTasksPackageVersion>7.0.100-rc.1.22410.7</MicrosoftTemplateEngineTasksPackageVersion>
<MicrosoftDotNetCecilPackageVersion>0.11.4-alpha.24120.1</MicrosoftDotNetCecilPackageVersion>
<MicrosoftDotNetCecilPackageVersion>0.11.4-alpha.24158.1</MicrosoftDotNetCecilPackageVersion>
<SystemIOHashingPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</SystemIOHashingPackageVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop
44 changes: 44 additions & 0 deletions src/Mono.Android/Android.Hardware/HardwareBuffer.cs
Original file line number Diff line number Diff line change
@@ -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<Android.Hardware.HardwareBuffer> (__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 {
}
}
}
}
64 changes: 64 additions & 0 deletions src/Mono.Android/Android.Hardware/HardwareBufferUsage.cs
Original file line number Diff line number Diff line change
@@ -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
}
24 changes: 24 additions & 0 deletions src/Mono.Android/Android.Telephony.Mbms/StreamingService.cs
Original file line number Diff line number Diff line change
@@ -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;
}
41 changes: 41 additions & 0 deletions src/Mono.Android/Android.Telephony/MbmsDownloadSession.cs
Original file line number Diff line number Diff line change
@@ -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;
}
4 changes: 4 additions & 0 deletions src/Mono.Android/Mono.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@
</Compile>
<Compile Include="Android.Content.PM\PackageManager.cs" />
<Compile Include="Android.Graphics\PathIterator.cs" />
<Compile Include="Android.Hardware\HardwareBuffer.cs" />
<Compile Include="Android.Hardware\HardwareBufferUsage.cs" />
<Compile Include="Android.Icu\ListFormatter.cs" />
<Compile Include="Android.Icu\RelativeDateTimeFormatter.cs" />
<Compile Include="Android.Icu\DateIntervalFormat.cs" />
<Compile Include="Android.Runtime\DynamicMethodNameCounter.cs" />
<Compile Include="Android.Runtime\IJavaObjectValueMarshaler.cs" />
<Compile Include="Android.Telecom\InCallService.cs" />
<Compile Include="Android.Telephony.Mbms\StreamingService.cs" />
<Compile Include="Android.Telephony\MbmsDownloadSession.cs" />
<Compile Include="Android.Views\WindowManagerLayoutParams.cs" />
<Compile Include="Java.Lang.Invoke\MethodType.cs" />
<Compile Include="Java.Time.Chrono\AbstractChronology.cs" />
Expand Down
Loading

0 comments on commit 7971f77

Please sign in to comment.