Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fe0bca0 authored by Michael Kolb's avatar Michael Kolb
Browse files

add flag to websearch intent

  Bug: 6372537

Change-Id: Ia3f8577ffdde2df5234016dd8d9ca83265b53e5e
parent d7ba8143
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;