diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index 53794688a6e70..deb0d1bf05f86 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -256,7 +256,7 @@ package android.os { } public static class Build.VERSION { - field public static final int FIRST_SDK_INT; + field public static final int DEVICE_INITIAL_SDK_INT; } public interface Parcelable { diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 9931bf9d78c23..c9ee6046025aa 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -1585,7 +1585,7 @@ package android.os { public static class Build.VERSION { field public static final String[] ACTIVE_CODENAMES; - field public static final int FIRST_SDK_INT; + field public static final int DEVICE_INITIAL_SDK_INT; field public static final int RESOURCES_SDK_INT; } diff --git a/core/java/android/net/IpSecAlgorithm.java b/core/java/android/net/IpSecAlgorithm.java index 8f1e2defd2157..7ef5bac092f64 100644 --- a/core/java/android/net/IpSecAlgorithm.java +++ b/core/java/android/net/IpSecAlgorithm.java @@ -354,7 +354,7 @@ public final class IpSecAlgorithm implements Parcelable { } for (Entry entry : ALGO_TO_REQUIRED_FIRST_SDK.entrySet()) { - if (Build.VERSION.FIRST_SDK_INT >= entry.getValue()) { + if (Build.VERSION.DEVICE_INITIAL_SDK_INT >= entry.getValue()) { enabledAlgos.add(entry.getKey()); } } diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index 8adb79b60ffd3..34c193ef8f771 100755 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -348,7 +348,7 @@ public class Build { */ @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @TestApi - public static final int FIRST_SDK_INT = SystemProperties + public static final int DEVICE_INITIAL_SDK_INT = SystemProperties .getInt("ro.product.first_api_level", 0); /** diff --git a/core/java/com/android/internal/security/VerityUtils.java b/core/java/com/android/internal/security/VerityUtils.java index ef703a9960012..877026777ce33 100644 --- a/core/java/com/android/internal/security/VerityUtils.java +++ b/core/java/com/android/internal/security/VerityUtils.java @@ -60,7 +60,7 @@ public abstract class VerityUtils { private static final boolean DEBUG = false; public static boolean isFsVeritySupported() { - return Build.VERSION.FIRST_SDK_INT >= Build.VERSION_CODES.R + return Build.VERSION.DEVICE_INITIAL_SDK_INT >= Build.VERSION_CODES.R || SystemProperties.getInt("ro.apk_verity.mode", 0) == 2; } diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java index bac6bbe43c918..db536d3aaa4fe 100644 --- a/core/java/com/android/server/SystemConfig.java +++ b/core/java/com/android/server/SystemConfig.java @@ -486,7 +486,7 @@ public class SystemConfig { // Vendors are only allowed to customize these int vendorPermissionFlag = ALLOW_LIBS | ALLOW_FEATURES | ALLOW_PRIVAPP_PERMISSIONS | ALLOW_ASSOCIATIONS; - if (Build.VERSION.FIRST_SDK_INT <= Build.VERSION_CODES.O_MR1) { + if (Build.VERSION.DEVICE_INITIAL_SDK_INT <= Build.VERSION_CODES.O_MR1) { // For backward compatibility vendorPermissionFlag |= (ALLOW_PERMISSIONS | ALLOW_APP_CONFIGS); } @@ -538,9 +538,9 @@ public class SystemConfig { int productPermissionFlag = ALLOW_FEATURES | ALLOW_LIBS | ALLOW_PERMISSIONS | ALLOW_APP_CONFIGS | ALLOW_PRIVAPP_PERMISSIONS | ALLOW_HIDDENAPI_WHITELISTING | ALLOW_ASSOCIATIONS | ALLOW_OVERRIDE_APP_RESTRICTIONS | ALLOW_IMPLICIT_BROADCASTS; - if (Build.VERSION.FIRST_SDK_INT <= Build.VERSION_CODES.R) { + if (Build.VERSION.DEVICE_INITIAL_SDK_INT <= Build.VERSION_CODES.R) { // TODO(b/157393157): This must check product interface enforcement instead of - // FIRST_SDK_VERSION for the devices without product interface enforcement. + // DEVICE_INITIAL_SDK_INT for the devices without product interface enforcement. productPermissionFlag = ALLOW_ALL; } readPermissions(Environment.buildPath( @@ -1241,7 +1241,7 @@ public class SystemConfig { addFeature(PackageManager.FEATURE_APP_ENUMERATION, 0); } - if (Build.VERSION.FIRST_SDK_INT >= Build.VERSION_CODES.Q) { + if (Build.VERSION.DEVICE_INITIAL_SDK_INT >= Build.VERSION_CODES.Q) { addFeature(PackageManager.FEATURE_IPSEC_TUNNELS, 0); } diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/FingerprintUpdateActiveUserClient.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/FingerprintUpdateActiveUserClient.java index 6776810c2e529..fd38bdd1201eb 100644 --- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/FingerprintUpdateActiveUserClient.java +++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/FingerprintUpdateActiveUserClient.java @@ -69,7 +69,7 @@ public class FingerprintUpdateActiveUserClient extends HalClientMonitor= Build.VERSION_CODES.R + return Build.VERSION.DEVICE_INITIAL_SDK_INT >= Build.VERSION_CODES.R || SystemProperties.getInt("ro.apk_verity.mode", FSVERITY_DISABLED) == FSVERITY_ENABLED; } diff --git a/tests/net/java/android/net/IpSecAlgorithmTest.java b/tests/net/java/android/net/IpSecAlgorithmTest.java index 3a8d6004f66f5..5bd2214774122 100644 --- a/tests/net/java/android/net/IpSecAlgorithmTest.java +++ b/tests/net/java/android/net/IpSecAlgorithmTest.java @@ -121,7 +121,7 @@ public class IpSecAlgorithmTest { @Test public void testValidationForAlgosAddedInS() throws Exception { - if (Build.VERSION.FIRST_SDK_INT <= Build.VERSION_CODES.R) { + if (Build.VERSION.DEVICE_INITIAL_SDK_INT <= Build.VERSION_CODES.R) { return; } @@ -194,13 +194,13 @@ public class IpSecAlgorithmTest { private static Set getMandatoryAlgos() { return CollectionUtils.filter( ALGO_TO_REQUIRED_FIRST_SDK.keySet(), - i -> Build.VERSION.FIRST_SDK_INT >= ALGO_TO_REQUIRED_FIRST_SDK.get(i)); + i -> Build.VERSION.DEVICE_INITIAL_SDK_INT >= ALGO_TO_REQUIRED_FIRST_SDK.get(i)); } private static Set getOptionalAlgos() { return CollectionUtils.filter( ALGO_TO_REQUIRED_FIRST_SDK.keySet(), - i -> Build.VERSION.FIRST_SDK_INT < ALGO_TO_REQUIRED_FIRST_SDK.get(i)); + i -> Build.VERSION.DEVICE_INITIAL_SDK_INT < ALGO_TO_REQUIRED_FIRST_SDK.get(i)); } @Test