Remove SDK_INT codename checks for R and S
These API levels have both been finalized. We're also calling methods from these API levels directly, which may not exist if a device is running a non-finalized R or S release. PiperOrigin-RevId: 388903410
This commit is contained in:
parent
9dcfd90ef7
commit
8525ef70ba
@ -104,10 +104,7 @@ public final class Util {
|
|||||||
* Like {@link android.os.Build.VERSION#SDK_INT}, but in a place where it can be conveniently
|
* Like {@link android.os.Build.VERSION#SDK_INT}, but in a place where it can be conveniently
|
||||||
* overridden for local testing.
|
* overridden for local testing.
|
||||||
*/
|
*/
|
||||||
public static final int SDK_INT =
|
public static final int SDK_INT = Build.VERSION.SDK_INT;
|
||||||
"S".equals(Build.VERSION.CODENAME)
|
|
||||||
? 31
|
|
||||||
: "R".equals(Build.VERSION.CODENAME) ? 30 : Build.VERSION.SDK_INT;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Like {@link Build#DEVICE}, but in a place where it can be conveniently overridden for local
|
* Like {@link Build#DEVICE}, but in a place where it can be conveniently overridden for local
|
||||||
|
Loading…
x
Reference in New Issue
Block a user