2
0
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:
Sebastian Kaspari 2020-09-16 16:29:01 +02:00
parent 12a0333419
commit e90ddb1f38
3 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -44,7 +44,7 @@ open class ExternalAppBrowserActivity : HomeActivity() {
customTabSessionId: String?
): NavDirections? {
if (customTabSessionId == null) {
finish()
finishAndRemoveTask()
return null
}

View File

@ -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() }
}
}