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
This commit is contained in:
Jiyong Park 2020-01-06 13:30:59 +09:00 committed by Anton Hansson
parent 2c54508955
commit 90247c8a1c
4 changed files with 18 additions and 1 deletions

View File

@ -464,7 +464,8 @@ java_library {
"framework-minus-apex",
"updatable_media_stubs",
"framework-sdkextensions-stubs-systemapi",
// TODO(jiyong): add more stubs for APEXes here
// TODO(b/147200698): should be the stub of framework-tethering
"framework-tethering",
],
sdk_version: "core_platform",
apex_available: ["//apex_available:platform"],

View File

@ -36,6 +36,11 @@ java_library {
"//frameworks/base/apex/sdkextensions",
"//frameworks/base/apex/sdkextensions/testing",
],
hostdex: true, // for hiddenapi check
apex_available: [
"com.android.sdkext",
"test_com.android.sdkext",
],
}
droidstubs {

View File

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

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 {