Fix NPE in RemoteTransitionCompat

Bug: 193565751
Test: pass failed launcher test with shell transition
Change-Id: I1f876c1486cc68ce9aa409ea973f5db7e7f58efd
This commit is contained in:
Chris Li
2021-07-24 12:57:01 -07:00
parent c9d779caa3
commit 61e70d323a

View File

@@ -131,12 +131,13 @@ public class RemoteTransitionCompat implements Parcelable {
t.setLayer(leashMap.get(change.getLeash()),
info.getChanges().size() * 3 - i);
final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo();
if (taskInfo != null) {
pausingTask = change.getTaskInfo().token;
if (taskInfo == null) {
continue;
}
pausingTask = taskInfo.token;
if (taskInfo.pictureInPictureParams != null
&& taskInfo.pictureInPictureParams.isAutoEnterEnabled()) {
pipTask = change.getTaskInfo().token;
pipTask = taskInfo.token;
}
}
}