Check for permission on every @Override method.
Bug: 189862446 Test: presubmit Change-Id: I52c65d831948679eabf4fda10241d25467c608f1
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user