Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,7 @@ $(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST): \
frameworks/base/tools/hiddenapi/generate_hiddenapi_lists.py \
frameworks/base/config/hiddenapi-light-greylist.txt \
frameworks/base/config/hiddenapi-vendor-list.txt \
frameworks/base/config/hiddenapi-max-sdk-p-blacklist.txt \
frameworks/base/config/hiddenapi-force-blacklist.txt \
$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) \
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST) \
......@@ -98,6 +99,7 @@ $(INTERNAL_PLATFORM_HIDDENAPI_WHITELIST): \
--input-greylists \
frameworks/base/config/hiddenapi-light-greylist.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)) \
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST)) \
$(PRIVATE_GREYLIST_INPUTS) \
......
......@@ -21,4 +21,6 @@ A=( $(uniq <<< "${A[*]}") )
A=( ${C[*]} ${A[*]} )
unset IFS
# Dump array back into the file
printf '%s\n' "${A[@]}" > "$dest_list"
if [ ${#A[@]} -neq 0 ]; then
printf '%s\n' "${A[@]}" > "$dest_list"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment