From 2ac445cbb736f405695abaed1232969a4e2c7728 Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Wed, 1 Dec 2010 14:02:25 -0500 Subject: Do not remove the embedded title bar when starting Find. Bug:2927138 Change-Id: I97adb4431aedca172a5951d727ad559de5101924 --- core/java/android/webkit/FindActionModeCallback.java | 4 ---- core/java/android/webkit/WebView.java | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/core/java/android/webkit/FindActionModeCallback.java b/core/java/android/webkit/FindActionModeCallback.java index 27043e0474cf..641604ea65e1 100644 --- a/core/java/android/webkit/FindActionModeCallback.java +++ b/core/java/android/webkit/FindActionModeCallback.java @@ -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); } diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index b8ccf4543b99..27a4b6da9563 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -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; -- cgit v1.2.3-59-g8ed1b