Fix NPE that happens occasionally on start-up

Was not checking if topActivity was null.

Bug: 189935087
Test: boot phone thousands of times.
Change-Id: I3c779be5f09d82d52a3df9478c801a1963e0a5c2
This commit is contained in:
Evan Rosky
2021-08-31 15:10:47 -07:00
parent aa28886d7b
commit c12b7355b1

View File

@@ -1124,6 +1124,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
if (target.mode == mode && target.taskInfo != null
// Compare component name instead of task-id because transitions will promote
// the target up to the root task while getTaskId returns the leaf.
&& target.taskInfo.topActivity != null
&& target.taskInfo.topActivity.equals(mLauncher.getComponentName())) {
return true;
}