[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-147.0a1-16.0-2] 2 commits: fixup! TB 42247: Android helpers for the TorProvider



Title: GitLab

clairehurst pushed to branch tor-browser-147.0a1-16.0-2 at The Tor Project / Applications / Tor Browser

Commits:

  • 5eb4ba41
    by Dan Ballard at 2026-02-05T13:09:54-07:00
    fixup! TB 42247: Android helpers for the TorProvider
    
    Bug 43645: wiring in proper call to shutdown the tor process
    
  • c9a70495
    by Dan Ballard at 2026-02-05T13:09:54-07:00
    fixup! TB 41878: [android] Add standalone Tor Bootstrap
    
    Bug 43645: wire in call to shutdown tor process onDestroy
    

4 changed files:

Changes:

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
    ... ... @@ -184,6 +184,7 @@ import mozilla.components.browser.engine.gecko.GeckoEngine
    184 184
     import org.mozilla.fenix.compose.core.Action
    
    185 185
     import org.mozilla.fenix.compose.snackbar.SnackbarState
    
    186 186
     import org.mozilla.fenix.compose.snackbar.Snackbar
    
    187
    +import org.mozilla.fenix.tor.TorController
    
    187 188
     import org.mozilla.fenix.tor.UrlQuickLoadViewModel
    
    188 189
     import org.mozilla.geckoview.TorAndroidIntegration.BootstrapStateChangeListener
    
    189 190
     import org.mozilla.geckoview.TorConnectStage
    
    ... ... @@ -1586,6 +1587,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
    1586 1587
             // If we don't manually stop the service, the persistent "close tabs" notification sometimes does not clear
    
    1587 1588
             applicationContext.stopService(Intent(applicationContext, PrivateNotificationService::class.java))
    
    1588 1589
             finishAndRemoveTask()
    
    1590
    +        components.torController.shutdown()
    
    1589 1591
             exitProcess(0)
    
    1590 1592
         }
    
    1591 1593
     }

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorController.kt
    ... ... @@ -38,4 +38,5 @@ interface TorController {
    38 38
     
    
    39 39
         fun initiateTorBootstrap(lifecycleScope: LifecycleCoroutineScope? = null, withDebugLogging: Boolean = false)
    
    40 40
         fun stopTor()
    
    41
    +    fun shutdown()
    
    41 42
     }

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerGV.kt
    ... ... @@ -176,6 +176,10 @@ class TorControllerGV(
    176 176
             getTorIntegration().cancelBootstrap()
    
    177 177
         }
    
    178 178
     
    
    179
    +    override fun shutdown() {
    
    180
    +        getTorIntegration().shutdown()
    
    181
    +    }
    
    182
    +
    
    179 183
         // TorEventsBootstrapStateChangeListener
    
    180 184
         override fun onBootstrapStageChange(stage: TorConnectStage) {
    
    181 185
             Log.d(TAG, "onBootstrapStageChange(stage = $stage)")
    

  • mobile/android/geckoview/src/main/java/org/mozilla/geckoview/TorAndroidIntegration.java
    ... ... @@ -105,8 +105,8 @@ public class TorAndroidIntegration implements BundleEventListener {
    105 105
         registerListener();
    
    106 106
       }
    
    107 107
     
    
    108
    -  /* package */ synchronized void shutdown() {
    
    109
    -    // FIXME: It seems this never gets called
    
    108
    +  // To be called when the app is shutting down only
    
    109
    +  public synchronized void shutdown() {
    
    110 110
         if (mTorProcess != null) {
    
    111 111
           mTorProcess.shutdown();
    
    112 112
           mTorProcess = null;
    
    ... ... @@ -332,7 +332,7 @@ public class TorAndroidIntegration implements BundleEventListener {
    332 332
               Log.i(TAG, "[tor-" + mHandle + "] " + line);
    
    333 333
             }
    
    334 334
           } catch (IOException e) {
    
    335
    -        Log.e(TAG, "Failed to read stdout of the tor process " + mHandle, e);
    
    335
    +        Log.e(TAG, "Failed to read stdout of the tor process " + mHandle + " (expected when program is exiting)", e);
    
    336 336
           }
    
    337 337
           Log.d(TAG, "Exiting the stdout loop for process " + mHandle);
    
    338 338
           final GeckoBundle data = new GeckoBundle(2);
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx