Prevent NPE when dropping app icon to split

Fix: 194154810
Test: drop to split won't trow NPE.
Change-Id: Ie3a6e9a606206cc1c5c26da131551616e29d03da
This commit is contained in:
Jerry Chang
2021-07-21 15:48:26 +08:00
parent a945369393
commit 603bda15e8

View File

@@ -249,14 +249,17 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
});
return;
}
}
for (int i = 0; i < apps.length; ++i) {
if (apps[i].mode == MODE_OPENING) {
t.show(apps[i].leash);
} else {
for (int i = 0; i < apps.length; ++i) {
if (apps[i].mode == MODE_OPENING) {
t.show(apps[i].leash);
}
}
}
RemoteAnimationTarget divider = mStageCoordinator.getDividerBarLegacyTarget();
t.show(divider.leash);
if (divider.leash != null) {
t.show(divider.leash);
}
t.apply();
if (cancelled) return;
try {