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

Commit 2ac445cb authored by Leon Scroggins's avatar Leon Scroggins
Browse files

Do not remove the embedded title bar when starting Find.

Bug:2927138
Change-Id: I97adb4431aedca172a5951d727ad559de5101924
parent 2226a19f
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher,
    private Resources mResources;
    private boolean mMatchesFound;
    private int mNumberOfMatches;
    private View mTitleBar;
    private ActionMode mActionMode;

    FindActionModeCallback(Context context) {
@@ -62,8 +61,6 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher,
        mResources = context.getResources();
    }

    void setTitleBar(View v) { mTitleBar = v; }

    void finish() {
        mActionMode.finish();
    }
@@ -174,7 +171,6 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher,

    @Override
    public void onDestroyActionMode(ActionMode mode) {
        if (mTitleBar != null) mWebView.setEmbeddedTitleBar(mTitleBar);
        mWebView.notifyFindDialogDismissed();
        mInput.hideSoftInputFromWindow(mWebView.getWindowToken(), 0);
    }
+0 −12
Original line number Diff line number Diff line
@@ -2253,13 +2253,6 @@ public class WebView extends AbsoluteLayout
     * @hide
     */
    public void setEmbeddedTitleBar(View v) {
        if (null == v) {
            // If one of our callbacks is holding onto the titlebar to replace
            // it when its ActionMode ends, remove it.
            if (mFindCallback != null) {
                mFindCallback.setTitleBar(null);
            }
        }
        if (mTitleBar == v) return;
        if (mTitleBar != null) {
            removeView(mTitleBar);
@@ -2894,11 +2887,6 @@ public class WebView extends AbsoluteLayout
        setFindIsUp(true);
        mFindCallback.setWebView(this);
        View titleBar = mTitleBar;
        // We do not want to show the embedded title bar during find or
        // select, but keep track of it so that it can be replaced when the
        // mode is exited.
        setEmbeddedTitleBar(null);
        mFindCallback.setTitleBar(titleBar);
        startActionMode(mFindCallback);
        if (text == null) {
            text = mLastFind;