find_api_violations.pl: sync strings with hiddenapi_flags.h
Follows names described in go/hiddenapi-list-renaming.
Fix: 161336379
Test: N/A
Change-Id: I76503c32bd654983ae514a59159cefe22377c04f
diff --git a/tools/hiddenapi/find_api_violations.pl b/tools/hiddenapi/find_api_violations.pl
index caa4f54..d097b89 100755
--- a/tools/hiddenapi/find_api_violations.pl
+++ b/tools/hiddenapi/find_api_violations.pl
@@ -36,17 +36,17 @@
=over
-=item --[no]lightgrey
+=item --[no]unsupported
-(Don't) show light grey list accesses (default true)
+(Don't) show unsupported API accesses (default true)
-=item --[no]darkgrey
+=item --[no]max-target
-(Don't) show dark grey list accesses (default true)
+(Don't) show APIs blocked by apps target SDK (default true)
-=item --[no]black
+=item --[no]blocked
-(Don't) show black list accesses (default true)
+(Don't) show blocked list accesses (default true)
=item --bugreport|-b
@@ -62,19 +62,19 @@
=cut
-my $lightgrey = 1;
-my $darkgrey = 1;
-my $black = 1;
+my $unsupported = 1;
+my $maxtarget = 1;
+my $blocked = 1;
my $bugreport = 0;
my $short = 0;
my $help = 0;
-GetOptions("lightgrey!" => \$lightgrey,
- "darkgrey!" => \$darkgrey,
- "black!" => \$black,
- "bugreport|b" => \$bugreport,
- "short|s" => \$short,
- "help" => \$help)
+GetOptions("unsupported!" => \$unsupported,
+ "max-target!" => \$maxtarget,
+ "blocked!" => \$blocked,
+ "bugreport|b" => \$bugreport,
+ "short|s" => \$short,
+ "help" => \$help)
or pod2usage(q(-verbose) => 1);
pod2usage(q(-verbose) => 2) if ($help);
@@ -119,9 +119,9 @@
if ($msg =~ m/Accessing hidden (\w+) (L.*?) \((.*list), (.*?)\)/) {
my ($member_type, $symbol, $list, $access_type) = ($1, $2, $3, $4);
my $package = $procmap->{$pid} || "unknown($pid)";
- if (($list =~ m/light/ && $lightgrey)
- || ($list =~ m/dark/ && $darkgrey)
- || ($list =~ m/black/ && $black)) {
+ if (($list =~ m/unsupported/ && $unsupported)
+ || ($list =~ m/max-target/ && $maxtarget)
+ || ($list =~ m/blocked/ && $blocked)) {
if ($short) {
print "$symbol\n";
} else {