summaryrefslogtreecommitdiff
path: root/test-base
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2020-05-29 10:51:18 +0900
committerJiyong Park <jiyong@google.com>2020-06-26 09:42:06 +0900
commit912db8daaf96d6bac929f6145f2b907d97c37a6e (patch)
tree338d8bbd4d0345c6c9f509a0dbb0c761ece37d85 /test-base
parentedb968e237c8470aff1007fe8c4a9ba58d74acbc (diff)
downloadbase-912db8daaf96d6bac929f6145f2b907d97c37a6e.tar.gz
Don't use impl lib of android.test.[mock|base|runners]
The java_sdk_library modules are now added with 'default_to_stubs: true' so that their impl libraries are not used even when the clients don't have sdk_version property set. This will allow us to replace the direct references to the stub libraries of the java_sdk_library modules with the references to the modules themselves (e.g. android.test.base.stubs -> android.test.base) in many of the CTS tests without unintentionally exposing the private APIs in the impl lib. As part of the change, MockContentProvider.getIContentProviderBinder() now returns an anonymous Binder object instead of throwing an exception. This is to eliminate the need for clients to override the now inaccessible method to escape from the exception. Also, InstrumentationTestRunner.addTestListener method is added to the stub because it is used by several tests (MtpServiceTests, etc.) Bug: 157007292 Test: m Merged-In: I14cf217f21fd3534c920c3a6336cf2d14c02e60c (cherry picked from commit b4e458d1063a3ece9a7f539ed6dbaeb6fb9c495d) Change-Id: I14cf217f21fd3534c920c3a6336cf2d14c02e60c
Diffstat (limited to 'test-base')
-rw-r--r--test-base/Android.bp1
1 files changed, 1 insertions, 0 deletions
diff --git a/test-base/Android.bp b/test-base/Android.bp
index 69c296e7ee9c..c7c9fc739189 100644
--- a/test-base/Android.bp
+++ b/test-base/Android.bp
@@ -38,6 +38,7 @@ java_sdk_library {
],
compile_dex: true,
+ default_to_stubs: true,
}
// Build the android.test.base_static library