diff options
| author | 2022-12-13 21:47:43 +0000 | |
|---|---|---|
| committer | 2022-12-13 21:47:43 +0000 | |
| commit | 45c58c6ba93e4b9ebfdfa2b1d2562c6c5ff17e2a (patch) | |
| tree | 31ef20b820db556436d0fdecb6c9ebb8fbcbb4d4 | |
| parent | 3d0e4a42a904c8502285f44e81cb8de2d2ecf40e (diff) | |
| parent | 9912ac9b910c970e645af6156fbdec09c34d0ef6 (diff) | |
Merge "Expose ApplicationInfo#HIDDEN_API_*."
| -rw-r--r-- | core/api/module-lib-current.txt | 4 | ||||
| -rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index 98c78fefcc60..314fd03a6991 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -99,6 +99,10 @@ package android.content.pm { public class ApplicationInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable { method @NonNull public java.util.List<android.content.pm.SharedLibraryInfo> getSharedLibraryInfos(); + field public static final int HIDDEN_API_ENFORCEMENT_DEFAULT = -1; // 0xffffffff + field public static final int HIDDEN_API_ENFORCEMENT_DISABLED = 0; // 0x0 + field public static final int HIDDEN_API_ENFORCEMENT_ENABLED = 2; // 0x2 + field public static final int HIDDEN_API_ENFORCEMENT_JUST_WARN = 1; // 0x1 } public abstract class PackageManager { diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 2c28268d0772..84811ea304c6 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -1528,12 +1528,14 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * the application, e.g. the target SDK version. * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int HIDDEN_API_ENFORCEMENT_DEFAULT = -1; /** * No API enforcement; the app can access the entire internal private API. Only for use by * system apps. * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int HIDDEN_API_ENFORCEMENT_DISABLED = 0; /** * No API enforcement, but enable the detection logic and warnings. Observed behaviour is the @@ -1541,11 +1543,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * APIs are accessed. * @hide * */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int HIDDEN_API_ENFORCEMENT_JUST_WARN = 1; /** * Dark grey list enforcement. Enforces the dark grey and black lists * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int HIDDEN_API_ENFORCEMENT_ENABLED = 2; private static final int HIDDEN_API_ENFORCEMENT_MIN = HIDDEN_API_ENFORCEMENT_DEFAULT; |