-
Couldn't load subscription status.
- Fork 561
[Mono.Android] Fix missing enum issues that cause BG8800 warnings. #8707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
jonpryor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return (Android.Hardware.HardwareBufferUsage) __rm!; | ||
| } finally { | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jpobst: The values of these enum members look rather "flags-like"; should this be a |
||
| { | ||
| 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
24
src/Mono.Android/Android.Telephony.Mbms/StreamingService.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,42 @@ | ||
| #nullable enable | ||
| #nullable enable | ||
| abstract Android.Net.Wifi.WifiManager.WpsCallback.OnFailed(Android.Net.Wifi.WpsFailureReason reason) -> void | ||
jonpryor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.