Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 728512c0 authored by mattsziklay's avatar mattsziklay Committed by Matt Sziklay
Browse files

Add null checks to desktop split interactions.

Fixes a couple NPEs for desktop view model interactions with split by
adding null checks.

Bug: 365569603
Test: Manual, drag new task onto split tasks. Confirm desktop drag to split is unaffected.
Flag: EXEMPT, bug fix
Change-Id: I9f507fdfc960344be47deb12852e27b5be10b853
parent ec3c8b5e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2821,8 +2821,12 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
            }
            callbackWct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token, false);
            mWindowDecorViewModel.ifPresent(viewModel -> {
                if (finalMainChild != null) {
                    viewModel.onTaskInfoChanged(finalMainChild.getTaskInfo());
                }
                if (finalSideChild != null) {
                    viewModel.onTaskInfoChanged(finalSideChild.getTaskInfo());
                }
            });
            mPausingTasks.clear();
        });
+4 −2
Original line number Diff line number Diff line
@@ -1180,10 +1180,12 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
                                                : SPLIT_POSITION_TOP_OR_LEFT;
                                final RunningTaskInfo oppositeTaskInfo =
                                        mSplitScreenController.getTaskInfo(oppositePosition);
                                if (oppositeTaskInfo != null) {
                                    mWindowDecorByTaskId.get(oppositeTaskInfo.taskId)
                                            .disposeStatusBarInputLayer();
                                }
                            }
                        }
                        mMoveToDesktopAnimator = null;
                        return;
                    } else {