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

Commit 7f1e9b27 authored by Jiyong Park's avatar Jiyong Park
Browse files

stubs inheriting from framework-module-stubs-defaults-* now works

This change fixes a problem that droidstub modules inheriting from
framework-module-stubs-defaults-* don't emit any source code. The
problem was happening because

1) --show-annotation was with incorrect format; it had trailing
"," in the parameter list and
2) the class SystemApi was not available to metalava, which made
prevented it from processing any API annotated with @SystemApi.

Fixing the problem by forcibly adding framework annotations to the
sources of the default modules.

Bug: 1241127
Test: `m ike-stubs` and check its output
Merged-In: Icbbbddb4fb68055f27aa314983a9c556e51f037a
(cherry picked from commit b4f8a852)
Change-Id: Icbbbddb4fb68055f27aa314983a9c556e51f037a
parent 23a32581
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -31,12 +31,12 @@ mainline_stubs_args += "--hide-package com.android.server "

priv_apps = " " +
    "--show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," +
        "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
    "\\) "

module_libs = " " +
    " --show-annotation android.annotation.SystemApi\\(" +
        "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES," +
        "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" +
    "\\) "

stubs_defaults {
@@ -48,6 +48,7 @@ stubs_defaults {
stubs_defaults {
    name: "framework-module-stubs-defaults-systemapi",
    args: mainline_stubs_args + priv_apps,
    srcs: [":framework-annotations"],
    installable: false,
}

@@ -59,11 +60,13 @@ stubs_defaults {
stubs_defaults {
    name: "framework-module-api-defaults-module_libs_api",
    args: mainline_stubs_args + module_libs,
    srcs: [":framework-annotations"],
    installable: false,
}

stubs_defaults {
    name: "framework-module-stubs-defaults-module_libs_api",
    args: mainline_stubs_args + module_libs + priv_apps,
    srcs: [":framework-annotations"],
    installable: false,
}