am ab68bbaf: Merge "add flag to websearch intent" into jb-dev

* commit 'ab68bbaf26cd526f6a5b8928533356d1f0fc7886':
  add flag to websearch intent
This commit is contained in:
Michael Kolb
2012-05-21 14:17:06 -07:00
committed by Android Git Automerger

View File

@@ -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;