[tbb-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] 2 commits: fixup! Enable the connect assist experiments on alpha

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Mon Apr 15 15:58:21 UTC 2024



Pier Angelo Vendrame pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android


Commits:
4a8875f4 by Pier Angelo Vendrame at 2024-04-09T20:09:45+02:00
fixup! Enable the connect assist experiments on alpha

Bug 42479: Improve TorConnect error handling

Updated the prototype of onBootstrapError.

- - - - -
c2db7c96 by Pier Angelo Vendrame at 2024-04-11T10:58:42+02:00
fixup! Add Tor integration and UI

Bug 42479: Improve TorConnect error handling

Updated the prototype of onBootstrapError.

- - - - -


3 changed files:

- fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
- fenix/app/src/main/java/org/mozilla/fenix/tor/TorController.kt
- fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerGV.kt


Changes:

=====================================
fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
=====================================
@@ -1383,12 +1383,12 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorIn
     }
 
     override fun onBootstrapStateChange(state: String) = Unit
-    override fun onBootstrapProgress(progress: Double, status: String, hasWarnings: Boolean) = Unit
+    override fun onBootstrapProgress(progress: Double, hasWarnings: Boolean) = Unit
     override fun onBootstrapComplete() {
         components.useCases.tabsUseCases.removeAllTabs()
         navHost.navController.navigate(NavGraphDirections.actionStartupHome())
     }
-    override fun onBootstrapError(message: String, details: String) = Unit
+    override fun onBootstrapError(code: String?, message: String?, phase: String?, reason: String?) = Unit
     override fun onSettingsRequested() {
         navHost.navController.navigate(NavGraphDirections.actionGlobalSettingsFragment())
     }


=====================================
fenix/app/src/main/java/org/mozilla/fenix/tor/TorController.kt
=====================================
@@ -14,7 +14,9 @@ interface TorEvents {
 }
 class TorError(
     var message: String,
-    var details: String
+    var details: String,
+    var phase: String,
+    var reason: String,
 ) { }
 
 interface TorLogs {


=====================================
fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerGV.kt
=====================================
@@ -301,8 +301,8 @@ class TorControllerGV(
     }
 
     // TorEventsBootstrapStateChangeListener
-    override fun onBootstrapProgress(progress: Double, status: String?, hasWarnings: Boolean) {
-        Log.d(TAG, "onBootstrapProgress($progress, $status, $hasWarnings)")
+    override fun onBootstrapProgress(progress: Double, hasWarnings: Boolean) {
+        Log.d(TAG, "onBootstrapProgress($progress, $hasWarnings)")
         if (progress == 100.0) {
             lastKnownStatus = TorConnectState.Bootstrapped
             wasTorBootstrapped = true
@@ -312,7 +312,7 @@ class TorControllerGV(
             onTorConnecting()
 
         }
-        onTorStatusUpdate(status, lastKnownStatus.toTorStatus().status, progress)
+        onTorStatusUpdate("", lastKnownStatus.toTorStatus().status, progress)
     }
 
     // TorEventsBootstrapStateChangeListener
@@ -322,8 +322,8 @@ class TorControllerGV(
     }
 
     // TorEventsBootstrapStateChangeListener
-    override fun onBootstrapError(message: String?, details: String?) {
-        lastKnownError = TorError(message ?: "", details ?: "")
+    override fun onBootstrapError(code: String?, message: String?, phase: String?, reason: String?) {
+        lastKnownError = TorError(code ?: "", message ?: "", phase ?: "", reason ?: "")
         onBootstrapStateChange(TorConnectState.Error.state)
     }
 



View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/compare/7e46e5e3c7a3b8eb37bab035b35aba0499ed962a...c2db7c965697bf8dc76e16f43662e6784e86b98f

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/compare/7e46e5e3c7a3b8eb37bab035b35aba0499ed962a...c2db7c965697bf8dc76e16f43662e6784e86b98f
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20240415/7be5c5eb/attachment-0001.htm>


More information about the tbb-commits mailing list