Fixed NPE when pause is complete on a dead app.

Cause by trying to stop freezing the screen on an activity
record whose refrence we already set to null because the app
is dead. WM will no longer freeze the screen for a dead app.

Bug: 31441504
Change-Id: I6617a5536bce5748b2f4559428ee856f54f0ab81
This commit is contained in:
Wale Ogunwale
2016-09-13 16:34:57 -07:00
parent 82f050f736
commit e852400e1b

View File

@@ -1308,7 +1308,9 @@ final class ActivityStack {
// 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*/);
if (prev != null) {
prev.stopFreezingScreenLocked(true /*force*/);
}
mPausingActivity = null;
}