am f279269a: am 055a8585: Merge "Do not attempt to start action mode if there is no parent." into honeycomb-mr1

* commit 'f279269a4c2e86092b99b67766b9fc1077f2526d':
  Do not attempt to start action mode if there is no parent.
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index e3f2436..fcec6d8 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3006,7 +3006,8 @@
     }
 
     /**
-     * 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.
@@ -3016,7 +3017,7 @@
      */
     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;
         }