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

Commit 6d2170ee authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by android-build-merger
Browse files

Merge \"Move grantDefaultPermissions back to onNewUserCreated\" into nyc-mr1-dev

am: 9cf5bf04

Change-Id: Id776e0b5f87bf5325a9bc48e198d168c9c555c18
parents b5a2e31e 9cf5bf04
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -20443,12 +20443,7 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
        }
    }
    void onBeforeUserStartUninitialized(final int userId) {
        synchronized (mPackages) {
            if (mSettings.areDefaultRuntimePermissionsGrantedLPr(userId)) {
                return;
            }
        }
    void onNewUserCreated(final int userId) {
        mDefaultPermissionPolicy.grantDefaultPermissions(userId);
        // If permission review for legacy apps is required, we represent
        // dagerous permissions for such apps as always granted runtime
+1 −4
Original line number Diff line number Diff line
@@ -2304,6 +2304,7 @@ public class UserManagerService extends IUserManager.Stub {
            synchronized (mRestrictionsLock) {
                mBaseUserRestrictions.append(userId, restrictions);
            }
            mPm.onNewUserCreated(userId);
            Intent addedIntent = new Intent(Intent.ACTION_USER_ADDED);
            addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
            mContext.sendBroadcastAsUser(addedIntent, UserHandle.ALL,
@@ -2874,10 +2875,6 @@ public class UserManagerService extends IUserManager.Stub {
            synchronized (mRestrictionsLock) {
                applyUserRestrictionsLR(userId);
            }
            UserInfo userInfo = getUserInfoNoChecks(userId);
            if (userInfo != null && !userInfo.isInitialized()) {
                mPm.onBeforeUserStartUninitialized(userId);
            }
        }

        maybeInitializeDemoMode(userId);