Skip to content
Snippets Groups Projects
Commit 66e58a7c authored by clairehurst's avatar clairehurst Committed by Pier Angelo Vendrame
Browse files

fixup! TB 41878: [android] Add standalone Tor Bootstrap

parent 351a2616
1 merge request!1500TB 43415: Rebased onto 134.0a1
......@@ -139,8 +139,6 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
isDeviceRamAboveThreshold()
}
var terminating = false
open val components by lazy { Components(this) }
var visibilityLifecycleCallback: VisibilityLifecycleCallback? = null
......@@ -190,21 +188,6 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
}
}
fun isTerminating() = terminating
fun terminate() {
onTerminate()
System.exit(0)
}
override fun onTerminate() {
terminating = true
super.onTerminate()
components.torController.stop()
components.torController.stopTor()
}
@OptIn(DelicateCoroutinesApi::class) // GlobalScope usage
@VisibleForTesting
protected open fun initializeGlean() {
......
......
......@@ -722,15 +722,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
if (this !is ExternalAppBrowserActivity && !activityStartedWithLink) {
stopMediaSession()
}
if (isFinishing && !(application as FenixApplication).isTerminating()) {
// We assume the Activity is being destroyed because the user
// swiped away the app on the Recent screen. When this happens,
// we assume the user expects the entire Application is destroyed
// and not only the top Activity/Task. Therefore we kill the
// underlying Application, as well.
(application as FenixApplication).terminate()
}
}
final override fun onConfigurationChanged(newConfig: Configuration) {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment