From b4f8a85245d31e57f3f0983158d1e832449cfa4f Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 25 Feb 2020 17:12:30 +0900 Subject: [PATCH] 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 Change-Id: Icbbbddb4fb68055f27aa314983a9c556e51f037a --- apex/Android.bp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apex/Android.bp b/apex/Android.bp index 362cf95b38320..051986e758d38 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -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, }