Merge "Do not store the find callback until action mode starts." into honeycomb
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 1768900..f98ad74 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -2961,12 +2961,12 @@
* @return boolean True if the find dialog is shown, false otherwise.
*/
public boolean showFindDialog(String text, boolean showIme) {
- mFindCallback = new FindActionModeCallback(mContext);
- if (startActionMode(mFindCallback) == null) {
+ FindActionModeCallback callback = new FindActionModeCallback(mContext);
+ if (startActionMode(callback) == null) {
// Could not start the action mode, so end Find on page
- mFindCallback = null;
return false;
}
+ mFindCallback = callback;
setFindIsUp(true);
mFindCallback.setWebView(this);
if (showIme) {