diff options
| author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-09-26 22:18:07 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-09-26 22:18:07 +0000 |
| commit | a828ee6442d6384b99027734f030ff5c1e294700 (patch) | |
| tree | cf8d1da039d69030a948cf53690d3e5bf4d1aece /core/java/android | |
| parent | 52efd46075d7f64da9d46de121a0cf6f93e4a7a1 (diff) | |
| parent | 3e725f2224a14df061ec9352633d8a8f4ff87ebe (diff) | |
Merge changes from topic "system_ext"
* changes:
Consider overlay in system_ext as system's
Support /system_ext partition
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 10 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageParser.java | 4 | ||||
| -rwxr-xr-x | core/java/android/os/Build.java | 2 | ||||
| -rw-r--r-- | core/java/android/os/Environment.java | 23 |
4 files changed, 27 insertions, 12 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 9bc5f8055617..d6b70e0d80e3 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -614,10 +614,10 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { /** * Value for {@link #privateFlags}: whether this app is pre-installed on the - * google partition of the system image. + * system_ext partition of the system image. * @hide */ - public static final int PRIVATE_FLAG_PRODUCT_SERVICES = 1 << 21; + public static final int PRIVATE_FLAG_SYSTEM_EXT = 1 << 21; /** * Indicates whether this package requires access to non-SDK APIs. @@ -713,7 +713,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { PRIVATE_FLAG_USE_EMBEDDED_DEX, PRIVATE_FLAG_PRIVILEGED, PRIVATE_FLAG_PRODUCT, - PRIVATE_FLAG_PRODUCT_SERVICES, + PRIVATE_FLAG_SYSTEM_EXT, PRIVATE_FLAG_PROFILEABLE_BY_SHELL, PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER, PRIVATE_FLAG_SIGNED_WITH_PLATFORM_KEY, @@ -2047,8 +2047,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { } /** @hide */ - public boolean isProductServices() { - return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT_SERVICES) != 0; + public boolean isSystemExt() { + return (privateFlags & ApplicationInfo.PRIVATE_FLAG_SYSTEM_EXT) != 0; } /** @hide */ diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 643cb3e2b059..f15b5d75d616 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -6897,8 +6897,8 @@ public class PackageParser { } /** @hide */ - public boolean isProductServices() { - return applicationInfo.isProductServices(); + public boolean isSystemExt() { + return applicationInfo.isSystemExt(); } /** @hide */ diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index 51896aaace7e..f5426cd9203d 100755 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -1186,7 +1186,7 @@ public class Build { ArrayList<Partition> partitions = new ArrayList(); String[] names = new String[] { - "bootimage", "odm", "product", "product_services", Partition.PARTITION_NAME_SYSTEM, + "bootimage", "odm", "product", "system_ext", Partition.PARTITION_NAME_SYSTEM, "vendor" }; for (String name : names) { diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java index 0ee9a1192a5f..3462d1f56b67 100644 --- a/core/java/android/os/Environment.java +++ b/core/java/android/os/Environment.java @@ -54,7 +54,7 @@ public class Environment { private static final String ENV_ODM_ROOT = "ODM_ROOT"; private static final String ENV_VENDOR_ROOT = "VENDOR_ROOT"; private static final String ENV_PRODUCT_ROOT = "PRODUCT_ROOT"; - private static final String ENV_PRODUCT_SERVICES_ROOT = "PRODUCT_SERVICES_ROOT"; + private static final String ENV_SYSTEM_EXT_ROOT = "SYSTEM_EXT_ROOT"; /** {@hide} */ public static final String DIR_ANDROID = "Android"; @@ -77,8 +77,8 @@ public class Environment { private static final File DIR_ODM_ROOT = getDirectory(ENV_ODM_ROOT, "/odm"); private static final File DIR_VENDOR_ROOT = getDirectory(ENV_VENDOR_ROOT, "/vendor"); private static final File DIR_PRODUCT_ROOT = getDirectory(ENV_PRODUCT_ROOT, "/product"); - private static final File DIR_PRODUCT_SERVICES_ROOT = getDirectory(ENV_PRODUCT_SERVICES_ROOT, - "/product_services"); + private static final File DIR_SYSTEM_EXT_ROOT = getDirectory(ENV_SYSTEM_EXT_ROOT, + "/system_ext"); @UnsupportedAppUsage private static UserEnvironment sCurrentUser; @@ -222,11 +222,26 @@ public class Environment { * Return root directory of the "product_services" partition holding middleware * services if any. If present, the partition is mounted read-only. * + * @deprecated This directory is not guaranteed to exist. + * Its name is changed to "system_ext" because the partition's purpose is changed. + * {@link #getSystemExtDirectory()} * @hide */ @SystemApi + @Deprecated public static @NonNull File getProductServicesDirectory() { - return DIR_PRODUCT_SERVICES_ROOT; + return getDirectory("PRODUCT_SERVICES_ROOT", "/product_services"); + } + + /** + * Return root directory of the "system_ext" partition holding system partition's extension + * If present, the partition is mounted read-only. + * + * @hide + */ + @SystemApi + public static @NonNull File getSystemExtDirectory() { + return DIR_SYSTEM_EXT_ROOT; } /** |
