From 087646e97d53d84f18ca3a061a885259a5febfb5 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Tue, 24 Mar 2020 15:21:01 +0000 Subject: [PATCH] Limit framework module api packages Use the same whitelist of packages that the non-updatable part of the platform uses for now. This avoids exposing some internal classes in a follow-up CL. Move telephony off the module-wide defaults for now, as the telephony stubs are causing problems. Bug: 149293194 Test: m checkapi Change-Id: Iedc8c309cef8290ac14e1ad32b5b66656145f557 Merged-In: Iedc8c309cef8290ac14e1ad32b5b66656145f557 --- apex/Android.bp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apex/Android.bp b/apex/Android.bp index d31258f3d11e7..8ff790168436e 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -26,6 +26,20 @@ mainline_stubs_args = "--hide Typo " + "--hide UnavailableSymbol " +// TODO: modularize this so not every module has the same whitelist +framework_packages_to_document = [ + "android", + "dalvik", + "java", + "javax", + "junit", + "org.apache.http", + "org.json", + "org.w3c.dom", + "org.xml.sax", + "org.xmlpull", +] + // TODO: remove the hiding when server classes are cleaned up. mainline_framework_stubs_args = mainline_stubs_args + @@ -54,6 +68,7 @@ stubs_defaults { args: mainline_framework_stubs_args, installable: false, sdk_version: "current", + filter_packages: framework_packages_to_document, check_api: { current: { api_file: "api/current.txt", @@ -68,6 +83,7 @@ stubs_defaults { libs: ["framework-annotations-lib"], installable: false, sdk_version: "system_current", + filter_packages: framework_packages_to_document, check_api: { current: { api_file: "api/system-current.txt", @@ -105,6 +121,7 @@ stubs_defaults { libs: ["framework-annotations-lib"], installable: false, sdk_version: "module_current", + filter_packages: framework_packages_to_document, check_api: { current: { api_file: "api/module-lib-current.txt", @@ -119,6 +136,7 @@ stubs_defaults { libs: ["framework-annotations-lib"], installable: false, sdk_version: "module_current", + filter_packages: framework_packages_to_document, } stubs_defaults {