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
This commit is contained in:
Jiyong Park
2020-01-06 13:30:59 +09:00
parent 0b4fd06744
commit 489e09abae
2 changed files with 11 additions and 0 deletions

View File

@@ -123,4 +123,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"],
}

View File

@@ -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 {