From c8164e49636367f4442f70c60856ac881acbb156 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 28 Jul 2022 10:52:09 +0000 Subject: [PATCH] Make the hiddenapi*-tiramisu.txt files part of framework-connectivity-t Previously, the hiddenapi*-tiramisu.txt files that were created as part of the work for creating framework-connecvity-t were just added to the list of hidden API files on the bootclasspath_fragment. Unfortunately, that made it impossible to exclude those when generating an sdk snapshot for S which cannot include framework-connectivity-t. This change moves those files to be part of framework-connectivity-t instead of the bcpf so that they will only be used in an sdk snapshot when the library is part of the snapshot. Bug: 240406019 Test: packages/modules/common/build/mainline_modules_sdks.sh # Ran the previous command with and without this change to make # sure that this change does not change the sdk snapshot # contents. A follow up change will exclude the # framework-connectivity-t library from the S sdk snapshot. Change-Id: Ib5c5c6046d96b911c8e9e5ac3729ce963f1b6907 --- Tethering/apex/Android.bp | 10 ++++------ framework-t/Android.bp | 19 +++++++++++++++++++ ...api-max-target-o-low-priority-tiramisu.txt | 0 .../hiddenapi-max-target-r-loprio.txt | 0 .../hiddenapi-unsupported-tiramisu.txt | 0 5 files changed, 23 insertions(+), 6 deletions(-) rename {Tethering/apex => framework-t}/hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt (100%) rename {Tethering/apex => framework-t}/hiddenapi/hiddenapi-max-target-r-loprio.txt (100%) rename {Tethering/apex => framework-t}/hiddenapi/hiddenapi-unsupported-tiramisu.txt (100%) diff --git a/Tethering/apex/Android.bp b/Tethering/apex/Android.bp index 3b5d6bfa6a..8cf46efa9e 100644 --- a/Tethering/apex/Android.bp +++ b/Tethering/apex/Android.bp @@ -128,7 +128,10 @@ android_app_certificate { filegroup { name: "connectivity-hiddenapi-files", - srcs: ["hiddenapi/*.txt"], + srcs: [ + ":connectivity-t-hiddenapi-files", + "hiddenapi/*.txt", + ], visibility: ["//packages/modules/Connectivity:__subpackages__"], } @@ -159,16 +162,11 @@ bootclasspath_fragment { // Additional hidden API flag files to override the defaults. This must only be // modified by the Soong or platform compat team. hidden_api: { - max_target_r_low_priority: [ - "hiddenapi/hiddenapi-max-target-r-loprio.txt", - ], max_target_o_low_priority: [ "hiddenapi/hiddenapi-max-target-o-low-priority.txt", - "hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt", ], unsupported: [ "hiddenapi/hiddenapi-unsupported.txt", - "hiddenapi/hiddenapi-unsupported-tiramisu.txt", ], // The following packages contain classes from other modules on the diff --git a/framework-t/Android.bp b/framework-t/Android.bp index 2e49307d79..d40fad958e 100644 --- a/framework-t/Android.bp +++ b/framework-t/Android.bp @@ -75,6 +75,12 @@ java_defaults { ], } +filegroup { + name: "connectivity-t-hiddenapi-files", + srcs: ["hiddenapi/*.txt"], + visibility: ["//packages/modules/Connectivity:__subpackages__"], +} + java_library { name: "framework-connectivity-t-pre-jarjar", defaults: ["framework-connectivity-t-defaults"], @@ -114,6 +120,19 @@ java_sdk_library { "com.android.connectivity", "com.android.nearby", ], + + hidden_api: { + max_target_o_low_priority: [ + "hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt", + ], + max_target_r_low_priority: [ + "hiddenapi/hiddenapi-max-target-r-loprio.txt", + ], + unsupported: [ + "hiddenapi/hiddenapi-unsupported-tiramisu.txt", + ], + }, + impl_library_visibility: [ "//packages/modules/Connectivity/Tethering/apex", // In preparation for future move diff --git a/Tethering/apex/hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt b/framework-t/hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt similarity index 100% rename from Tethering/apex/hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt rename to framework-t/hiddenapi/hiddenapi-max-target-o-low-priority-tiramisu.txt diff --git a/Tethering/apex/hiddenapi/hiddenapi-max-target-r-loprio.txt b/framework-t/hiddenapi/hiddenapi-max-target-r-loprio.txt similarity index 100% rename from Tethering/apex/hiddenapi/hiddenapi-max-target-r-loprio.txt rename to framework-t/hiddenapi/hiddenapi-max-target-r-loprio.txt diff --git a/Tethering/apex/hiddenapi/hiddenapi-unsupported-tiramisu.txt b/framework-t/hiddenapi/hiddenapi-unsupported-tiramisu.txt similarity index 100% rename from Tethering/apex/hiddenapi/hiddenapi-unsupported-tiramisu.txt rename to framework-t/hiddenapi/hiddenapi-unsupported-tiramisu.txt