Merge "Fix isAtLeastS failed on SCV2 and master" into sc-v2-dev

This commit is contained in:
Edgar Wang
2021-08-18 04:20:11 +00:00
committed by Android (Google) Code Review

View File

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