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

Commit c81df3f8 authored by Jiyong Park's avatar Jiyong Park
Browse files

Platform shouldn't directly link to jars in APEXes

The non-updatable part of the platform shouldn't directly link to the
boot jars in APEXes. Ensure this by

1) setting the visibility property for the boot jars so that they are
not visible to non-APEX modules and
2) setting the apex_available property so that the boot jars are only
built for the corresponding APEXes, but not for others.

Bug: b/146167933
Bug: b/146218515
Bug: b/147200698
Test: m
Change-Id: I251fabd773bc31f46d572d143c72dd9162f3f0a6
parent c10a8f03
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -489,7 +489,8 @@ java_library {
        // TODO(b/140299412): should be framework-wifi-stubs
        "framework-wifi",
        "ike-stubs",
        // TODO(jiyong): add more stubs for APEXes here
        // TODO(b/147200698): should be the stub of framework-tethering
        "framework-tethering",
    ],
    sdk_version: "core_platform",
    apex_available: ["//apex_available:platform"],
+7 −0
Original line number Diff line number Diff line
@@ -26,9 +26,16 @@ java_library {
  installable: true,
  sdk_version: "core_platform", // TODO(b/146218515) should be core_current
  srcs: [":framework-appsearch-sources"],
  hostdex: true, // for hiddenapi check
  libs: [
    "framework-minus-apex",  // TODO(b/146218515) should be framework-system-stubs
  ],
  visibility: [
      "//frameworks/base/apex/appsearch:__subpackages__",
      // TODO(b/146218515) remove this when framework is built with the stub of appsearch
      "//frameworks/base",
  ],
  apex_available: ["com.android.appsearch"],
}

metalava_appsearch_docs_args =
+7 −0
Original line number Diff line number Diff line
@@ -55,6 +55,13 @@ java_library {
    jarjar_rules: "jarjar_rules.txt",

    plugins: ["java_api_finder"],

    hostdex: true, // for hiddenapi check
    visibility: ["//frameworks/av/apex:__subpackages__"],
    apex_available: [
        "com.android.media",
        "test_com.android.media",
    ],
}

filegroup {
+5 −0
Original line number Diff line number Diff line
@@ -36,6 +36,11 @@ java_library {
        "//frameworks/base/apex/sdkextensions",
        "//frameworks/base/apex/sdkextensions/testing",
    ],
    hostdex: true, // for hiddenapi check
    apex_available: [
        "com.android.sdkext",
        "test_com.android.sdkext",
    ],
}

droidstubs {
+10 −1
Original line number Diff line number Diff line
@@ -37,7 +37,16 @@ java_library {
        // TODO(b/146230220): Use framework-system-stubs instead.
        "android_system_stubs_current",
    ],
    // TODO:(b/146210774): Add apex_available field.
    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",
    ],
    apex_available: [
        "com.android.os.statsd",
        "test_com.android.os.statsd",
    ],
}

droidstubs {
Loading