Avoid passing in null String.
IAppOpsCallback.opChanged can be passed in a null value for the package name. Avoid calling synchronizePackagePermissionsAndAppOpsAsyncForUser when that happens since it expects a NonNull value. Bug: 247127880 Test: N/A Change-Id: I532289e116b4d7b884fac7e1358120e98fecf342
This commit is contained in:
@@ -223,9 +223,11 @@ public final class PermissionPolicyService extends SystemService {
|
||||
this::synchronizePackagePermissionsAndAppOpsAsyncForUser);
|
||||
|
||||
mAppOpsCallback = new IAppOpsCallback.Stub() {
|
||||
public void opChanged(int op, int uid, String packageName) {
|
||||
synchronizePackagePermissionsAndAppOpsAsyncForUser(packageName,
|
||||
UserHandle.getUserId(uid));
|
||||
public void opChanged(int op, int uid, @Nullable String packageName) {
|
||||
if (packageName != null) {
|
||||
synchronizePackagePermissionsAndAppOpsAsyncForUser(packageName,
|
||||
UserHandle.getUserId(uid));
|
||||
}
|
||||
resetAppOpPermissionsIfNotRequestedForUidAsync(uid);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user