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
This commit is contained in:
Wale Ogunwale
2015-03-28 17:21:05 -07:00
parent 545ebdefd2
commit 07927bffa7

View File

@@ -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;
}