Merge "Check for permission on every @Override method." into sc-dev

This commit is contained in:
TreeHugger Robot
2021-06-15 08:51:38 +00:00
committed by Android (Google) Code Review

View File

@@ -91,15 +91,17 @@ public class PlatformCompat extends IPlatformCompat.Stub {
@Override
public void reportChange(long changeId, ApplicationInfo appInfo) {
reportChangeByUid(changeId, appInfo.uid);
checkCompatChangeLogPermission();
reportChangeInternal(changeId, appInfo.uid, ChangeReporter.STATE_LOGGED);
}
@Override
public void reportChangeByPackageName(long changeId, String packageName,
@UserIdInt int userId) {
checkCompatChangeLogPermission();
ApplicationInfo appInfo = getApplicationInfo(packageName, userId);
if (appInfo != null) {
reportChangeByUid(changeId, appInfo.uid);
reportChangeInternal(changeId, appInfo.uid, ChangeReporter.STATE_LOGGED);
}
}