From a1fb6f5b1d9c93f9aeb4086beed753e644ca1a47 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Fri, 21 Feb 2020 11:23:20 +0000 Subject: [PATCH] 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 7c2f73b4ac0a17c31fe523df9c82e11811b9ee7e) --- Android.bp | 7 +++++++ apex/statsd/framework/Android.bp | 2 ++ core/tests/coretests/Android.bp | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index 82e1a867786fc..7f6a7c17b9c3c 100644 --- a/Android.bp +++ b/Android.bp @@ -543,6 +543,13 @@ java_library { ], libs: ["icing-java-proto-lite"], 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 { diff --git a/apex/statsd/framework/Android.bp b/apex/statsd/framework/Android.bp index 5533ed8503218..0f52f15fa86b3 100644 --- a/apex/statsd/framework/Android.bp +++ b/apex/statsd/framework/Android.bp @@ -72,6 +72,8 @@ java_library { hostdex: true, // for hiddenapi check visibility: [ "//frameworks/base/apex/statsd:__subpackages__", + // TODO(b/149928788): Remove when tests are moved. + "//frameworks/base/core/tests/coretests:__pkg__", ], apex_available: [ "com.android.os.statsd", diff --git a/core/tests/coretests/Android.bp b/core/tests/coretests/Android.bp index 33fead6c98c6e..eb760b9c45cfe 100644 --- a/core/tests/coretests/Android.bp +++ b/core/tests/coretests/Android.bp @@ -53,7 +53,9 @@ android_test { "android.test.base", "android.test.mock", "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", "ext", "framework-res",