Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8473cfc0 authored by Nate Myren's avatar Nate Myren Committed by Android (Google) Code Review
Browse files

Merge "Catch exception when getting PermissionControllerManager in PolicyService" into main

parents 303e2ced fab62050
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -347,8 +347,15 @@ public final class PermissionPolicyService extends SystemService {
                UserHandle user = UserHandle.getUserHandleForUid(uid);
                PermissionControllerManager manager = mPermControllerManagers.get(user);
                if (manager == null) {
                    try {
                        manager = new PermissionControllerManager(
                                getUserContext(getContext(), user), PermissionThread.getHandler());
                    } catch (IllegalArgumentException exception) {
                        // There's a possible race condition when a user is being removed
                        Log.e(LOG_TAG, "Could not create PermissionControllerManager for user"
                                        + user, exception);
                        return;
                    }
                    mPermControllerManagers.put(user, manager);
                }
                manager.updateUserSensitiveForApp(uid);