From eb5cdcd7ec9f41332116097cdf355c61951be1ba Mon Sep 17 00:00:00 2001 From: Arturo Mejia Date: Tue, 24 Mar 2020 16:19:56 -0400 Subject: [PATCH] For issue #9364 Crash when blocking app permissions and returning to the app --- .../settings/sitepermissions/SitePermissionsFragment.kt | 6 +----- .../SitePermissionsManagePhoneFeatureFragment.kt | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsFragment.kt index 2458987aa..41608d210 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsFragment.kt @@ -18,17 +18,13 @@ import org.mozilla.fenix.settings.PhoneFeature @SuppressWarnings("TooManyFunctions") class SitePermissionsFragment : PreferenceFragmentCompat() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - showToolbar(getString(R.string.preferences_site_permissions)) - } - override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.site_permissions_preferences, rootKey) } override fun onResume() { super.onResume() + showToolbar(getString(R.string.preferences_site_permissions)) setupPreferences() } diff --git a/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsManagePhoneFeatureFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsManagePhoneFeatureFragment.kt index 83f3249f7..d21adccac 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsManagePhoneFeatureFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsManagePhoneFeatureFragment.kt @@ -57,8 +57,6 @@ class SitePermissionsManagePhoneFeatureFragment : Fragment() { phoneFeature = SitePermissionsManagePhoneFeatureFragmentArgs .fromBundle(requireArguments()) .permission.toPhoneFeature() - - showToolbar(phoneFeature.getLabel(requireContext())) settings = requireContext().settings() } @@ -84,6 +82,7 @@ class SitePermissionsManagePhoneFeatureFragment : Fragment() { override fun onResume() { super.onResume() + showToolbar(phoneFeature.getLabel(requireContext())) initBlockedByAndroidView(phoneFeature, blockedByAndroidView) }