Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1082818 authored by David Brazdil's avatar David Brazdil
Browse files

Encode use of private API in manifest

If a package is declared to build directly against the platform,
this patch will invoke manifest_fixer.py to encode that information
in the manifest. This information is then used by the framework to
correctly configure the runtime process.

Bug: 113315999
Test: m StorageManager; aapt l -a StorageManager.apk|grep usesNonSdkApi
Change-Id: I53c9728d12380a01b35315fc9c58463e9f5a9f48
parent 7c76579e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -58,10 +58,14 @@ my_exported_sdk_libs_file := $(call local-intermediates-dir,COMMON)/exported-sdk
$(fixed_android_manifest): PRIVATE_EXPORTED_SDK_LIBS_FILE := $(my_exported_sdk_libs_file)
$(fixed_android_manifest): $(my_exported_sdk_libs_file)

$(fixed_android_manifest): PRIVATE_MANIFEST_FIXER_FLAGS :=
my_manifest_fixer_flags :=
ifneq ($(LOCAL_MODULE_CLASS),APPS)
$(fixed_android_manifest): PRIVATE_MANIFEST_FIXER_FLAGS := --library
    my_manifest_fixer_flags += --library
endif
ifeq ($(LOCAL_PRIVATE_PLATFORM_APIS),true)
    my_manifest_fixer_flags += --uses-non-sdk-api
endif
$(fixed_android_manifest): PRIVATE_MANIFEST_FIXER_FLAGS := $(my_manifest_fixer_flags)
$(fixed_android_manifest): $(MANIFEST_FIXER)
$(fixed_android_manifest): $(main_android_manifest)
	@echo "Fix manifest: $@"