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
-
c2db7c96
by Pier Angelo Vendrame at 2024-04-11T10:58:42+02:00
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:
... | ... | @@ -1383,12 +1383,12 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorIn |
1383 | 1383 | }
|
1384 | 1384 | |
1385 | 1385 | override fun onBootstrapStateChange(state: String) = Unit
|
1386 | - override fun onBootstrapProgress(progress: Double, status: String, hasWarnings: Boolean) = Unit
|
|
1386 | + override fun onBootstrapProgress(progress: Double, hasWarnings: Boolean) = Unit
|
|
1387 | 1387 | override fun onBootstrapComplete() {
|
1388 | 1388 | components.useCases.tabsUseCases.removeAllTabs()
|
1389 | 1389 | navHost.navController.navigate(NavGraphDirections.actionStartupHome())
|
1390 | 1390 | }
|
1391 | - override fun onBootstrapError(message: String, details: String) = Unit
|
|
1391 | + override fun onBootstrapError(code: String?, message: String?, phase: String?, reason: String?) = Unit
|
|
1392 | 1392 | override fun onSettingsRequested() {
|
1393 | 1393 | navHost.navController.navigate(NavGraphDirections.actionGlobalSettingsFragment())
|
1394 | 1394 | }
|
... | ... | @@ -14,7 +14,9 @@ interface TorEvents { |
14 | 14 | }
|
15 | 15 | class TorError(
|
16 | 16 | var message: String,
|
17 | - var details: String
|
|
17 | + var details: String,
|
|
18 | + var phase: String,
|
|
19 | + var reason: String,
|
|
18 | 20 | ) { }
|
19 | 21 | |
20 | 22 | interface TorLogs {
|
... | ... | @@ -301,8 +301,8 @@ class TorControllerGV( |
301 | 301 | }
|
302 | 302 | |
303 | 303 | // TorEventsBootstrapStateChangeListener
|
304 | - override fun onBootstrapProgress(progress: Double, status: String?, hasWarnings: Boolean) {
|
|
305 | - Log.d(TAG, "onBootstrapProgress($progress, $status, $hasWarnings)")
|
|
304 | + override fun onBootstrapProgress(progress: Double, hasWarnings: Boolean) {
|
|
305 | + Log.d(TAG, "onBootstrapProgress($progress, $hasWarnings)")
|
|
306 | 306 | if (progress == 100.0) {
|
307 | 307 | lastKnownStatus = TorConnectState.Bootstrapped
|
308 | 308 | wasTorBootstrapped = true
|
... | ... | @@ -312,7 +312,7 @@ class TorControllerGV( |
312 | 312 | onTorConnecting()
|
313 | 313 | |
314 | 314 | }
|
315 | - onTorStatusUpdate(status, lastKnownStatus.toTorStatus().status, progress)
|
|
315 | + onTorStatusUpdate("", lastKnownStatus.toTorStatus().status, progress)
|
|
316 | 316 | }
|
317 | 317 | |
318 | 318 | // TorEventsBootstrapStateChangeListener
|
... | ... | @@ -322,8 +322,8 @@ class TorControllerGV( |
322 | 322 | }
|
323 | 323 | |
324 | 324 | // TorEventsBootstrapStateChangeListener
|
325 | - override fun onBootstrapError(message: String?, details: String?) {
|
|
326 | - lastKnownError = TorError(message ?: "", details ?: "")
|
|
325 | + override fun onBootstrapError(code: String?, message: String?, phase: String?, reason: String?) {
|
|
326 | + lastKnownError = TorError(code ?: "", message ?: "", phase ?: "", reason ?: "")
|
|
327 | 327 | onBootstrapStateChange(TorConnectState.Error.state)
|
328 | 328 | }
|
329 | 329 |