Loading services/core/java/com/android/server/pm/PackageManagerService.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -339,7 +339,7 @@ public class PackageManagerService extends IPackageManager.Stub { /** Permission grant: grant the permission as an install permission. */ /** Permission grant: grant the permission as an install permission. */ private static final int GRANT_INSTALL = 2; private static final int GRANT_INSTALL = 2; /** Permission grant: grant the permission as a runtime permission. */ /** Permission grant: grant the permission as a runtime one. */ private static final int GRANT_RUNTIME = 3; private static final int GRANT_RUNTIME = 3; /** Permission grant: grant as runtime a permission that was granted as an install time one. */ /** Permission grant: grant as runtime a permission that was granted as an install time one. */ Loading Loading @@ -7022,8 +7022,8 @@ public class PackageManagerService extends IPackageManager.Stub { // For legacy apps dangerous permissions are install time ones. // For legacy apps dangerous permissions are install time ones. grant = GRANT_INSTALL; grant = GRANT_INSTALL; } else if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { } else if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { // For modern system apps dangerous permissions are install time ones. // For modern system apps dangerous permissions are runtime ones. grant = GRANT_INSTALL; grant = GRANT_UPGRADE; } else { } else { if (origPermissions.hasInstallPermission(bp.name)) { if (origPermissions.hasInstallPermission(bp.name)) { // For legacy apps that became modern, install becomes runtime. // For legacy apps that became modern, install becomes runtime. Loading Loading @@ -13358,6 +13358,11 @@ public class PackageManagerService extends IPackageManager.Stub { } } } } void newUserCreatedLILPw(int userHandle) { // Adding a user requires updating runtime permissions for system apps. updatePermissionsLPw(null, null, UPDATE_PERMISSIONS_ALL); } @Override @Override public VerifierDeviceIdentity getVerifierDeviceIdentity() throws RemoteException { public VerifierDeviceIdentity getVerifierDeviceIdentity() throws RemoteException { mContext.enforceCallingOrSelfPermission( mContext.enforceCallingOrSelfPermission( services/core/java/com/android/server/pm/UserManagerService.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1219,6 +1219,7 @@ public class UserManagerService extends IUserManager.Stub { updateUserIdsLocked(); updateUserIdsLocked(); Bundle restrictions = new Bundle(); Bundle restrictions = new Bundle(); mUserRestrictions.append(userId, restrictions); mUserRestrictions.append(userId, restrictions); mPm.newUserCreatedLILPw(userId); } } } } if (userInfo != null) { if (userInfo != null) { Loading Loading
services/core/java/com/android/server/pm/PackageManagerService.java +8 −3 Original line number Original line Diff line number Diff line Loading @@ -339,7 +339,7 @@ public class PackageManagerService extends IPackageManager.Stub { /** Permission grant: grant the permission as an install permission. */ /** Permission grant: grant the permission as an install permission. */ private static final int GRANT_INSTALL = 2; private static final int GRANT_INSTALL = 2; /** Permission grant: grant the permission as a runtime permission. */ /** Permission grant: grant the permission as a runtime one. */ private static final int GRANT_RUNTIME = 3; private static final int GRANT_RUNTIME = 3; /** Permission grant: grant as runtime a permission that was granted as an install time one. */ /** Permission grant: grant as runtime a permission that was granted as an install time one. */ Loading Loading @@ -7022,8 +7022,8 @@ public class PackageManagerService extends IPackageManager.Stub { // For legacy apps dangerous permissions are install time ones. // For legacy apps dangerous permissions are install time ones. grant = GRANT_INSTALL; grant = GRANT_INSTALL; } else if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { } else if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { // For modern system apps dangerous permissions are install time ones. // For modern system apps dangerous permissions are runtime ones. grant = GRANT_INSTALL; grant = GRANT_UPGRADE; } else { } else { if (origPermissions.hasInstallPermission(bp.name)) { if (origPermissions.hasInstallPermission(bp.name)) { // For legacy apps that became modern, install becomes runtime. // For legacy apps that became modern, install becomes runtime. Loading Loading @@ -13358,6 +13358,11 @@ public class PackageManagerService extends IPackageManager.Stub { } } } } void newUserCreatedLILPw(int userHandle) { // Adding a user requires updating runtime permissions for system apps. updatePermissionsLPw(null, null, UPDATE_PERMISSIONS_ALL); } @Override @Override public VerifierDeviceIdentity getVerifierDeviceIdentity() throws RemoteException { public VerifierDeviceIdentity getVerifierDeviceIdentity() throws RemoteException { mContext.enforceCallingOrSelfPermission( mContext.enforceCallingOrSelfPermission(
services/core/java/com/android/server/pm/UserManagerService.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -1219,6 +1219,7 @@ public class UserManagerService extends IUserManager.Stub { updateUserIdsLocked(); updateUserIdsLocked(); Bundle restrictions = new Bundle(); Bundle restrictions = new Bundle(); mUserRestrictions.append(userId, restrictions); mUserRestrictions.append(userId, restrictions); mPm.newUserCreatedLILPw(userId); } } } } if (userInfo != null) { if (userInfo != null) { Loading