Merge changes I4af73809,Iba6a564a,I3305b71e
* changes: Hide com.android.server package with @hide javadoc tag Add more enums for the client and process attributes of SystemApi SystemApi is parameterized
This commit is contained in:
10
Android.bp
10
Android.bp
@@ -1145,7 +1145,7 @@ droidstubs {
|
|||||||
arg_files: [
|
arg_files: [
|
||||||
"core/res/AndroidManifest.xml",
|
"core/res/AndroidManifest.xml",
|
||||||
],
|
],
|
||||||
args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
|
args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) ",
|
||||||
write_sdk_values: true,
|
write_sdk_values: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1456,7 +1456,7 @@ droidstubs {
|
|||||||
merge_annotations_dirs: [
|
merge_annotations_dirs: [
|
||||||
"metalava-manual",
|
"metalava-manual",
|
||||||
],
|
],
|
||||||
args: " --show-annotation android.annotation.SystemApi",
|
args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)",
|
||||||
}
|
}
|
||||||
|
|
||||||
java_library_static {
|
java_library_static {
|
||||||
@@ -1478,7 +1478,7 @@ droidstubs {
|
|||||||
removed_dex_api_filename: "removed-dex.txt",
|
removed_dex_api_filename: "removed-dex.txt",
|
||||||
args: metalava_framework_docs_args +
|
args: metalava_framework_docs_args +
|
||||||
" --show-unannotated " +
|
" --show-unannotated " +
|
||||||
" --show-annotation android.annotation.SystemApi " +
|
" --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " +
|
||||||
" --show-annotation android.annotation.TestApi ",
|
" --show-annotation android.annotation.TestApi ",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1497,7 +1497,7 @@ droidstubs {
|
|||||||
" --hide ReferencesHidden " +
|
" --hide ReferencesHidden " +
|
||||||
" --hide UnhiddenSystemApi " +
|
" --hide UnhiddenSystemApi " +
|
||||||
" --show-unannotated " +
|
" --show-unannotated " +
|
||||||
" --show-annotation android.annotation.SystemApi " +
|
" --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " +
|
||||||
" --show-annotation android.annotation.TestApi ",
|
" --show-annotation android.annotation.TestApi ",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1541,7 +1541,7 @@ droidstubs {
|
|||||||
arg_files: [
|
arg_files: [
|
||||||
"core/res/AndroidManifest.xml",
|
"core/res/AndroidManifest.xml",
|
||||||
],
|
],
|
||||||
args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
|
args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)",
|
||||||
check_api: {
|
check_api: {
|
||||||
current: {
|
current: {
|
||||||
api_file: "api/system-current.txt",
|
api_file: "api/system-current.txt",
|
||||||
|
|||||||
@@ -41,4 +41,49 @@ import java.lang.annotation.Target;
|
|||||||
@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE})
|
@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface SystemApi {
|
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 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 {
|
||||||
|
/**
|
||||||
|
* Specifies that the SystemAPI is available in every Java processes.
|
||||||
|
* This is the default value for {@link #process}.
|
||||||
|
*/
|
||||||
|
ALL,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies that the SystemAPI is available only in the system server process.
|
||||||
|
*/
|
||||||
|
SYSTEM_SERVER
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The intended client of this SystemAPI.
|
||||||
|
*/
|
||||||
|
Client client() default android.annotation.SystemApi.Client.PRIVILEGED_APPS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The process(es) that this SystemAPI is available
|
||||||
|
*/
|
||||||
|
Process process() default android.annotation.SystemApi.Process.ALL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ metalava_updatable_media_args = " --error UnhiddenSystemApi " +
|
|||||||
"--hide MissingPermission --hide BroadcastBehavior " +
|
"--hide MissingPermission --hide BroadcastBehavior " +
|
||||||
"--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
|
"--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
|
||||||
"--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
|
"--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
|
||||||
"--hide HiddenTypedefConstant --show-annotation android.annotation.SystemApi "
|
"--hide HiddenTypedefConstant --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) "
|
||||||
|
|
||||||
droidstubs {
|
droidstubs {
|
||||||
name: "updatable-media-stubs",
|
name: "updatable-media-stubs",
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ droidstubs {
|
|||||||
srcs: [":services-sources"],
|
srcs: [":services-sources"],
|
||||||
installable: false,
|
installable: false,
|
||||||
// TODO: remove the --hide options below
|
// TODO: remove the --hide options below
|
||||||
args: " --show-single-annotation android.annotation.SystemApi" +
|
args: " --show-single-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.MODULE_LIBRARIES,process=android.annotation.SystemApi.Process.SYSTEM_SERVER\\)" +
|
||||||
" --hide-annotation android.annotation.Hide" +
|
" --hide-annotation android.annotation.Hide" +
|
||||||
" --hide-package com.google.android.startop.iorap" +
|
" --hide-package com.google.android.startop.iorap" +
|
||||||
" --hide ReferencesHidden" +
|
" --hide ReferencesHidden" +
|
||||||
|
|||||||
@@ -13,5 +13,10 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
* TODO(b/146466118) remove this javadoc tag
|
||||||
|
*/
|
||||||
@android.annotation.Hide
|
@android.annotation.Hide
|
||||||
package com.android.server;
|
package com.android.server;
|
||||||
|
|||||||
Reference in New Issue
Block a user