summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2012-05-21 09:38:59 -0700
committerMichael Kolb <kolby@google.com>2012-05-21 09:40:17 -0700
commit3fe0bca0c34d5f33690fa365918cbaa4a7e3dd8e (patch)
tree46e821089fe52ce887492cbc9f3ff2fbb135864f
parentd7ba81437020b45f8f33fef729820078b1cd2547 (diff)
downloadframeworks_base-3fe0bca0c34d5f33690fa365918cbaa4a7e3dd8e.zip
frameworks_base-3fe0bca0c34d5f33690fa365918cbaa4a7e3dd8e.tar.gz
frameworks_base-3fe0bca0c34d5f33690fa365918cbaa4a7e3dd8e.tar.bz2
add flag to websearch intent
Bug: 6372537 Change-Id: Ia3f8577ffdde2df5234016dd8d9ca83265b53e5e
-rw-r--r--core/java/android/webkit/SelectActionModeCallback.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/webkit/SelectActionModeCallback.java b/core/java/android/webkit/SelectActionModeCallback.java
index 57628d3..f9f5b03 100644
--- a/core/java/android/webkit/SelectActionModeCallback.java
+++ b/core/java/android/webkit/SelectActionModeCallback.java
@@ -16,6 +16,7 @@
package android.webkit;
+import android.app.Activity;
import android.app.SearchManager;
import android.content.ClipboardManager;
import android.content.Context;
@@ -122,6 +123,9 @@ class SelectActionModeCallback implements ActionMode.Callback {
Intent i = new Intent(Intent.ACTION_WEB_SEARCH);
i.putExtra(SearchManager.EXTRA_NEW_SEARCH, true);
i.putExtra(SearchManager.QUERY, mWebView.getSelection());
+ if (!(mWebView.getContext() instanceof Activity)) {
+ i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ }
mWebView.getContext().startActivity(i);
break;