Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a21b2041 authored by Jiyong Park's avatar Jiyong Park Committed by Muhammad Qureshi
Browse files

Use framework-statsd-stubs in frameworks/base/Android.bp

The non-updatable part of the platform does not use framework-stats, but
framework-stats-stub. In doing so, some APIs in StatsEvent were made as
SystemApis.

FrameworkCoreTests was also modified to avoid the implicit linking with
'framework.jar' that doesn't have the test-only APIs for statsd. To
disable the implicit linking, sdk_version was set to core_platform and
the dependency to framework.jar was replaced with framework-all.

Bug: 146167933
Test: m
Test: m FrameworkCoreTests
Change-Id: Ic447993a13f74c09fabb04fe32b9b94d78a34ce2
parent 8ea733e4
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ java_library {
    libs: [
        "framework-appsearch-stubs",
        "framework-sdkextensions-stubs-systemapi",
        "framework-statsd", // TODO(b/146167933): Use framework-statsd-stubs
        "framework-statsd-stubs-module_libs_api",
        "framework-permission-stubs-systemapi",
        "framework-wifi-stubs",
        "ike-stubs",
@@ -511,8 +511,7 @@ java_library {
        "framework-mediaprovider-stubs-systemapi",
        "framework-permission-stubs-systemapi",
        "framework-sdkextensions-stubs-systemapi",
        // TODO(b/146167933): Use framework-statsd-stubs instead.
        "framework-statsd",
        "framework-statsd-stubs-module_libs_api",
        "framework-wifi-stubs",
        "ike-stubs",
        "framework-tethering-stubs",
+1 −3
Original line number Diff line number Diff line
@@ -42,8 +42,7 @@ java_library {
    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",
        //TODO(b/146167933) remove this
        "//frameworks/opt/net/wifi/service",
    ],
    apex_available: [
@@ -103,7 +102,6 @@ java_library {
    sdk_version: "core_platform",
}

// TODO(b/146167933): Use these stubs in frameworks/base/Android.bp
java_library {
    name: "framework-statsd-stubs-systemapi",
    srcs: [ ":framework-statsd-stubs-srcs-systemapi" ],
+5 −0
Original line number Diff line number Diff line
@@ -52,9 +52,14 @@ android_test {
        "android.test.base",
        "android.test.mock",
        "framework-atb-backward-compatibility",
        "framework-all",
        "icing-java-proto-lite",
        "ext",
        "framework-res",
    ],

    platform_apis: true,
    sdk_version: "core_platform",
    test_suites: ["device-tests"],

    certificate: "platform",