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

Commit b45eefca authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Fix unsuspend from dialog on secondary users

Test: atest --user-type secondary_user \
android.suspendapps.cts.DialogTests

Bug: 150741315
Change-Id: If2f49c5b7c03d1a14097e53da0fe601ae317872e
parent 8a36b147
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -13150,7 +13150,9 @@ public class PackageManagerService extends IPackageManager.Stub
    private void enforceCanSetPackagesSuspendedAsUser(String callingPackage, int callingUid,
            int userId, String callingMethod) {
        if (callingUid == Process.ROOT_UID || callingUid == Process.SYSTEM_UID) {
        if (callingUid == Process.ROOT_UID
                // Need to compare app-id to allow system dialogs access on secondary users
                || UserHandle.getAppId(callingUid) == Process.SYSTEM_UID) {
            return;
        }