diff options
| author | 2020-06-22 08:25:53 +0000 | |
|---|---|---|
| committer | 2020-06-22 08:25:53 +0000 | |
| commit | 6fc87a62c02f1e607bf179be3511eefda8f6ac7c (patch) | |
| tree | 71c68460d7cb005af4ba87b81a481081ed0fcc8e | |
| parent | 113387f309eea428bc0c7e8ff347380951d582d4 (diff) | |
| parent | fb11084bc6d3dcbe5853eb25510c190daab198f5 (diff) | |
Merge "Allow staging multi-package session immediately after abandonment" into rvc-dev am: fb11084bc6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11911051
Change-Id: Ib88621dab12c8b6d1314e49862be4e34b49a90f5
| -rw-r--r-- | services/core/java/com/android/server/pm/StagingManager.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/pm/StagingManager.java b/services/core/java/com/android/server/pm/StagingManager.java index 515225b1d3be..6cd66c642a06 100644 --- a/services/core/java/com/android/server/pm/StagingManager.java +++ b/services/core/java/com/android/server/pm/StagingManager.java @@ -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"); |