Remove FrameworksCoreTests dep on framework-all

Make it use framework-statsd directly rather than framework-all.
Note that this is a problem on its own: the problematic tests
should be separated from the monolith tests and moved into the statsd
dir.

Also clamp down on framework-all visibility to avoid anyone else
addinga dependency on this problematic library.

Bug: 149928788
Bug: 149906971
Test: m
Exempt-From-Owner-Approval: clean cp
Change-Id: Ic819b90911220032130c3f8a01b612edd7fa3ecc
Merged-In: Ic819b90911220032130c3f8a01b612edd7fa3ecc
(cherry picked from commit 7c2f73b4ac)
This commit is contained in:
Anton Hansson
2020-02-21 11:23:20 +00:00
parent 3f9ddc30d9
commit a1fb6f5b1d
3 changed files with 12 additions and 1 deletions

View File

@@ -543,6 +543,13 @@ java_library {
], ],
libs: ["icing-java-proto-lite"], libs: ["icing-java-proto-lite"],
apex_available: ["//apex_available:platform"], apex_available: ["//apex_available:platform"],
visibility: [
// DO NOT ADD ANY MORE ENTRIES TO THIS LIST
"//external/robolectric-shadows:__subpackages__",
"//frameworks/base/packages/Tethering/common/TetheringLib:__subpackages__",
"//frameworks/layoutlib:__subpackages__",
"//frameworks/opt/net/ike:__subpackages__",
],
} }
java_library { java_library {

View File

@@ -72,6 +72,8 @@ java_library {
hostdex: true, // for hiddenapi check hostdex: true, // for hiddenapi check
visibility: [ visibility: [
"//frameworks/base/apex/statsd:__subpackages__", "//frameworks/base/apex/statsd:__subpackages__",
// TODO(b/149928788): Remove when tests are moved.
"//frameworks/base/core/tests/coretests:__pkg__",
], ],
apex_available: [ apex_available: [
"com.android.os.statsd", "com.android.os.statsd",

View File

@@ -53,7 +53,9 @@ android_test {
"android.test.base", "android.test.base",
"android.test.mock", "android.test.mock",
"framework-atb-backward-compatibility", "framework-atb-backward-compatibility",
"framework-all", // TODO(b/149928788): Remove this when statsd tests move into the statsd dir.
"framework-statsd",
"framework",
"icing-java-proto-lite", "icing-java-proto-lite",
"ext", "ext",
"framework-res", "framework-res",