diff options
| author | 2018-11-22 09:37:12 +0000 | |
|---|---|---|
| committer | 2018-11-22 09:37:12 +0000 | |
| commit | 5c4f214953d0b364df2a37d17cf1fc3d71655d05 (patch) | |
| tree | 5ec0b227a8991f321ff50fbf31deacf82651e260 | |
| parent | 9fa0710c665f560b71b855a2e34c04c55840d86d (diff) | |
| parent | 32a87b8c43915f4371eca92afdd8207747e98387 (diff) | |
Merge "Fix unable to resume activity with dismiss-keyguard flag"
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityStack.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java index 8d467c808e55..bd3e43c380b6 100644 --- a/services/core/java/com/android/server/wm/ActivityStack.java +++ b/services/core/java/com/android/server/wm/ActivityStack.java @@ -2548,11 +2548,16 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai // If the current top activity may be able to occlude keyguard but the occluded state // has not been set, update visibility and check again if we should continue to resume. boolean nothingToResume = true; - if (!mService.mShuttingDown && !mTopActivityOccludesKeyguard - && next.canShowWhenLocked()) { - ensureActivitiesVisibleLocked(null /* starting */, 0 /* configChanges */, - !PRESERVE_WINDOWS); - nothingToResume = shouldSleepActivities(); + if (!mService.mShuttingDown) { + final boolean canShowWhenLocked = !mTopActivityOccludesKeyguard + && next.canShowWhenLocked(); + final boolean mayDismissKeyguard = mTopDismissingKeyguardActivity != next + && next.hasDismissKeyguardWindows(); + if (canShowWhenLocked || mayDismissKeyguard) { + ensureActivitiesVisibleLocked(null /* starting */, 0 /* configChanges */, + !PRESERVE_WINDOWS); + nothingToResume = shouldSleepActivities(); + } } if (nothingToResume) { // Make sure we have executed any pending transitions, since there |