summaryrefslogtreecommitdiff
path: root/tools/hiddenapi
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2018-10-05 15:47:29 +0100
committerMathew Inwood <mathewi@google.com>2018-10-15 16:38:12 +0100
commit50dea427292b6e5435c6cd0010e2f3f05b3900e4 (patch)
tree2b3f21e1db09f65f17484f2a17bcc6009cf62541 /tools/hiddenapi
parent1ad4aed0b96877092080ea2225cbd70f27ae8eb8 (diff)
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
Diffstat (limited to 'tools/hiddenapi')
-rwxr-xr-xtools/hiddenapi/sort_api.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/hiddenapi/sort_api.sh b/tools/hiddenapi/sort_api.sh
index 76a2f2d6eba1..7cdcf18bb3fc 100755
--- a/tools/hiddenapi/sort_api.sh
+++ b/tools/hiddenapi/sort_api.sh
@@ -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