From ba5dde84f1188a1740c88a10457820e8ca4a9bac Mon Sep 17 00:00:00 2001 From: Motomu Utsumi Date: Wed, 22 Nov 2023 16:24:32 +0900 Subject: [PATCH] Remove --show-annotation FlaggedApi from flagged-apis-droidstubs framework-connectivity-flagged-apis-droidstubs is used by jarjar-rules-generator to avoid jarjaring flagged apis. But, this usage of --show-annotation FlaggedApi in the flag is not supported. So this CL removes --show-annotation FlaggedApi. As far as framework-connectivity-flagged-apis-droidstubs contains flagged APIs, it's fine that this droidstubs also contains non-flagged APIs. Test: TH Bug: 312408311 Change-Id: I2f1f5624d98873420c0c36ac6e31386102211045 --- framework/Android.bp | 11 +++++------ thread/tests/cts/Android.bp | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/framework/Android.bp b/framework/Android.bp index fab37e9530..68a8cc557a 100644 --- a/framework/Android.bp +++ b/framework/Android.bp @@ -266,7 +266,7 @@ java_genrule { ":framework-connectivity-t-pre-jarjar{.jar}", ":framework-connectivity.stubs.module_lib{.jar}", ":framework-connectivity-t.stubs.module_lib{.jar}", - ":framework-connectivity-flagged-apis{.jar}", + ":framework-connectivity-module-api-stubs-including-flagged{.jar}", "jarjar-excludes.txt", ], tools: [ @@ -279,7 +279,7 @@ java_genrule { "--prefix android.net.connectivity " + "--apistubs $(location :framework-connectivity.stubs.module_lib{.jar}) " + "--apistubs $(location :framework-connectivity-t.stubs.module_lib{.jar}) " + - "--apistubs $(location :framework-connectivity-flagged-apis{.jar}) " + + "--apistubs $(location :framework-connectivity-module-api-stubs-including-flagged{.jar}) " + // Make a ":"-separated list. There will be an extra ":" but empty items are ignored. "--unsupportedapi $$(printf ':%s' $(locations :connectivity-hiddenapi-files)) " + "--excludes $(location jarjar-excludes.txt) " + @@ -292,7 +292,7 @@ java_genrule { } droidstubs { - name: "framework-connectivity-flagged-apis-droidstubs", + name: "framework-connectivity-module-api-stubs-including-flagged-droidstubs", srcs: [ ":framework-connectivity-sources", ":framework-connectivity-tiramisu-updatable-sources", @@ -300,7 +300,6 @@ droidstubs { ":framework-thread-sources", ], flags: [ - "--show-annotation android.annotation.FlaggedApi", "--show-for-stub-purposes-annotation android.annotation.SystemApi" + "\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\)", "--show-for-stub-purposes-annotation android.annotation.SystemApi" + @@ -315,8 +314,8 @@ droidstubs { } java_library { - name: "framework-connectivity-flagged-apis", - srcs: [":framework-connectivity-flagged-apis-droidstubs"], + name: "framework-connectivity-module-api-stubs-including-flagged", + srcs: [":framework-connectivity-module-api-stubs-including-flagged-droidstubs"], } // Library providing limited APIs within the connectivity module, so that R+ components like diff --git a/thread/tests/cts/Android.bp b/thread/tests/cts/Android.bp index 6862398035..3cf31e5687 100644 --- a/thread/tests/cts/Android.bp +++ b/thread/tests/cts/Android.bp @@ -45,7 +45,7 @@ android_test { libs: [ "android.test.base", "android.test.runner", - "framework-connectivity-flagged-apis" + "framework-connectivity-module-api-stubs-including-flagged" ], // Test coverage system runs on different devices. Need to // compile for all architectures.