Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[generator] Add [SupportedOSPlatform] to bound constant fields (#1038)
Context: #1037 Currently we do not add `[SupportedOSPlatform]` attributes to bound `const` fields, which can lead to customers using them on platforms where they are not supported: namespace Android.Telecom { public partial class TelecomManager : Java.Lang.Object { [Register("ACTION_POST_CALL", ApiSince=30)] public const string ActionPostCall = "android.telecom.action.POST_CALL"; } } Update `generator` so that `[SupportedOSPlatform]` is emitted for such `const` fields: namespace Android.Telecom { public partial class TelecomManager : Java.Lang.Object { [Register("ACTION_POST_CALL", ApiSince=30)] [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android30.0")] public const string ActionPostCall = "android.telecom.action.POST_CALL"; } } Note this does not address the `enum` part of #1037, which will require a much more involved fix.
- Loading branch information