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

Commit 29b82740 authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: don't reinflate search view on rotate



Change-Id: I027c7e0b4e9c22577ad6709253f692fe958af32e
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 9173974d
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -1091,12 +1091,14 @@ public abstract class BaseStatusBar extends SystemUI implements
            mWindowManager.removeView(mSearchPanelView);
        }

        if (mSearchPanelView == null) {
            // Provide SearchPanel with a temporary parent to allow layout params to work.
            LinearLayout tmpRoot = new LinearLayout(mContext);
            mSearchPanelView = (SearchPanelView) LayoutInflater.from(mContext).inflate(
                    R.layout.status_bar_search_panel, tmpRoot, false);
            mSearchPanelView.setOnTouchListener(
                    new TouchOutsideListener(MSG_CLOSE_SEARCH_PANEL, mSearchPanelView));
        }
        mSearchPanelView.setVisibility(View.GONE);
        boolean vertical = mNavigationBarView != null && mNavigationBarView.isVertical();
        mSearchPanelView.setHorizontal(vertical);