Do not remove the embedded title bar when starting Find.
Bug:2927138 Change-Id: I97adb4431aedca172a5951d727ad559de5101924
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user