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:
@@ -489,7 +489,8 @@ java_library {
|
||||
// TODO(b/140299412): should be framework-wifi-stubs
|
||||
"framework-wifi",
|
||||
"ike-stubs",
|
||||
// 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"],
|
||||
|
||||
@@ -26,9 +26,16 @@ java_library {
|
||||
installable: true,
|
||||
sdk_version: "core_platform", // TODO(b/146218515) should be core_current
|
||||
srcs: [":framework-appsearch-sources"],
|
||||
hostdex: true, // for hiddenapi check
|
||||
libs: [
|
||||
"framework-minus-apex", // TODO(b/146218515) should be framework-system-stubs
|
||||
],
|
||||
visibility: [
|
||||
"//frameworks/base/apex/appsearch:__subpackages__",
|
||||
// TODO(b/146218515) remove this when framework is built with the stub of appsearch
|
||||
"//frameworks/base",
|
||||
],
|
||||
apex_available: ["com.android.appsearch"],
|
||||
}
|
||||
|
||||
metalava_appsearch_docs_args =
|
||||
|
||||
@@ -55,6 +55,13 @@ java_library {
|
||||
jarjar_rules: "jarjar_rules.txt",
|
||||
|
||||
plugins: ["java_api_finder"],
|
||||
|
||||
hostdex: true, // for hiddenapi check
|
||||
visibility: ["//frameworks/av/apex:__subpackages__"],
|
||||
apex_available: [
|
||||
"com.android.media",
|
||||
"test_com.android.media",
|
||||
],
|
||||
}
|
||||
|
||||
filegroup {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -37,7 +37,16 @@ java_library {
|
||||
// TODO(b/146230220): Use framework-system-stubs instead.
|
||||
"android_system_stubs_current",
|
||||
],
|
||||
// TODO:(b/146210774): Add apex_available field.
|
||||
hostdex: true, // for hiddenapi check
|
||||
visibility: [
|
||||
"//frameworks/base/apex/statsd:__subpackages__",
|
||||
//TODO(b/146167933) remove this when framework is built with framework-statsd-stubs
|
||||
"//frameworks/base",
|
||||
],
|
||||
apex_available: [
|
||||
"com.android.os.statsd",
|
||||
"test_com.android.os.statsd",
|
||||
],
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
|
||||
@@ -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"],
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -67,10 +67,15 @@ java_library {
|
||||
optimize: {
|
||||
enabled: false
|
||||
},
|
||||
hostdex: true, // for hiddenapi check
|
||||
visibility: [
|
||||
"//frameworks/base", // TODO(b/140299412) remove once all dependencies are fixed
|
||||
"//frameworks/opt/net/wifi/service:__subpackages__",
|
||||
] + test_access_hidden_api_whitelist,
|
||||
apex_available: [
|
||||
"com.android.wifi",
|
||||
"test_com.android.wifi",
|
||||
],
|
||||
plugins: ["java_api_finder"],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user