From 1eb8933d3ea2fe0b9bf106b69d6e1a8e0959c77b Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Mon, 6 Jan 2020 13:30:59 +0900 Subject: [PATCH] Platform shouldn't directly link to jars in APEXes The non-updatable part of the platform shouldn't directly link to the boot jars in APEXes. Ensure this by 1) setting the visibility property for the boot jars so that they are not visible to non-APEX modules and 2) setting the apex_available property so that the boot jars are only built for the corresponding APEXes, but not for others. Bug: b/146167933 Bug: b/146218515 Bug: b/147200698 Test: m Change-Id: I251fabd773bc31f46d572d143c72dd9162f3f0a6 Merged-In: I251fabd773bc31f46d572d143c72dd9162f3f0a6 --- Tethering/Android.bp | 1 + Tethering/common/TetheringLib/Android.bp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Tethering/Android.bp b/Tethering/Android.bp index e79986c4f6..8987b54477 100644 --- a/Tethering/Android.bp +++ b/Tethering/Android.bp @@ -122,4 +122,5 @@ android_app { use_embedded_native_libs: true, // The permission configuration *must* be included to ensure security of the device required: ["NetworkPermissionConfig"], + apex_available: ["com.android.tethering"], } diff --git a/Tethering/common/TetheringLib/Android.bp b/Tethering/common/TetheringLib/Android.bp index 5785707cb9..264ce440f5 100644 --- a/Tethering/common/TetheringLib/Android.bp +++ b/Tethering/common/TetheringLib/Android.bp @@ -47,6 +47,16 @@ java_library { libs: [ "android_system_stubs_current", ], + + hostdex: true, // for hiddenapi check + visibility: [ + "//frameworks/base/packages/Tethering:__subpackages__", + //TODO(b/147200698) remove below lines when the platform is built with stubs + "//frameworks/base", + "//frameworks/base/services", + "//frameworks/base/services/core", + ], + apex_available: ["com.android.tethering"], } filegroup {