diff --git a/app/src/main/java/org/mozilla/reference/browser/BrowserActivity.kt b/app/src/main/java/org/mozilla/reference/browser/BrowserActivity.kt index 7fb3b7807..178a10efa 100644 --- a/app/src/main/java/org/mozilla/reference/browser/BrowserActivity.kt +++ b/app/src/main/java/org/mozilla/reference/browser/BrowserActivity.kt @@ -85,7 +85,7 @@ open class BrowserActivity : AppCompatActivity() { } } - super.onBackPressed() + super.onBackPressedDispatcher.onBackPressed() removeSessionIfNeeded() } diff --git a/app/src/main/java/org/mozilla/reference/browser/addons/WebExtensionActionPopupActivity.kt b/app/src/main/java/org/mozilla/reference/browser/addons/WebExtensionActionPopupActivity.kt index 051603da6..6be53ab4e 100644 --- a/app/src/main/java/org/mozilla/reference/browser/addons/WebExtensionActionPopupActivity.kt +++ b/app/src/main/java/org/mozilla/reference/browser/addons/WebExtensionActionPopupActivity.kt @@ -98,7 +98,7 @@ class WebExtensionActionPopupActivity : AppCompatActivity() { override fun onWindowRequest(windowRequest: WindowRequest) { if (windowRequest.type == WindowRequest.Type.CLOSE) { - activity?.onBackPressed() + activity?.onBackPressedDispatcher?.onBackPressed() } } diff --git a/app/src/main/java/org/mozilla/reference/browser/settings/SettingsActivity.kt b/app/src/main/java/org/mozilla/reference/browser/settings/SettingsActivity.kt index cfb12b256..2d30e65ce 100644 --- a/app/src/main/java/org/mozilla/reference/browser/settings/SettingsActivity.kt +++ b/app/src/main/java/org/mozilla/reference/browser/settings/SettingsActivity.kt @@ -40,7 +40,7 @@ class SettingsActivity : AppCompatActivity(), SettingsFragment.ActionBarUpdater if (it is UserInteractionHandler && it.onBackPressed()) { return } else { - super.onBackPressed() + super.onBackPressedDispatcher.onBackPressed() } } }