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

Commit c0c18caf authored by Philip Quinn's avatar Philip Quinn
Browse files

Null-check mNavigationBar when returning its view.

Without this check there's no way to avoid a NullPointerException if
getNavigationBarView() is called before the navigation bar fragment is
created.

Bug: 36852229
Bug: 37330416
Bug: 37331698
Fixes: 36508501
Test: make -j; cannot reproduce bugs.
Change-Id: Ia3c9b4eaea26b78cdc39a446918047eb1f440d70
parent 3242ee79
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4562,7 +4562,7 @@ public class StatusBar extends SystemUI implements DemoMode,

    // TODO: Figure out way to remove these.
    public NavigationBarView getNavigationBarView() {
        return (NavigationBarView) mNavigationBar.getView();
        return (mNavigationBar != null ? (NavigationBarView) mNavigationBar.getView() : null);
    }

    public KeyguardBottomAreaView getKeyguardBottomAreaView() {