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

Commit e14a95a1 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Explicitly update permissions after pre-grants."

parents bb45fa09 bd36ab83
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -22294,11 +22294,18 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
            mDefaultPermissionPolicy.grantDefaultPermissions(userId);
        }
        if (grantPermissionsUserIds == EMPTY_INT_ARRAY) {
            // If we did not grant default permissions, we preload from this the
            // default permission exceptions lazily to ensure we don't hit the
            // disk on a new user creation.
        if (grantPermissionsUserIds == EMPTY_INT_ARRAY) {
            mDefaultPermissionPolicy.scheduleReadDefaultPermissionExceptions();
        } else {
            // Since we granted default permissions above, we need an update
            // pass to apply those changes.
            synchronized (mPackages) {
                updatePermissionsLPw(null, null, StorageManager.UUID_PRIVATE_INTERNAL,
                        UPDATE_PERMISSIONS_ALL);
            }
        }
        // Kick off any messages waiting for system ready