tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 0caa00916e637d3c4e990db75d8fb94e93c99ceb
parent ed80d8fce738203f4d18068a7f06296332e5ae33
Author: fmasalha <fmasalha@mozilla.com>
Date:   Fri, 31 Oct 2025 20:05:30 +0000

Bug 1997616 - Added a isNightlyOrDebug feature gate to startupcrash flow r=android-reviewers,matt-tighe

Differential Revision: https://phabricator.services.mozilla.com/D270878

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -158,6 +158,11 @@ open class FenixApplication : LocaleAwareApplication(), Provider { setupInAllProcesses() + // If the main process crashes before we've reached visual completeness, we consider it to + // be a startup crash and fork into the recovery flow. The activity that is responsible for + // that flow is hosted in a separate process, which means that we avoid the majority of + // initialization work that is done in `setupInMainProcess` + // Please see the README.md in the fenix/startupCrash package for more information. if (!isMainProcess()) { // If this is not the main process then do not continue with the initialization here. Everything that // follows only needs to be done in our app's main process and should not be done in other processes like @@ -167,6 +172,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider { } // DO NOT ADD ANYTHING ABOVE HERE. + // Note: That the startup crash recovery flow is hosted in a different process, + // so this call will be avoided in that case setupInMainProcessOnly() // DO NOT ADD ANYTHING UNDER HERE. @@ -510,7 +517,11 @@ open class FenixApplication : LocaleAwareApplication(), Provider { } private fun handleCaughtException() { - if (isMainProcess() && !components.performance.visualCompletenessQueue.isReady()) { + if ( + isMainProcess() && + Config.channel.isNightlyOrDebug && + !components.performance.visualCompletenessQueue.isReady() + ) { val intent = Intent(applicationContext, StartupCrashActivity::class.java) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)