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

Commit 7b5208aa authored by Winson Chung's avatar Winson Chung
Browse files

Fix NPE from StageLayout not being initialized

- The StageLayout is only created when the split root task is created,
  but the ShellDropTarget is added immediately when SysUI starts and
  there can be a race where the left/right split state is queried
  before the split root is fully created

Bug: 314089952
Test: Presubmit
Change-Id: Ie3ffcc4d87f4fbc692b901e6501c588b013b692a
parent f0d16342
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2210,7 +2210,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
     * create a top-bottom split.
     */
    boolean isLeftRightSplit() {
        return mSplitLayout.isLeftRightSplit();
        return mSplitLayout != null && mSplitLayout.isLeftRightSplit();
    }

    /**