Loading api/current.xml +4 −2 Original line number Diff line number Diff line Loading @@ -234695,7 +234695,7 @@ </parameter> </method> <method name="showFindDialog" return="void" return="boolean" abstract="false" native="false" synchronized="false" Loading @@ -234706,6 +234706,8 @@ > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="showIme" type="boolean"> </parameter> </method> <method name="stopLoading" return="void" Loading Loading @@ -257493,7 +257495,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface> core/java/android/webkit/FindActionModeCallback.java +4 −1 Original line number Diff line number Diff line Loading @@ -134,6 +134,10 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher, } } public void showSoftInput() { mInput.showSoftInput(mEditText, 0); } /* * Update the string which tells the user how many matches were found, and * which match is currently highlighted. Loading Loading @@ -165,7 +169,6 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher, mMatchesFound = false; mMatches.setText("0"); mEditText.requestFocus(); mInput.showSoftInput(mEditText, 0); return true; } Loading core/java/android/webkit/SelectActionModeCallback.java +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ class SelectActionModeCallback implements ActionMode.Callback { case com.android.internal.R.id.find: String sel= mWebView.getSelection(); mode.finish(); mWebView.showFindDialog(sel); mWebView.showFindDialog(sel, false); break; case com.android.internal.R.id.websearch: mode.finish(); Loading core/java/android/webkit/WebView.java +17 −3 Original line number Diff line number Diff line Loading @@ -2951,19 +2951,33 @@ public class WebView extends AbsoluteLayout * @param text If non-null, will be the initial text to search for. * Otherwise, the last String searched for in this WebView will * be used to start. * @param showIme If true, show the IME, assuming the user will begin typing. * If false and text is non-null, perform a find all. * @return boolean True if the find dialog is shown, false otherwise. */ public void showFindDialog(String text) { public boolean showFindDialog(String text, boolean showIme) { mFindCallback = new FindActionModeCallback(mContext); if (startActionMode(mFindCallback) == null) { // Could not start the action mode, so end Find on page mFindCallback = null; return false; } setFindIsUp(true); mFindCallback.setWebView(this); View titleBar = mTitleBar; startActionMode(mFindCallback); if (showIme) { mFindCallback.showSoftInput(); } else if (text != null) { mFindCallback.setText(text); mFindCallback.findAll(); return true; } if (text == null) { text = mLastFind; } if (text != null) { mFindCallback.setText(text); } return true; } /** Loading Loading
api/current.xml +4 −2 Original line number Diff line number Diff line Loading @@ -234695,7 +234695,7 @@ </parameter> </method> <method name="showFindDialog" return="void" return="boolean" abstract="false" native="false" synchronized="false" Loading @@ -234706,6 +234706,8 @@ > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="showIme" type="boolean"> </parameter> </method> <method name="stopLoading" return="void" Loading Loading @@ -257493,7 +257495,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface>
core/java/android/webkit/FindActionModeCallback.java +4 −1 Original line number Diff line number Diff line Loading @@ -134,6 +134,10 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher, } } public void showSoftInput() { mInput.showSoftInput(mEditText, 0); } /* * Update the string which tells the user how many matches were found, and * which match is currently highlighted. Loading Loading @@ -165,7 +169,6 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher, mMatchesFound = false; mMatches.setText("0"); mEditText.requestFocus(); mInput.showSoftInput(mEditText, 0); return true; } Loading
core/java/android/webkit/SelectActionModeCallback.java +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ class SelectActionModeCallback implements ActionMode.Callback { case com.android.internal.R.id.find: String sel= mWebView.getSelection(); mode.finish(); mWebView.showFindDialog(sel); mWebView.showFindDialog(sel, false); break; case com.android.internal.R.id.websearch: mode.finish(); Loading
core/java/android/webkit/WebView.java +17 −3 Original line number Diff line number Diff line Loading @@ -2951,19 +2951,33 @@ public class WebView extends AbsoluteLayout * @param text If non-null, will be the initial text to search for. * Otherwise, the last String searched for in this WebView will * be used to start. * @param showIme If true, show the IME, assuming the user will begin typing. * If false and text is non-null, perform a find all. * @return boolean True if the find dialog is shown, false otherwise. */ public void showFindDialog(String text) { public boolean showFindDialog(String text, boolean showIme) { mFindCallback = new FindActionModeCallback(mContext); if (startActionMode(mFindCallback) == null) { // Could not start the action mode, so end Find on page mFindCallback = null; return false; } setFindIsUp(true); mFindCallback.setWebView(this); View titleBar = mTitleBar; startActionMode(mFindCallback); if (showIme) { mFindCallback.showSoftInput(); } else if (text != null) { mFindCallback.setText(text); mFindCallback.findAll(); return true; } if (text == null) { text = mLastFind; } if (text != null) { mFindCallback.setText(text); } return true; } /** Loading