diff options
| author | Jiyong Park <jiyong@google.com> | 2019-12-13 14:53:14 +0900 |
|---|---|---|
| committer | Jiyong Park <jiyong@google.com> | 2019-12-19 11:49:39 +0900 |
| commit | 5ed5a04385cf7fa2910f59fac7f798277bc3ff0d (patch) | |
| tree | 66331728b54a17cfe26adc25b55aebe7d8b2c530 /core/java/android/annotation/SystemApi.java | |
| parent | abe61584313af40691ce5a0759a2e26b20138ab9 (diff) | |
Add more enums for the client and process attributes of SystemApi
For the client attribute, we have
- MODULE_APPS for representing APKs implementing modules which are
considered part of the platform
- MODULE_LIBRARIES for representing jars inside modules.
For the process attribute, we have
- SYSTEM_SERVER for representing the system_server process.
For example, @SystemApi(client=MODULE_LIBRARIES,process=ALL) actually
means that the API is meant to be available for classes in the
bootclasspath but not to the classes from the app classloader.
Bug: 140202860
Test: m
Exempt-From-Owner-Approval: cherry-picked from internal
Merged-In: Iba6a564a0967e4d109164849ee6d6500d46469de
(cherry picked from commit 88d5e494c48318c2de047511ea7494428e4aeb1e)
Change-Id: Iba6a564a0967e4d109164849ee6d6500d46469de
Diffstat (limited to 'core/java/android/annotation/SystemApi.java')
| -rw-r--r-- | core/java/android/annotation/SystemApi.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/core/java/android/annotation/SystemApi.java b/core/java/android/annotation/SystemApi.java index f589cc5704b4..2cb93e4f8cea 100644 --- a/core/java/android/annotation/SystemApi.java +++ b/core/java/android/annotation/SystemApi.java @@ -44,9 +44,24 @@ public @interface SystemApi { enum Client { /** * Specifies that the intended clients of a SystemApi are privileged apps. - * This is the default value for {@link #client}. + * This is the default value for {@link #client}. This implies + * MODULE_APPS and MODULE_LIBRARIES as well, which means that APIs will also + * be available to module apps and jars. */ PRIVILEGED_APPS, + + /** + * Specifies that the intended clients of a SystemApi are modules implemented + * as apps, like the NetworkStack app. This implies MODULE_LIBRARIES as well, + * which means that APIs will also be available to module jars. + */ + MODULE_APPS, + + /** + * Specifies that the intended clients of a SystemApi are modules implemented + * as libraries, like the conscrypt.jar in the conscrypt APEX. + */ + MODULE_LIBRARIES } enum Process { @@ -55,6 +70,11 @@ public @interface SystemApi { * This is the default value for {@link #process}. */ ALL, + + /** + * Specifies that the SystemAPI is available only in the system server process. + */ + SYSTEM_SERVER } /** |
