Merge "Fix isAtLeastS failed on SCV2 and master" into sc-v2-dev am: 3aa94ca277

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15591303

Change-Id: Id2c2ee4263d2f96f5d39e18caca8d209f5bdc4f1
This commit is contained in:
Edgar Wang
2021-08-18 04:38:29 +00:00
committed by Automerger Merge Worker

View File

@@ -52,9 +52,9 @@ public final class BuildCompatUtils {
} }
return (VERSION.CODENAME.equals("REL") && VERSION.SDK_INT >= 31) return (VERSION.CODENAME.equals("REL") && VERSION.SDK_INT >= 31)
|| (VERSION.CODENAME.length() == 1 || (VERSION.CODENAME.length() >= 1
&& VERSION.CODENAME.compareTo("S") >= 0 && VERSION.CODENAME.toUpperCase().charAt(0) >= 'S'
&& VERSION.CODENAME.compareTo("Z") <= 0); && VERSION.CODENAME.toUpperCase().charAt(0) <= 'Z');
} }
private BuildCompatUtils() {} private BuildCompatUtils() {}