From a0c49bcc2c3ed6df52a1884c14fd37805e1e3581 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 10 Mar 2022 17:44:54 +0000 Subject: [PATCH] Remove implementation details from tethering hidden api flags Ran the following to compute the set of split_packages and package_prefixes properties. m analyze_bcpf && analyze_bcpf --bcpf com.android.tethering-bootclasspath-fragment --apex framework-tethering --sdk tethering-module-sdk Bug: 194063708 Test: m out/soong/hiddenapi/hiddenapi-flags.csv Change-Id: Iaa1207799a44ab892dc30b55f363c6e7deb94d86 Merged-In: Iaa1207799a44ab892dc30b55f363c6e7deb94d86 --- Tethering/apex/Android.bp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Tethering/apex/Android.bp b/Tethering/apex/Android.bp index dd04d6c8a9..c778695e69 100644 --- a/Tethering/apex/Android.bp +++ b/Tethering/apex/Android.bp @@ -140,6 +140,32 @@ bootclasspath_fragment { "hiddenapi/hiddenapi-unsupported.txt", "hiddenapi/hiddenapi-unsupported-tiramisu.txt", ], + + // The following packages contain classes from other modules on the + // bootclasspath. That means that the hidden API flags for this module + // has to explicitly list every single class this module provides in + // that package to differentiate them from the classes provided by other + // modules. That can include private classes that are not part of the + // API. + split_packages: [ + "android.app.usage", + "android.net", + "android.net.netstats", + "android.net.util", + ], + + // The following packages and all their subpackages currently only + // contain classes from this bootclasspath_fragment. Listing a package + // here won't prevent other bootclasspath modules from adding classes in + // any of those packages but it will prevent them from adding those + // classes into an API surface, e.g. public, system, etc.. Doing so will + // result in a build failure due to inconsistent flags. + package_prefixes: [ + "android.net.apf", + "android.net.connectivity", + "android.net.netstats.provider", + "android.net.nsd", + ], }, }