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

Commit 50dea427 authored by Mathew Inwood's avatar Mathew Inwood
Browse files

Add new "max-sdk-p blacklist".

This will contain greylist entries accessible by apps with a
targetSdkVersion of less than Q. Currently empty, will be populated in
follow up CLs.

For now, these APIs are just merged into the light greylist at build time,
pending support in the runtime for implementing the correct runtime
behavior.

Also fix a bug in sort_api.sh so it deals with empty API lists
correctly.

Bug: 115609023
Test: m
Change-Id: I213874062f393f96d120648a934ae5ad7aba93af
parent 1ad4aed0
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -87,6 +87,7 @@ $(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST): \
    frameworks/base/tools/hiddenapi/generate_hiddenapi_lists.py \
    frameworks/base/tools/hiddenapi/generate_hiddenapi_lists.py \
    frameworks/base/config/hiddenapi-light-greylist.txt \
    frameworks/base/config/hiddenapi-light-greylist.txt \
    frameworks/base/config/hiddenapi-vendor-list.txt \
    frameworks/base/config/hiddenapi-vendor-list.txt \
    frameworks/base/config/hiddenapi-max-sdk-p-blacklist.txt \
    frameworks/base/config/hiddenapi-force-blacklist.txt \
    frameworks/base/config/hiddenapi-force-blacklist.txt \
    $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) \
    $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) \
    $(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST) \
    $(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST) \
@@ -98,6 +99,7 @@ $(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST): \
	    --input-greylists \
	    --input-greylists \
	        frameworks/base/config/hiddenapi-light-greylist.txt \
	        frameworks/base/config/hiddenapi-light-greylist.txt \
	        frameworks/base/config/hiddenapi-vendor-list.txt \
	        frameworks/base/config/hiddenapi-vendor-list.txt \
	        frameworks/base/config/hiddenapi-max-sdk-p-blacklist.txt \
	        <(comm -12 <(sort $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)) \
	        <(comm -12 <(sort $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)) \
	                   $(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST)) \
	                   $(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST)) \
	        $(PRIVATE_GREYLIST_INPUTS) \
	        $(PRIVATE_GREYLIST_INPUTS) \
+0 −0

Empty file added.

+3 −1
Original line number Original line Diff line number Diff line
@@ -21,4 +21,6 @@ A=( $(uniq <<< "${A[*]}") )
A=( ${C[*]} ${A[*]} )
A=( ${C[*]} ${A[*]} )
unset IFS
unset IFS
# Dump array back into the file
# Dump array back into the file
if [ ${#A[@]} -neq 0 ]; then
  printf '%s\n' "${A[@]}" > "$dest_list"
  printf '%s\n' "${A[@]}" > "$dest_list"
fi