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

Commit 6fc87a62 authored by Mohammad Samiul Islam's avatar Mohammad Samiul Islam Committed by Automerger Merge Worker
Browse files

Merge "Allow staging multi-package session immediately after abandonment" into...

Merge "Allow staging multi-package session immediately after abandonment" into rvc-dev am: fb11084b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11911051

Change-Id: Ib88621dab12c8b6d1314e49862be4e34b49a90f5
parents 113387f3 fb11084b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -970,19 +970,19 @@ public class StagingManager {
                    // name and the session we are checking is not a parent session either.
                    continue;
                }

                // From here on, stagedSession is a non-parent active staged session

                // Check if stagedSession has an active parent session or not
                if (stagedSession.hasParentSessionId()) {
                    int parentId = stagedSession.getParentSessionId();
                    PackageInstallerSession parentSession = mStagedSessions.get(parentId);
                    if (parentSession == null || parentSession.isStagedAndInTerminalState()) {
                    if (parentSession == null || parentSession.isStagedAndInTerminalState()
                            || parentSession.isDestroyed()) {
                        // Parent session has been abandoned or terminated already
                        continue;
                    }
                }

                // From here on, stagedSession is a non-parent active staged session

                // Check if session is one of the active sessions
                if (session.sessionId == stagedSession.sessionId) {
                    Slog.w(TAG, "Session " + session.sessionId + " is already staged");