summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2011-03-08 09:06:54 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-08 09:06:54 -0800
commit055a858562e04c903988d09973accc8aeeece02c (patch)
tree7f4ea5e4b31ad87418f72798c9af9647ecc89e81 /core
parent102930a0deaf8280a65321de0d6c120a638da9e2 (diff)
parent93553d7fb32cf888806bff8e179d724b53d43bbd (diff)
downloadframeworks_base-055a858562e04c903988d09973accc8aeeece02c.zip
frameworks_base-055a858562e04c903988d09973accc8aeeece02c.tar.gz
frameworks_base-055a858562e04c903988d09973accc8aeeece02c.tar.bz2
Merge "Do not attempt to start action mode if there is no parent." into honeycomb-mr1
Diffstat (limited to 'core')
-rw-r--r--core/java/android/webkit/WebView.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index eb7269b..1316235 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3017,7 +3017,8 @@ public class WebView extends AbsoluteLayout
}
/**
- * Start an ActionMode for finding text in this WebView.
+ * Start an ActionMode for finding text in this WebView. Only works if this
+ * WebView is attached to the view system.
* @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.
@@ -3027,7 +3028,7 @@ public class WebView extends AbsoluteLayout
*/
public boolean showFindDialog(String text, boolean showIme) {
FindActionModeCallback callback = new FindActionModeCallback(mContext);
- if (startActionMode(callback) == null) {
+ if (getParent() == null || startActionMode(callback) == null) {
// Could not start the action mode, so end Find on page
return false;
}