From 07927bffa72e35ded65b5eff2815f1337715c416 Mon Sep 17 00:00:00 2001 From: Wale Ogunwale Date: Sat, 28 Mar 2015 17:21:05 -0700 Subject: [PATCH] Fixed issue with paused activity still freezing display. An activity freezes the display when it is relaunched when configuration changes. If the activity takes time to launch and another activity is launched before it is done, the activity that froze the display will be paused and might not have the chance to unfreeze the display. This will put WindowManager in an odd state. We now unfreeze the display when an activity is done pausing in case it was previously freezing the display. Bug: 19823482 Change-Id: If5538aea639e06d0b8621646bf6b2e12d325287a --- services/core/java/com/android/server/am/ActivityStack.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index 066ff372522a0..777d8dccd0f1a 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -1018,6 +1018,10 @@ final class ActivityStack { if (DEBUG_PAUSE) Slog.v(TAG, "App died during pause, not stopping: " + prev); prev = null; } + // It is possible the activity was freezing the screen before it was paused. + // In that case go ahead and remove the freeze this activity has on the screen + // since it is no longer visible. + prev.stopFreezingScreenLocked(true /*force*/); mPausingActivity = null; }