File tree Expand file tree Collapse file tree
core/src/main/java/com/omega_r/libs/omegaintentbuilder/builders Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com.omega_r.libs.omegaintentbuilder.builders
22
3- import android.app.SearchManager
3+ import android.app.SearchManager.QUERY
44import android.content.Context
55import android.content.Intent
66
@@ -9,6 +9,9 @@ class SearchWebIntentBuilder : BaseActivityBuilder() {
99
1010 /* *
1111 * Set the query to the web browser
12+ * is the text to search for. If it is a url starts with http or https,
13+ * the site will be opened.
14+ * If it is plain text, Google search will be applied.
1215 *
1316 * @param query String
1417 * @return This SearchWebIntentBuilder for method chaining
@@ -21,7 +24,7 @@ class SearchWebIntentBuilder : BaseActivityBuilder() {
2124 override fun createIntent (context : Context ): Intent {
2225 return Intent (Intent .ACTION_WEB_SEARCH ).apply {
2326 query?.let {
24- putExtra(SearchManager . QUERY , query)
27+ putExtra(QUERY , query)
2528 }
2629 }
2730 }
You can’t perform that action at this time.
0 commit comments