Check for dump permission before other permissions.

There are test that rely on that being checked first.

Bug: 149350547
Test: atest android.security.cts.ServicePermissionsTest#testDumpProtected
Change-Id: Ifeac7219c217ee522af442e46dc7832b6afb9e42
This commit is contained in:
atrost
2020-02-17 19:20:16 +00:00
parent 0ab508981a
commit c14c79bbf3

View File

@@ -234,8 +234,8 @@ public class PlatformCompat extends IPlatformCompat.Stub {
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
checkCompatChangeReadAndLogPermission();
if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, "platform_compat", pw)) return;
checkCompatChangeReadAndLogPermission();
mCompatConfig.dumpConfig(pw);
}