Merge "Fix presubmit for hidden api." am: cde72c6791

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1661999

Change-Id: Ica1d13d418b5ea0712024faade7546903a59a217
This commit is contained in:
Paul Duffin
2021-04-01 18:51:44 +00:00
committed by Automerger Merge Worker

View File

@@ -35,7 +35,7 @@ TEAMS=LIBCORE
PACKAGES=$(for t in $TEAMS; do echo $(eval echo \${${t}_PACKAGES}); done)
RE=$(echo ${PACKAGES} | sed "s/ /|/g")
git show --name-only --pretty=format: $1 | grep "config/hiddenapi-.*txt" | while read file; do
ENTRIES=$(grep -E "^L(${RE})/" <(git show $1:$file))
ENTRIES=$(grep -E "^L(${RE})/" || true <(git show $1:$file))
if [[ -n "${ENTRIES}" ]]; then
echo -e "\e[1m\e[31m$file $1 contains the following entries\e[0m"
echo -e "\e[1m\e[31mfor packages that are handled using UnsupportedAppUsage. Please remove\e[0m"