Pier Angelo Vendrame pushed to branch tor-browser-128.7.0esr-14.5-1 at The Tor Project / Applications / Tor Browser
Commits:
- 
14d735fe
by Dan Ballard at 2025-02-13T11:58:47-08:00
 - 
d94603fa
by Dan Ballard at 2025-02-13T12:00:18-08:00
 
4 changed files:
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
 - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerGV.kt
 - mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
 - mobile/android/geckoview/src/main/java/org/mozilla/geckoview/TorIntegrationAndroid.java → mobile/android/geckoview/src/main/java/org/mozilla/geckoview/TorAndroidIntegration.java
 
Changes:
| ... | ... | @@ -156,7 +156,7 @@ import mozilla.components.browser.engine.gecko.GeckoEngine | 
| 156 | 156 |  import org.mozilla.fenix.components.FenixSnackbar
 | 
| 157 | 157 |  import org.mozilla.fenix.home.HomeFragment
 | 
| 158 | 158 |  import org.mozilla.fenix.tor.TorConnectionAssistViewModel
 | 
| 159 | -import org.mozilla.geckoview.TorIntegrationAndroid
 | 
|
| 159 | +import org.mozilla.geckoview.TorAndroidIntegration
 | 
|
| 160 | 160 | |
| 161 | 161 |  /**
 | 
| 162 | 162 |   * The main activity of the application. The application is primarily a single Activity (this one)
 | 
| ... | ... | @@ -165,7 +165,7 @@ import org.mozilla.geckoview.TorIntegrationAndroid | 
| 165 | 165 |   * - browser screen
 | 
| 166 | 166 |   */
 | 
| 167 | 167 |  @SuppressWarnings("TooManyFunctions", "LargeClass", "LongMethod")
 | 
| 168 | -open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorIntegrationAndroid.BootstrapStateChangeListener {
 | 
|
| 168 | +open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorAndroidIntegration.BootstrapStateChangeListener {
 | 
|
| 169 | 169 |      private lateinit var binding: ActivityHomeBinding
 | 
| 170 | 170 |      lateinit var themeManager: ThemeManager
 | 
| 171 | 171 |      lateinit var browsingModeManager: BrowsingModeManager
 | 
| ... | ... | @@ -8,9 +8,9 @@ import kotlinx.coroutines.flow.MutableStateFlow | 
| 8 | 8 |  import kotlinx.coroutines.flow.StateFlow
 | 
| 9 | 9 |  import mozilla.components.browser.engine.gecko.GeckoEngine
 | 
| 10 | 10 |  import org.mozilla.fenix.ext.components
 | 
| 11 | -import org.mozilla.geckoview.TorIntegrationAndroid
 | 
|
| 12 | -import org.mozilla.geckoview.TorIntegrationAndroid.BootstrapStateChangeListener
 | 
|
| 13 | -import org.mozilla.geckoview.TorIntegrationAndroid.TorLogListener
 | 
|
| 11 | +import org.mozilla.geckoview.TorAndroidIntegration
 | 
|
| 12 | +import org.mozilla.geckoview.TorAndroidIntegration.BootstrapStateChangeListener
 | 
|
| 13 | +import org.mozilla.geckoview.TorAndroidIntegration.TorLogListener
 | 
|
| 14 | 14 |  import org.mozilla.geckoview.TorSettings
 | 
| 15 | 15 |  import org.mozilla.geckoview.TorSettings.BridgeBuiltinType
 | 
| 16 | 16 |  import org.mozilla.geckoview.TorSettings.BridgeSource
 | 
| ... | ... | @@ -73,7 +73,7 @@ class TorControllerGV( | 
| 73 | 73 |      override val isBootstrapped get() = isTorBootstrapped
 | 
| 74 | 74 |      override val isConnected get() = (_lastKnownStatus.value.isStarted() && !isTorRestarting)
 | 
| 75 | 75 | |
| 76 | -    private fun getTorIntegration(): TorIntegrationAndroid {
 | 
|
| 76 | +    private fun getTorIntegration(): TorAndroidIntegration {
 | 
|
| 77 | 77 |          return (context.components.core.engine as GeckoEngine).getTorIntegrationController()
 | 
| 78 | 78 |      }
 | 
| 79 | 79 | 
| ... | ... | @@ -244,7 +244,7 @@ public final class GeckoRuntime implements Parcelable { | 
| 244 | 244 |    private final ProfilerController mProfilerController;
 | 
| 245 | 245 |    private final GeckoScreenChangeListener mScreenChangeListener;
 | 
| 246 | 246 | |
| 247 | -  private TorIntegrationAndroid mTorIntegration;
 | 
|
| 247 | +  private TorAndroidIntegration mTorIntegration;
 | 
|
| 248 | 248 | |
| 249 | 249 |    private GeckoRuntime() {
 | 
| 250 | 250 |      mWebExtensionController = new WebExtensionController(this);
 | 
| ... | ... | @@ -495,7 +495,7 @@ public final class GeckoRuntime implements Parcelable { | 
| 495 | 495 |        mScreenChangeListener.enable();
 | 
| 496 | 496 |      }
 | 
| 497 | 497 | |
| 498 | -    mTorIntegration = new TorIntegrationAndroid(context);
 | 
|
| 498 | +    mTorIntegration = new TorAndroidIntegration(context);
 | 
|
| 499 | 499 | |
| 500 | 500 |      mProfilerController.addMarker(
 | 
| 501 | 501 |          "GeckoView Initialization START", mProfilerController.getProfilerTime());
 | 
| ... | ... | @@ -1015,7 +1015,7 @@ public final class GeckoRuntime implements Parcelable { | 
| 1015 | 1015 |     * Get the Tor integration controller for this runtime.
 | 
| 1016 | 1016 |     */
 | 
| 1017 | 1017 |    @UiThread
 | 
| 1018 | -  public @NonNull TorIntegrationAndroid getTorIntegrationController() {
 | 
|
| 1018 | +  public @NonNull TorAndroidIntegration getTorIntegrationController() {
 | 
|
| 1019 | 1019 |      return mTorIntegration;
 | 
| 1020 | 1020 |    }
 | 
| 1021 | 1021 | 
| ... | ... | @@ -29,8 +29,8 @@ import org.mozilla.gecko.util.EventCallback; | 
| 29 | 29 |  import org.mozilla.gecko.util.GeckoBundle;
 | 
| 30 | 30 |  import org.mozilla.geckoview.androidlegacysettings.TorLegacyAndroidSettings;
 | 
| 31 | 31 | |
| 32 | -public class TorIntegrationAndroid implements BundleEventListener {
 | 
|
| 33 | -  private static final String TAG = "TorIntegrationAndroid";
 | 
|
| 32 | +public class TorAndroidIntegration implements BundleEventListener {
 | 
|
| 33 | +  private static final String TAG = "TorAndroidIntegration";
 | 
|
| 34 | 34 | |
| 35 | 35 |    // Events we listen to
 | 
| 36 | 36 |    private static final String EVENT_TOR_START = "GeckoView:Tor:StartTor";
 | 
| ... | ... | @@ -88,7 +88,7 @@ public class TorIntegrationAndroid implements BundleEventListener { | 
| 88 | 88 |     */
 | 
| 89 | 89 |    private TorSettings mSettings = null;
 | 
| 90 | 90 | |
| 91 | -  /* package */ TorIntegrationAndroid(Context context) {
 | 
|
| 91 | +  /* package */ TorAndroidIntegration(Context context) {
 | 
|
| 92 | 92 |      mLibraryDir = context.getApplicationInfo().nativeLibraryDir;
 | 
| 93 | 93 |      mCacheDir = context.getCacheDir().getAbsolutePath();
 | 
| 94 | 94 |      mIpcDirectory = mCacheDir + "/tor-private";
 | 
| ... | ... | @@ -269,7 +269,7 @@ public class TorIntegrationAndroid implements BundleEventListener { | 
| 269 | 269 |      public void run() {
 | 
| 270 | 270 |        cleanIpcDirectory();
 | 
| 271 | 271 | |
| 272 | -      final String ipcDir = TorIntegrationAndroid.this.mIpcDirectory;
 | 
|
| 272 | +      final String ipcDir = TorAndroidIntegration.this.mIpcDirectory;
 | 
|
| 273 | 273 |        final ArrayList<String> args = new ArrayList<>();
 | 
| 274 | 274 |        args.add(mLibraryDir + "/libTor.so");
 | 
| 275 | 275 |        args.add("DisableNetwork");
 | 
| ... | ... | @@ -354,7 +354,7 @@ public class TorIntegrationAndroid implements BundleEventListener { | 
| 354 | 354 |      }
 | 
| 355 | 355 | |
| 356 | 356 |      private void cleanIpcDirectory() {
 | 
| 357 | -      File directory = new File(TorIntegrationAndroid.this.mIpcDirectory);
 | 
|
| 357 | +      File directory = new File(TorAndroidIntegration.this.mIpcDirectory);
 | 
|
| 358 | 358 |        if (!directory.isDirectory()) {
 | 
| 359 | 359 |          if (!directory.mkdirs()) {
 | 
| 360 | 360 |            Log.e(TAG, "Failed to create the IPC directory.");
 |