Fix NPE when deciding whether to defer task stack animation.

Bug: 78084664
Test: Just adding an NPE check
Change-Id: I1f07488c5b6e4ad4d1c528e35b7f6b9b00d1fb1b
This commit is contained in:
Winson Chung
2018-04-18 11:42:30 -07:00
parent e116dcc57c
commit f91dbf777d

View File

@@ -1721,6 +1721,9 @@ public class TaskStack extends WindowContainer<Task> implements
return true;
}
final Task homeTask = homeStack.getTopChild();
if (homeTask == null) {
return true;
}
final AppWindowToken homeApp = homeTask.getTopVisibleAppToken();
if (!homeTask.isVisible() || homeApp == null) {
return true;