From cfa5532127a33612d074ff2d690a58756ca450df Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 16 Dec 2019 15:36:22 +0000 Subject: [PATCH 1/2] Add SystemApi params to framework-module defaults As was done in I3305b71e22970e80db95f3daf3d7713603c7d68d for the other metalava args. Exempt-From-Owner-Approval: cherry-pick internal Bug: 140202860 Test: m Merged-In: I397d361f649f179eada827782d82c002cc7fb2d3 Change-Id: I397d361f649f179eada827782d82c002cc7fb2d3 (cherry picked from commit 14c80cf363c6f657783969e64eef9c3a3619d753) --- apex/Android.bp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apex/Android.bp b/apex/Android.bp index 9ea395374e3a0..85d72c76fb487 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -34,6 +34,6 @@ stubs_defaults { stubs_defaults { name: "framework-module-stubs-defaults-systemapi", - args: mainline_stubs_args + " --show-annotation android.annotation.SystemApi ", + args: mainline_stubs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) ", installable: false, } From 7be934f395d6c617fedaf8c40d12a0f128bd3298 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Mon, 6 Jan 2020 16:22:32 +0900 Subject: [PATCH 2/2] Define stubs_defaults for the new API surfaces The new stubs_defaults shall be used to create stub libraries from modules. The existing defaults 'framework-module-stubs-defaults-systemapi' is not enough because it only captures the SystemApis with client=PRIVILEGED_APPS. Modules can have broader SystemApis with client=MODULE_APPS and client=MODULE_LIBRARIES. Exempt-From-Owner-Approval: cherry-pick from internal Bug: b/140202860 Test: m Merged-In: I5f425928cf1db912ebe09499111a9925fcfc98fb Change-Id: I5f425928cf1db912ebe09499111a9925fcfc98fb (cherry picked from commit 2afff6cc73641dd11315e116f2f1f21ae4e64c56) --- apex/Android.bp | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/apex/Android.bp b/apex/Android.bp index 85d72c76fb487..c3b001471a12f 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -34,6 +34,36 @@ stubs_defaults { stubs_defaults { name: "framework-module-stubs-defaults-systemapi", - args: mainline_stubs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) ", + args: mainline_stubs_args + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\) ", + installable: false, +} + +stubs_defaults { + name: "framework-module-stubs-defaults-module_apps_api", + args: mainline_stubs_args + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\) " + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\) ", + installable: false, +} + +stubs_defaults { + name: "framework-module-stubs-defaults-module_libs_api", + args: mainline_stubs_args + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\) " + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_APPS," + + "process=android.annotation.SystemApi.Process.ALL\\) " + + " --show-annotation android.annotation.SystemApi\\(" + + "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES," + + "process=android.annotation.SystemApi.Process.ALL\\) ", installable: false, }