Add null check in transientlaunchrestoretarget

Some sequences of events result in this being null, so
prevent a crash by checking.

Bug: 210014802
Test: manual
Change-Id: Id1b8b5b23d51a9fb5228e7106e2d2614a6d62676
This commit is contained in:
Evan Rosky
2022-03-10 14:27:15 -08:00
parent 64e22982b0
commit 9bc2027fc9

View File

@@ -216,6 +216,7 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
}
Task getTransientLaunchRestoreTarget(@NonNull WindowContainer container) {
if (mTransientLaunches == null) return null;
for (int i = 0; i < mTransientLaunches.size(); ++i) {
if (mTransientLaunches.keyAt(i).isDescendantOf(container)) {
return mTransientLaunches.valueAt(i);