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

Verified Commit 44c4c306 authored by Kshitij's avatar Kshitij Committed by Saalim Quadri
Browse files

fix: NPE on Launcher inflate in landscape

parent 87b6509f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -440,8 +440,11 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
            // Get "safe" drawable inset to not overlap gesture pill
            int safeBottomInset;
            WindowInsets rootInsets = mLauncher.getWindow().getDecorView().getRootWindowInsets();
            // rootInsets may be null in case launcher restarts and view hasn't yet been inflated
            if (rootInsets != null) {
                safeBottomInset = rootInsets.getInsetsIgnoringVisibility(WindowInsets.Type.systemBars()).bottom;
                lp.bottomMargin = safeBottomInset;
            }
        } else {
            lp.bottomMargin = grid.hotseatBarSizePx;
        }