Skip to content

Commit 1b1ec09

Browse files
authored
[Mono.Android] Update BuildVersionCodes.R value to 30. (#5725)
Fixes: #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.
1 parent afc0358 commit 1b1ec09

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

Documentation/workflow/HowToAddNewApiLevel.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,16 @@ the latest tool versions are being used.
8080

8181
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.
8282

83+
## Bindings Finalization
84+
85+
86+
### Update BuildVersionCodes API Level Value
87+
88+
Our enumification process stores the value of the constants in `map.csv`. The build version code
89+
constant for the preview API level is 10000, but changes to eg: 31 when the API goes stable.
90+
91+
Depending on when enumification was done, the 10000 may be stored instead of 31. When the API
92+
goes stable we must update `map.csv` to the correct value.
93+
94+
Search for `android/os/Build$VERSION_CODES` in `map.csv`.
8395

src/Mono.Android/map.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6816,7 +6816,7 @@ E,26,android/os/Build$VERSION_CODES.O,26,Android.OS.BuildVersionCodes,O,remove,
68166816
E,27,android/os/Build$VERSION_CODES.O_MR1,27,Android.OS.BuildVersionCodes,OMr1,remove,
68176817
E,28,android/os/Build$VERSION_CODES.P,28,Android.OS.BuildVersionCodes,P,remove,
68186818
E,29,android/os/Build$VERSION_CODES.Q,29,Android.OS.BuildVersionCodes,Q,remove,
6819-
E,30,android/os/Build$VERSION_CODES.R,10000,Android.OS.BuildVersionCodes,R,remove,
6819+
E,30,android/os/Build$VERSION_CODES.R,30,Android.OS.BuildVersionCodes,R,remove,
68206820
A,0,,0,Android.OS.DebugShow,Default,remove,
68216821
E,10,android/os/Debug.SHOW_CLASSLOADER,2,Android.OS.DebugShow,Classloader,remove,
68226822
E,10,android/os/Debug.SHOW_FULL_DETAIL,1,Android.OS.DebugShow,FullDetail,remove,

tests/api-compatibility/acceptable-breakages-vReference.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exis
2222
CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.Icon' in the contract but not the implementation.
2323
CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.Label' in the contract but not the implementation.
2424
CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.RoundIcon' in the contract but not the implementation.
25-
CannotRemoveAttribute : Attribute 'System.Runtime.Serialization.DataContractAttribute' exists on 'Java.Lang.Object' in the contract but not the implementation.
25+
CannotRemoveAttribute : Attribute 'System.Runtime.Serialization.DataContractAttribute' exists on 'Java.Lang.Object' in the contract but not the implementation.
26+
EnumValuesMustMatch : Enum value 'Android.OS.BuildVersionCodes Android.OS.BuildVersionCodes.R' is (System.Int32)30 in the implementation but (System.Int32)10000 in the contract.

0 commit comments

Comments
 (0)