Workaround the link-type check warning on android.support.car* libs
The libs has been built with LOCAL_SDK_VERSION but actually using
private Auto APIs directly from the android.car library. This is due to
the fact that there hasn't been a stub library for Auto APIs.
Until the stub is created and Auto APIs are correctly defined, building
these with private plataform APIs by dropping LOCAL_SDK_VERSION and
adding LOCAL_PRIVATE_PLATFORM_APIS instead.
Bug: 72620511
Test: m -j android.support.car android.support.car-1p-prebuilt
android.support.car-prebuilt is successful and does not show any
link-type check warning
Merged-In: I33ec83140f9b8aa3b44b3bc5894456ff63a5fa05
Change-Id: I33ec83140f9b8aa3b44b3bc5894456ff63a5fa05
(cherry picked from commit cfc84b6c3cc0a96573d7e6232db8716102fe3220)
diff --git a/car-support-lib/Android.mk b/car-support-lib/Android.mk
index f816571..a5bb0b6 100644
--- a/car-support-lib/Android.mk
+++ b/car-support-lib/Android.mk
@@ -29,8 +29,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-# Build against the current public APIs of the SDK
-LOCAL_SDK_VERSION := current
+#TODO(b/72620511) support lib should be able to be using public APIs only
+#LOCAL_SDK_VERSION := current
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MANIFEST_FILE := AndroidManifest.xml
@@ -58,8 +59,9 @@
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-# Build against the current public APIs of the SDK
-LOCAL_SDK_VERSION := current
+#TODO(b/72620511) support lib should be able to be using public APIs only
+#LOCAL_SDK_VERSION := current
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_MANIFEST_FILE := AndroidManifest.xml
@@ -79,7 +81,10 @@
include $(CLEAR_VARS)
LOCAL_MODULE := android.support.car
-LOCAL_SDK_VERSION := current
+
+#TODO(b/72620511) support lib should be able to be using public APIs only
+#LOCAL_SDK_VERSION := current
+LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src)