Loading services/core/java/com/android/server/pm/PackageManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -20067,8 +20067,13 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); } } void newUserCreated(final int userHandle) { mDefaultPermissionPolicy.grantDefaultPermissions(userHandle); void onBeforeUserStartUninitialized(final int userId) { synchronized (mPackages) { if (mSettings.areDefaultRuntimePermissionsGrantedLPr(userId)) { return; } } mDefaultPermissionPolicy.grantDefaultPermissions(userId); // If permission review for legacy apps is required, we represent // dagerous permissions for such apps as always granted runtime // permissions to keep per user flag state whether review is needed. services/core/java/com/android/server/pm/UserManagerService.java +4 −2 Original line number Diff line number Diff line /* * Copyright (C) 2011 The Android Open Source Project * Loading Loading @@ -2074,7 +2073,6 @@ public class UserManagerService extends IUserManager.Stub { synchronized (mRestrictionsLock) { mBaseUserRestrictions.append(userId, restrictions); } mPm.newUserCreated(userId); Intent addedIntent = new Intent(Intent.ACTION_USER_ADDED); addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); mContext.sendBroadcastAsUser(addedIntent, UserHandle.ALL, Loading Loading @@ -2634,6 +2632,10 @@ public class UserManagerService extends IUserManager.Stub { synchronized (mRestrictionsLock) { applyUserRestrictionsLR(userId); } UserInfo userInfo = getUserInfoNoChecks(userId); if (userInfo != null && !userInfo.isInitialized()) { mPm.onBeforeUserStartUninitialized(userId); } } } Loading Loading
services/core/java/com/android/server/pm/PackageManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -20067,8 +20067,13 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); } } void newUserCreated(final int userHandle) { mDefaultPermissionPolicy.grantDefaultPermissions(userHandle); void onBeforeUserStartUninitialized(final int userId) { synchronized (mPackages) { if (mSettings.areDefaultRuntimePermissionsGrantedLPr(userId)) { return; } } mDefaultPermissionPolicy.grantDefaultPermissions(userId); // If permission review for legacy apps is required, we represent // dagerous permissions for such apps as always granted runtime // permissions to keep per user flag state whether review is needed.
services/core/java/com/android/server/pm/UserManagerService.java +4 −2 Original line number Diff line number Diff line /* * Copyright (C) 2011 The Android Open Source Project * Loading Loading @@ -2074,7 +2073,6 @@ public class UserManagerService extends IUserManager.Stub { synchronized (mRestrictionsLock) { mBaseUserRestrictions.append(userId, restrictions); } mPm.newUserCreated(userId); Intent addedIntent = new Intent(Intent.ACTION_USER_ADDED); addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); mContext.sendBroadcastAsUser(addedIntent, UserHandle.ALL, Loading Loading @@ -2634,6 +2632,10 @@ public class UserManagerService extends IUserManager.Stub { synchronized (mRestrictionsLock) { applyUserRestrictionsLR(userId); } UserInfo userInfo = getUserInfoNoChecks(userId); if (userInfo != null && !userInfo.isInitialized()) { mPm.onBeforeUserStartUninitialized(userId); } } } Loading