Skip to content

Commit

Permalink
feat: support upside-down-cake/vanilla-ice-cream sdk shorthand (#3113)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches committed Jul 2, 2023
1 parent 5cd94d6 commit 70d941d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,11 @@ private int mapSdkShorthandToVersion(String sdkVersion) {
return ResConfigFlags.SDK_S_V2;
case "T":
case "TIRAMISU":
return ResConfigFlags.SDK_TIRAMISU;
case "UPSIDEDOWNCAKE":
case "UPSIDE_DOWN_CAKE":
case "VANILLAICECREAM":
case "VANILLA_ICE_CREAM":
return ResConfigFlags.SDK_DEVELOPMENT;
default:
return Integer.parseInt(sdkVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ public int hashCode() {
public final static byte SDK_R = 30;
public final static byte SDK_S = 31;
public final static byte SDK_S_V2 = 32;
public final static byte SDK_T = 33;
public final static byte SDK_TIRAMISU = 33;

// AOSP has this as 10,000 for dev purposes.
// platform_frameworks_base/commit/c7a1109a1fe0771d4c9b572dcf178e2779fc4f2d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void checkForSdkDevelopmentInsaneTestValue() {
AndrolibResources androlibResources = new AndrolibResources();

Map<String, String> sdkInfo = new LinkedHashMap<>();
sdkInfo.put("targetSdkVersion", "T");
sdkInfo.put("targetSdkVersion", "VANILLAICECREAM");

androlibResources.setSdkInfo(sdkInfo);
assertEquals("10000", androlibResources.checkTargetSdkVersionBounds());
Expand Down

0 comments on commit 70d941d

Please sign in to comment.