Add flag to control hidden API warning toasts
Just like visual warnings about improper use of native libraries,
warnings about the usage of hidden APIs will be displayed in non-
final, non-user builds only.
Bug: 64382372
Test: make
Change-Id: Id0a4200f912ac3303026cb26b6d8974c47332828
diff --git a/core/main.mk b/core/main.mk
index 98f6ecb..38e9bd1 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -187,14 +187,16 @@
#
# -----------------------------------------------------------------
-# Enable dynamic linker developer warnings for userdebug, eng
-# and non-REL builds
+# Enable dynamic linker and hidden API developer warnings for
+# userdebug, eng and non-REL builds
ifneq ($(TARGET_BUILD_VARIANT),user)
- ADDITIONAL_BUILD_PROPERTIES += ro.bionic.ld.warning=1
+ ADDITIONAL_BUILD_PROPERTIES += ro.bionic.ld.warning=1 \
+ ro.art.hiddenapi.warning=1
else
# Enable it for user builds as long as they are not final.
ifneq ($(PLATFORM_VERSION_CODENAME),REL)
- ADDITIONAL_BUILD_PROPERTIES += ro.bionic.ld.warning=1
+ ADDITIONAL_BUILD_PROPERTIES += ro.bionic.ld.warning=1 \
+ ro.art.hiddenapi.warning=1
endif
endif