From 43231d977bb33f7443fd9c25a230e1a4593f6de7 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Fri, 24 Aug 2018 14:36:57 +0100 Subject: Pass car API stubs to non-SDK enforcement Restrictions on non-SDK API access need to be given the public API stubs to mark public vs. private DEX members. Add the necessary build rules and add the stub packages to the list of parsed stubs. Bug: 112762570 Test: lunch aosp_car_arm64-userdebug; m appcompat Change-Id: Ibdd123b756aff5326890b76b94a9bd503e61ab7e --- car-lib/Android.bp | 17 +++++++++++++++++ car_product/build/car.mk | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/car-lib/Android.bp b/car-lib/Android.bp index 6fe7f8be..287949e0 100644 --- a/car-lib/Android.bp +++ b/car-lib/Android.bp @@ -196,4 +196,21 @@ java_library_static { enabled: false, }, }, + compile_dex: true, +} + +java_library_static { + name: "android.car-system-stubs", + srcs: [ + ":android.car-system-stubs-docs", + ], + libs: [ + "android.car", + ], + product_variables: { + pdk: { + enabled: false, + }, + }, + compile_dex: true, } diff --git a/car_product/build/car.mk b/car_product/build/car.mk index 669e828d..02508130 100644 --- a/car_product/build/car.mk +++ b/car_product/build/car.mk @@ -126,5 +126,11 @@ ifeq (,$(INCLUDED_ANDROID_CAR_TO_PRODUCT_BOOT_JARS)) PRODUCT_BOOT_JARS += \ android.car +PRODUCT_HIDDENAPI_STUBS := \ + android.car-stubs + +PRODUCT_HIDDENAPI_STUBS_SYSTEM := \ + android.car-system-stubs + INCLUDED_ANDROID_CAR_TO_PRODUCT_BOOT_JARS := yes endif -- cgit v1.2.3-54-g00ecf