From efc57762f69dd1556fdee85009ab07d9c1297769 Mon Sep 17 00:00:00 2001 From: Mugurell Date: Thu, 3 Feb 2022 11:33:46 +0200 Subject: [PATCH] For #22722 - Rename CrashReporterFragment to CrashContentView Rename in a separate patch for git to not merge this to previous changes and in such think that the the old file was deleted and a new one was created. --- .../fenix/crashes/CrashContentIntegration.kt | 4 ++-- ...rashReporterFragment.kt => CrashContentView.kt} | 6 ++++-- app/src/main/res/layout/fragment_browser.xml | 2 +- .../fenix/crashes/CrashContentIntegrationTest.kt | 4 ++-- ...rterFragmentTest.kt => CrashContentViewTest.kt} | 14 +++++++------- 5 files changed, 16 insertions(+), 14 deletions(-) rename app/src/main/java/org/mozilla/fenix/crashes/{CrashReporterFragment.kt => CrashContentView.kt} (90%) rename app/src/test/java/org/mozilla/fenix/crashes/{CrashReporterFragmentTest.kt => CrashContentViewTest.kt} (88%) diff --git a/app/src/main/java/org/mozilla/fenix/crashes/CrashContentIntegration.kt b/app/src/main/java/org/mozilla/fenix/crashes/CrashContentIntegration.kt index 4522733f83..5ff7d239b2 100644 --- a/app/src/main/java/org/mozilla/fenix/crashes/CrashContentIntegration.kt +++ b/app/src/main/java/org/mozilla/fenix/crashes/CrashContentIntegration.kt @@ -31,7 +31,7 @@ import org.mozilla.fenix.utils.Settings * @param toolbar [BrowserToolbar] that will be expanded when showing the in-app crash reporter. * @param isToolbarPlacedAtTop [Boolean] based allowing the in-app crash reporter to be shown as * immediately below or above the toolbar. - * @param crashReporterView [CrashReporterFragment] which will be shown if the current tab is marked as crashed. + * @param crashReporterView [CrashContentView] which will be shown if the current tab is marked as crashed. * @param components [Components] allowing interactions with other app features. * @param settings [Settings] allowing to check whether crash reporting is enabled or not. * @param navController [NavController] used to navigate to other parts of the app. @@ -43,7 +43,7 @@ class CrashContentIntegration( private val appStore: AppStore, private val toolbar: BrowserToolbar, private val isToolbarPlacedAtTop: Boolean, - private val crashReporterView: CrashReporterFragment, + private val crashReporterView: CrashContentView, private val components: Components, private val settings: Settings, private val navController: NavController, diff --git a/app/src/main/java/org/mozilla/fenix/crashes/CrashReporterFragment.kt b/app/src/main/java/org/mozilla/fenix/crashes/CrashContentView.kt similarity index 90% rename from app/src/main/java/org/mozilla/fenix/crashes/CrashReporterFragment.kt rename to app/src/main/java/org/mozilla/fenix/crashes/CrashContentView.kt index 6a5efe6e93..87a562a146 100644 --- a/app/src/main/java/org/mozilla/fenix/crashes/CrashReporterFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/crashes/CrashContentView.kt @@ -14,9 +14,11 @@ import org.mozilla.fenix.databinding.FragmentCrashReporterBinding import org.mozilla.fenix.ext.increaseTapArea /** - * Fragment shown when a tab crashes. + * View shown when a tab crashes. Intended to entirely overlay an EngineView. + * This will allow users to close or restore the current tab while optionally + * send all reports for non-fatal crashes or dismiss them. */ -class CrashReporterFragment @JvmOverloads constructor( +class CrashContentView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 diff --git a/app/src/main/res/layout/fragment_browser.xml b/app/src/main/res/layout/fragment_browser.xml index f943f980ad..e20e9f2a58 100644 --- a/app/src/main/res/layout/fragment_browser.xml +++ b/app/src/main/res/layout/fragment_browser.xml @@ -60,7 +60,7 @@ android:elevation="24dp" android:visibility="gone" /> -