From 149ae2491f8bf6968fb68bbbf3415394a24e8603 Mon Sep 17 00:00:00 2001 From: William Loh Date: Fri, 6 Jan 2023 03:13:59 +0000 Subject: [PATCH] Set SystemApi on GET_APP_METADATA permission Bug: 252811917 Test: atest android.packageinstaller.install.cts.InstallAppMetadataTest Change-Id: I2d19635d622fc3382c78a0fa41a5768f9ac3087d --- core/api/system-current.txt | 3 ++- core/res/AndroidManifest.xml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 1251b7213bc14..1254560bfd421 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -121,6 +121,7 @@ package android { field public static final String EXEMPT_FROM_AUDIO_RECORD_RESTRICTIONS = "android.permission.EXEMPT_FROM_AUDIO_RECORD_RESTRICTIONS"; field public static final String FORCE_BACK = "android.permission.FORCE_BACK"; field public static final String FORCE_STOP_PACKAGES = "android.permission.FORCE_STOP_PACKAGES"; + field public static final String GET_APP_METADATA = "android.permission.GET_APP_METADATA"; field public static final String GET_APP_OPS_STATS = "android.permission.GET_APP_OPS_STATS"; field public static final String GET_HISTORICAL_APP_OPS_STATS = "android.permission.GET_HISTORICAL_APP_OPS_STATS"; field public static final String GET_PROCESS_STATE_AND_OOM_SCORE = "android.permission.GET_PROCESS_STATE_AND_OOM_SCORE"; @@ -3651,7 +3652,7 @@ package android.content.pm { method public abstract boolean arePermissionsIndividuallyControlled(); method @NonNull public boolean canUserUninstall(@NonNull String, @NonNull android.os.UserHandle); method @NonNull public abstract java.util.List getAllIntentFilters(@NonNull String); - method @NonNull @RequiresPermission("android.permission.GET_APP_METADATA") public android.os.PersistableBundle getAppMetadata(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException; + method @NonNull @RequiresPermission(android.Manifest.permission.GET_APP_METADATA) public android.os.PersistableBundle getAppMetadata(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException; method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public android.content.pm.ApplicationInfo getApplicationInfoAsUser(@NonNull String, int, @NonNull android.os.UserHandle) throws android.content.pm.PackageManager.NameNotFoundException; method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public android.content.pm.ApplicationInfo getApplicationInfoAsUser(@NonNull String, @NonNull android.content.pm.PackageManager.ApplicationInfoFlags, @NonNull android.os.UserHandle) throws android.content.pm.PackageManager.NameNotFoundException; method @NonNull public android.content.pm.dex.ArtManager getArtManager(); diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 76fbffd44b0cb..31ae0aa40252c 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -6982,7 +6982,9 @@ android:protectionLevel="normal|appop"/> + @SystemApi + @hide + -->