mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] Issue https://github.com/mozilla-mobile/fenix/issues/14225: Remove task when finishing ExternalAppBrowserActivity.
This commit is contained in:
parent
12a0333419
commit
e90ddb1f38
@ -89,7 +89,7 @@ class CustomTabsIntegration(
|
||||
menuItemIndex = START_OF_MENU_ITEMS_INDEX,
|
||||
window = activity.window,
|
||||
shareListener = { onItemTapped.invoke(ToolbarMenu.Item.Share) },
|
||||
closeListener = { activity.finish() }
|
||||
closeListener = { activity.finishAndRemoveTask() }
|
||||
)
|
||||
|
||||
override fun start() = feature.start()
|
||||
|
@ -44,7 +44,7 @@ open class ExternalAppBrowserActivity : HomeActivity() {
|
||||
customTabSessionId: String?
|
||||
): NavDirections? {
|
||||
if (customTabSessionId == null) {
|
||||
finish()
|
||||
finishAndRemoveTask()
|
||||
return null
|
||||
}
|
||||
|
||||
|
@ -58,10 +58,10 @@ class ExternalAppBrowserActivityTest {
|
||||
|
||||
var directions = activity.getNavDirections(BrowserDirection.FromGlobal, "id")
|
||||
assertNotNull(directions)
|
||||
verify(exactly = 0) { activity.finish() }
|
||||
verify(exactly = 0) { activity.finishAndRemoveTask() }
|
||||
|
||||
directions = activity.getNavDirections(BrowserDirection.FromGlobal, null)
|
||||
assertNull(directions)
|
||||
verify { activity.finish() }
|
||||
verify { activity.finishAndRemoveTask() }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user