Re-submit "Build FrameworkStatsdTest test against the sdk"
The limitation that it couldn't both link against module_current
and use implementation details from statsd has been fixed.
Bug: 147705194
Change-Id: Ifb5af6d55ea0bbbcc732e5faeb4abe01c823c887
Test: m FrameworkStatsdTest
Test: atest FrameworkStatsdTest
diff --git a/apex/framework/test/Android.bp b/apex/framework/test/Android.bp
index b113d59..5cc5647 100644
--- a/apex/framework/test/Android.bp
+++ b/apex/framework/test/Android.bp
@@ -14,12 +14,8 @@
android_test {
name: "FrameworkStatsdTest",
- platform_apis: true,
- srcs: [
- // TODO(b/147705194): Use framework-statsd as a lib dependency instead.
- ":framework-statsd-sources",
- "**/*.java",
- ],
+ sdk_version: "module_current",
+ srcs: [ "**/*.java" ],
manifest: "AndroidManifest.xml",
static_libs: [
"androidx.test.rules",
@@ -28,9 +24,10 @@
libs: [
"android.test.runner.stubs",
"android.test.base.stubs",
+ "framework-statsd.impl",
],
test_suites: [
"device-tests",
"mts",
],
-}
\ No newline at end of file
+}