Loading core/java/android/webkit/SelectActionModeCallback.java +8 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.webkit; import android.app.SearchManager; import android.content.Intent; import android.provider.Browser; import android.webkit.WebView; import android.view.ActionMode; Loading Loading @@ -74,6 +76,12 @@ class SelectActionModeCallback implements ActionMode.Callback { mode.finish(); mWebView.showFindDialog(sel); break; case com.android.internal.R.id.websearch: mode.finish(); Intent i = new Intent(Intent.ACTION_WEB_SEARCH); i.putExtra(SearchManager.QUERY, mWebView.getSelection()); mWebView.getContext().startActivity(i); break; default: return false; Loading core/res/res/menu/webview_copy.xml +5 −0 Original line number Diff line number Diff line Loading @@ -34,5 +34,10 @@ android:title="@string/find" android:showAsAction="always|withText" /> <item android:id="@+id/websearch" android:icon="@drawable/ic_menu_search" android:title="@string/websearch" android:showAsAction="always|withText" /> </menu> core/res/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2622,6 +2622,8 @@ <string name="share">Share</string> <!-- ActionBar action to use the current selection to open the Find on page functionality [CHAR LIMIT=10]--> <string name="find">Find</string> <!-- ActionBar action to use the current selection to perform a web search [CHAR-LIMIT=16] --> <string name="websearch">Web Search</string> <!-- Network positioning notification ticker. The name of the user (e.g. John Doe) who sent the request is shown as a dynamic string. --> Loading Loading
core/java/android/webkit/SelectActionModeCallback.java +8 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.webkit; import android.app.SearchManager; import android.content.Intent; import android.provider.Browser; import android.webkit.WebView; import android.view.ActionMode; Loading Loading @@ -74,6 +76,12 @@ class SelectActionModeCallback implements ActionMode.Callback { mode.finish(); mWebView.showFindDialog(sel); break; case com.android.internal.R.id.websearch: mode.finish(); Intent i = new Intent(Intent.ACTION_WEB_SEARCH); i.putExtra(SearchManager.QUERY, mWebView.getSelection()); mWebView.getContext().startActivity(i); break; default: return false; Loading
core/res/res/menu/webview_copy.xml +5 −0 Original line number Diff line number Diff line Loading @@ -34,5 +34,10 @@ android:title="@string/find" android:showAsAction="always|withText" /> <item android:id="@+id/websearch" android:icon="@drawable/ic_menu_search" android:title="@string/websearch" android:showAsAction="always|withText" /> </menu>
core/res/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2622,6 +2622,8 @@ <string name="share">Share</string> <!-- ActionBar action to use the current selection to open the Find on page functionality [CHAR LIMIT=10]--> <string name="find">Find</string> <!-- ActionBar action to use the current selection to perform a web search [CHAR-LIMIT=16] --> <string name="websearch">Web Search</string> <!-- Network positioning notification ticker. The name of the user (e.g. John Doe) who sent the request is shown as a dynamic string. --> Loading