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

Commit 00202de3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use USER_SYSTEM instead of USER_ALL when enabling rollback." into qt-dev

parents 2deeadae d6f83bb5
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -14620,6 +14620,20 @@ public class PackageManagerService extends IPackageManager.Stub
            return mUser;
        }
        /**
         * Gets the user handle for the user that the rollback agent should
         * use to look up information about this installation when enabling
         * rollback.
         */
        UserHandle getRollbackUser() {
            // The session for packages installed for "all" users is
            // associated with the "system" user.
            if (mUser == UserHandle.ALL) {
                return UserHandle.SYSTEM;
            }
            return mUser;
        }
        HandlerParams setTraceMethod(String traceMethod) {
            this.traceMethod = traceMethod;
            return this;
@@ -15238,7 +15252,7 @@ public class PackageManagerService extends IPackageManager.Stub
                            installedUsers);
                    enableRollbackIntent.putExtra(
                            PackageManagerInternal.EXTRA_ENABLE_ROLLBACK_USER,
                            getUser().getIdentifier());
                            getRollbackUser().getIdentifier());
                    enableRollbackIntent.setDataAndType(Uri.fromFile(new File(origin.resolvedPath)),
                            PACKAGE_MIME_TYPE);
                    enableRollbackIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);