File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
app/src/main/java/com/duckduckgo/widget
duckchat-api/src/main/java/com/duckduckgo/duckchat/api
duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ class SearchWidgetConfigurator @Inject constructor(
75
75
private fun buildDuckAiPendingIntent (
76
76
context : Context ,
77
77
): PendingIntent ? {
78
- val intent = duckChat.openDuckChatIntent ()
78
+ val intent = duckChat.createDuckChatIntent ()
79
79
if (intent == null ) {
80
80
return null
81
81
}
Original file line number Diff line number Diff line change @@ -37,11 +37,12 @@ interface DuckChat {
37
37
fun openDuckChat ()
38
38
39
39
/* *
40
- * Opens the DuckChat WebView with an intent.
40
+ * Creates an Intent that can be used to launch the DuckChat WebView.
41
+ * Does not actually open DuckChat, just prepares the Intent.
41
42
*
42
- * @return Intent to open DuckChat.
43
+ * @return Intent that can be used to open DuckChat, or null if DuckChat cannot be opened .
43
44
*/
44
- fun openDuckChatIntent (): Intent ?
45
+ fun createDuckChatIntent (): Intent ?
45
46
46
47
/* *
47
48
* Auto-prompts the DuckChat WebView with the provided [String] query.
Original file line number Diff line number Diff line change @@ -386,8 +386,8 @@ class RealDuckChat @Inject constructor(
386
386
openDuckChat(emptyMap())
387
387
}
388
388
389
- override fun openDuckChatIntent (): Intent ? {
390
- logcat { " Duck.ai: openDuckChatIntent " }
389
+ override fun createDuckChatIntent (): Intent ? {
390
+ logcat { " Duck.ai: createDuckChatIntent " }
391
391
val parameters = addChatParameters(" " , autoPrompt = false )
392
392
val url = appendParameters(parameters, duckChatLink)
393
393
You can’t perform that action at this time.
0 commit comments