diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 41da5eaa77dbc..e0e9139ac500b 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -272,6 +272,7 @@ package android { field public static final String READ_DEVICE_CONFIG = "android.permission.READ_DEVICE_CONFIG"; field public static final String READ_DREAM_STATE = "android.permission.READ_DREAM_STATE"; field public static final String READ_GLOBAL_APP_SEARCH_DATA = "android.permission.READ_GLOBAL_APP_SEARCH_DATA"; + field public static final String READ_INSTALLED_SESSION_PATHS = "android.permission.READ_INSTALLED_SESSION_PATHS"; field public static final String READ_INSTALL_SESSIONS = "android.permission.READ_INSTALL_SESSIONS"; field public static final String READ_NETWORK_USAGE_HISTORY = "android.permission.READ_NETWORK_USAGE_HISTORY"; field public static final String READ_OEM_UNLOCK_STATE = "android.permission.READ_OEM_UNLOCK_STATE"; @@ -3802,7 +3803,6 @@ package android.content.pm { field public static final String EXTRA_CALLBACK = "android.content.pm.extra.CALLBACK"; field public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; field public static final String EXTRA_LEGACY_STATUS = "android.content.pm.extra.LEGACY_STATUS"; - field public static final String EXTRA_RESOLVED_BASE_PATH = "android.content.pm.extra.RESOLVED_BASE_PATH"; field public static final int LOCATION_DATA_APP = 0; // 0x0 field public static final int LOCATION_MEDIA_DATA = 2; // 0x2 field public static final int LOCATION_MEDIA_OBB = 1; // 0x1 @@ -3839,6 +3839,7 @@ package android.content.pm { method public boolean getInstallAsVirtualPreload(); method public int getPendingUserActionReason(); method public boolean getRequestDowngrade(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_INSTALLED_SESSION_PATHS) public String getResolvedBaseApkPath(); method public int getRollbackDataPolicy(); method @NonNull public java.util.Set getWhitelistedRestrictedPermissions(); } diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java index cb988dfdb2039..77d32a5d4fd37 100644 --- a/core/java/android/content/pm/PackageInstaller.java +++ b/core/java/android/content/pm/PackageInstaller.java @@ -333,17 +333,6 @@ public class PackageInstaller { @SystemApi public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; - /** - * Path to the validated base APK for this session, which may point at an - * APK inside the session (when the session defines the base), or it may - * point at the existing base APK (when adding splits to an existing app). - * - * @hide - */ - @SystemApi - public static final String EXTRA_RESOLVED_BASE_PATH = - "android.content.pm.extra.RESOLVED_BASE_PATH"; - /** * Streaming installation pending. * Caller should make sure DataLoader is able to prepare image and reinitiate the operation. @@ -3549,6 +3538,19 @@ public class PackageInstaller { return referrerUri; } + /** + * @return the path to the validated base APK for this session, which may point at an + * APK inside the session (when the session defines the base), or it may + * point at the existing base APK (when adding splits to an existing app). + * + * @hide + */ + @SystemApi + @RequiresPermission(Manifest.permission.READ_INSTALLED_SESSION_PATHS) + public @Nullable String getResolvedBaseApkPath() { + return resolvedBaseCodePath; + } + /** * Get the value set in {@link SessionParams#setGrantedRuntimePermissions(String[])}. * diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 479ea4e7b46ba..239a12637f28c 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -5421,6 +5421,15 @@ + + + + + +