Fix issue #18240452: No recents screenshot when resuming from keyguard.

WindowManager.keyguardGoingAway() isn't called early enough when you exit
the keyguard by clicking on a notification. So, the WindowState for the
preivous activity behind the keyguard is never transitioned to visible
and the activity manager then fails to take the screenshot for recents.
We will now be taking a screenshot of the activity before we go to sleep
so we are not dependent on signals from the keyguard.

Change-Id: I2acb2ad7a627d4e446ba11c9a0842d21fa6922d3
This commit is contained in:
Wale Ogunwale
2014-11-04 16:09:19 -08:00
parent d54b578e47
commit d3e2a0891b

View File

@@ -835,7 +835,7 @@ final class ActivityStack {
prev.task.touchActiveTime();
clearLaunchTime(prev);
final ActivityRecord next = mStackSupervisor.topRunningActivityLocked();
if (mService.mHasRecents && (next == null || next.noDisplay || next.task != prev.task)) {
if (mService.mHasRecents && (next == null || next.noDisplay || next.task != prev.task || uiSleeping)) {
prev.updateThumbnail(screenshotActivities(prev), null);
}
stopFullyDrawnTraceIfNeeded();