From 1b1ec0974e30f8e4649dd98a81a57fef98491995 Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Thu, 11 Mar 2021 19:03:02 -0600 Subject: [PATCH] [Mono.Android] Update BuildVersionCodes.R value to 30. (#5725) Fixes: https://github.com/xamarin/xamarin-android/issues/5723 Our enumification process stores the value of the constants in `map.csv`. The build version code constant for a preview API level is 10000, but changes to e.g.: 30 when the API goes stable. Depending on when enumification was done, the 10000 may be accidentally stored instead of 30. When the API goes stable we must update `map.csv` to have the correct value. Update the enum value `Android.OS.BuildVersionCodes.R` to `30`. Add this note to the in-progress "Adding a new API Level" checklist for our future benefit. --- Documentation/workflow/HowToAddNewApiLevel.md | 12 ++++++++++++ src/Mono.Android/map.csv | 2 +- .../acceptable-breakages-vReference.txt | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Documentation/workflow/HowToAddNewApiLevel.md b/Documentation/workflow/HowToAddNewApiLevel.md index af7e2a880e7..570a12d7381 100644 --- a/Documentation/workflow/HowToAddNewApiLevel.md +++ b/Documentation/workflow/HowToAddNewApiLevel.md @@ -80,4 +80,16 @@ the latest tool versions are being used. The major version should match the new API level. For Android P this will be 28.x.x . If a version which exactly matches the API Level is not available then the latest version should be used. +## Bindings Finalization + + +### Update BuildVersionCodes API Level Value + +Our enumification process stores the value of the constants in `map.csv`. The build version code +constant for the preview API level is 10000, but changes to eg: 31 when the API goes stable. + +Depending on when enumification was done, the 10000 may be stored instead of 31. When the API +goes stable we must update `map.csv` to the correct value. + +Search for `android/os/Build$VERSION_CODES` in `map.csv`. diff --git a/src/Mono.Android/map.csv b/src/Mono.Android/map.csv index fa51b928e6e..54ea3b5de5b 100644 --- a/src/Mono.Android/map.csv +++ b/src/Mono.Android/map.csv @@ -6816,7 +6816,7 @@ E,26,android/os/Build$VERSION_CODES.O,26,Android.OS.BuildVersionCodes,O,remove, E,27,android/os/Build$VERSION_CODES.O_MR1,27,Android.OS.BuildVersionCodes,OMr1,remove, E,28,android/os/Build$VERSION_CODES.P,28,Android.OS.BuildVersionCodes,P,remove, E,29,android/os/Build$VERSION_CODES.Q,29,Android.OS.BuildVersionCodes,Q,remove, -E,30,android/os/Build$VERSION_CODES.R,10000,Android.OS.BuildVersionCodes,R,remove, +E,30,android/os/Build$VERSION_CODES.R,30,Android.OS.BuildVersionCodes,R,remove, A,0,,0,Android.OS.DebugShow,Default,remove, E,10,android/os/Debug.SHOW_CLASSLOADER,2,Android.OS.DebugShow,Classloader,remove, E,10,android/os/Debug.SHOW_FULL_DETAIL,1,Android.OS.DebugShow,FullDetail,remove, diff --git a/tests/api-compatibility/acceptable-breakages-vReference.txt b/tests/api-compatibility/acceptable-breakages-vReference.txt index 46c870ca29d..6756b2423e2 100644 --- a/tests/api-compatibility/acceptable-breakages-vReference.txt +++ b/tests/api-compatibility/acceptable-breakages-vReference.txt @@ -22,4 +22,5 @@ CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exis CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.Icon' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.Label' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.RoundIcon' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.Serialization.DataContractAttribute' exists on 'Java.Lang.Object' in the contract but not the implementation. \ No newline at end of file +CannotRemoveAttribute : Attribute 'System.Runtime.Serialization.DataContractAttribute' exists on 'Java.Lang.Object' in the contract but not the implementation. +EnumValuesMustMatch : Enum value 'Android.OS.BuildVersionCodes Android.OS.BuildVersionCodes.R' is (System.Int32)30 in the implementation but (System.Int32)10000 in the contract. \ No newline at end of file