Skip to content

Commit 70e7d92

Browse files
authored
Merge pull request #9079 from asoucar/cleanup-activity-access
Narrow Search intent usage
2 parents 815170f + a09cf6a commit 70e7d92

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,15 @@ open class MessageList :
407407
}
408408
}
409409
}
410-
411410
private fun decodeExtras(intent: Intent): Boolean {
412-
val launchData = decodeExtrasToLaunchData(intent)
411+
if (intent.action === Intent.ACTION_SEARCH && !intent.component?.className.equals(
412+
Search::class.java.name,
413+
)
414+
) {
415+
finish()
416+
}
413417

418+
val launchData = decodeExtrasToLaunchData(intent)
414419
// If Unified Inbox was disabled show default account instead
415420
val search = if (launchData.search.isUnifiedInbox && !K9.isShowUnifiedInbox) {
416421
createDefaultLocalSearch()
@@ -1186,7 +1191,6 @@ open class MessageList :
11861191
expandSearchView()
11871192
return true
11881193
}
1189-
11901194
override fun startSearch(query: String, account: LegacyAccount?, folderId: Long?): Boolean {
11911195
// If this search was started from a MessageList of a single folder, pass along that folder info
11921196
// so that we can enable remote search.

0 commit comments

Comments
 (0)