Merge "Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT" am: 8608d0626e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1686171 Change-Id: I13655def2a6e5913031814490106296bc609959f
This commit is contained in:
@@ -121,7 +121,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 {
|
||||
|
||||
@@ -1037,7 +1037,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ public final class IpSecAlgorithm implements Parcelable {
|
||||
}
|
||||
|
||||
for (Entry<String, Integer> 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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,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);
|
||||
|
||||
/**
|
||||
|
||||
@@ -484,7 +484,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);
|
||||
}
|
||||
@@ -1252,7 +1252,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -860,7 +860,7 @@ public class FingerprintService extends BiometricServiceBase {
|
||||
try {
|
||||
userId = getUserOrWorkProfileId(clientPackage, userId);
|
||||
if (userId != mCurrentUserId) {
|
||||
int firstSdkInt = Build.VERSION.FIRST_SDK_INT;
|
||||
int firstSdkInt = Build.VERSION.DEVICE_INITIAL_SDK_INT;
|
||||
if (firstSdkInt < Build.VERSION_CODES.BASE) {
|
||||
Slog.e(TAG, "First SDK version " + firstSdkInt + " is invalid; must be " +
|
||||
"at least VERSION_CODES.BASE");
|
||||
|
||||
@@ -596,7 +596,7 @@ public class PackageManagerServiceUtils {
|
||||
|
||||
/** Returns true if standard APK Verity is enabled. */
|
||||
static boolean isApkVerityEnabled() {
|
||||
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", FSVERITY_DISABLED)
|
||||
== FSVERITY_ENABLED;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class FileIntegrityService extends SystemService {
|
||||
private final IBinder mService = new IFileIntegrityService.Stub() {
|
||||
@Override
|
||||
public boolean isApkVeritySupported() {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user