Skip to content

Commit cd2ee58

Browse files
committed
refactor
1 parent 52e1926 commit cd2ee58

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

core/src/main/java/com/omega_r/libs/omegaintentbuilder/builders/SearchWebIntentBuilder.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.omega_r.libs.omegaintentbuilder.builders
22

3-
import android.app.SearchManager
3+
import android.app.SearchManager.QUERY
44
import android.content.Context
55
import 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
}

0 commit comments

Comments
 (0)