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

Commit 373bc292 authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE for devices w/out soft-nav." into klp-dev

parents f1c3f28e f6b63977
Loading
Loading
Loading
Loading
+17 −10
Original line number Diff line number Diff line
@@ -668,8 +668,10 @@ public class PhoneStatusBar extends BaseStatusBar {
    @Override
    protected void updateSearchPanel() {
        super.updateSearchPanel();
        if (mNavigationBarView != null) {
            mNavigationBarView.setDelegateView(mSearchPanelView);
        }
    }

    @Override
    public void showSearchPanel() {
@@ -679,20 +681,24 @@ public class PhoneStatusBar extends BaseStatusBar {
        // we want to freeze the sysui state wherever it is
        mSearchPanelView.setSystemUiVisibility(mSystemUiVisibility);

        if (mNavigationBarView != null) {
            WindowManager.LayoutParams lp =
                (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
            lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
            mWindowManager.updateViewLayout(mNavigationBarView, lp);
        }
    }

    @Override
    public void hideSearchPanel() {
        super.hideSearchPanel();
        if (mNavigationBarView != null) {
            WindowManager.LayoutParams lp =
                (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
            lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
            mWindowManager.updateViewLayout(mNavigationBarView, lp);
        }
    }

    protected int getStatusBarGravity() {
        return Gravity.TOP | Gravity.FILL_HORIZONTAL;
@@ -1897,7 +1903,8 @@ public class PhoneStatusBar extends BaseStatusBar {
                    mStatusBarWindowState);

            // update navigation bar mode
            int nbMode = updateBarMode(oldVal, newVal, mNavigationBarView.getBarTransitions(),
            int nbMode = mNavigationBarView == null ? -1 : updateBarMode(
                    oldVal, newVal, mNavigationBarView.getBarTransitions(),
                    View.NAVIGATION_BAR_TRANSIENT, View.SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION,
                    mNavigationBarWindowState);