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

Commit 476008fb authored by Jiyong Park's avatar Jiyong Park
Browse files

Use framework-appsearch-stubs instead of framework-appsearch

The framework.jar now uses framework-appsearch-stubs instead of the
implementation jar framework-appsearch. As a result, it no longer
exports private APIs of framework-appsearch.

This change also refactors the droidstubs module so that we use the
metalava args that are consistent with other stubs.

Bug: b/146218515
Test: m
Change-Id: Ia4ad349bc6297891f7cc23e2528a296d75326c5c
parent ca04bddd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -487,7 +487,7 @@ java_library {
        "framework-minus-apex",
        "updatable_media_stubs",
        "framework_mediaprovider_stubs",
        "framework-appsearch", // TODO(b/146218515): should be framework-appsearch-stubs
        "framework-appsearch-stubs",
        "framework-sdkextensions-stubs-systemapi",
        // TODO(b/146167933): Use framework-statsd-stubs instead.
        "framework-statsd",
+4 −25
Original line number Diff line number Diff line
@@ -30,29 +30,10 @@ java_library {
  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",
  ],
  visibility: ["//frameworks/base/apex/appsearch:__subpackages__"],
  apex_available: ["com.android.appsearch"],
}

metalava_appsearch_docs_args =
    "--hide-package com.android.server " +
    "--error UnhiddenSystemApi " +
    "--hide RequiresPermission " +
    "--hide MissingPermission " +
    "--hide BroadcastBehavior " +
    "--hide HiddenSuperclass " +
    "--hide DeprecationMismatch " +
    "--hide UnavailableSymbol " +
    "--hide SdkConstant " +
    "--hide HiddenTypeParameter " +
    "--hide Todo --hide Typo " +
    "--hide HiddenTypedefConstant " +
    "--show-annotation android.annotation.SystemApi "

droidstubs {
    name: "framework-appsearch-stubs-srcs",
    srcs: [
@@ -62,9 +43,8 @@ droidstubs {
    aidl: {
        include_dirs: ["frameworks/base/core/java"],
    },
    args: metalava_appsearch_docs_args,
    sdk_version: "core_current",
    libs: ["android_system_stubs_current"],
    defaults: ["framework-module-stubs-defaults-systemapi"],
    sdk_version: "system_current",
}

java_library {
@@ -75,7 +55,6 @@ java_library {
            "java",
        ],
    },
    sdk_version: "core_current",
    libs: ["android_system_stubs_current"],
    sdk_version: "system_current",
    installable: false,
}
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ java_library {
  libs: [
    "framework",
    "services.core",
    "framework-appsearch",
  ],
  static_libs: [
    "icing-java-proto-lite",