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

Commits:

22 changed files:

Changes:

  • fenix/app/src/main/java/org/mozilla/fenix/BrowserDirection.kt
    ... ... @@ -41,4 +41,5 @@ enum class BrowserDirection(@IdRes val fragmentId: Int) {
    41 41
         FromLoginDetailFragment(R.id.loginDetailFragment),
    
    42 42
         FromTabsTray(R.id.tabsTrayFragment),
    
    43 43
         FromRecentlyClosed(R.id.recentlyClosedFragment),
    
    44
    +    FromTorConnectionAssistFragment(R.id.torConnectionAssistFragment)
    
    44 45
     }

  • fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
    ... ... @@ -157,6 +157,7 @@ import org.mozilla.fenix.tabstray.TabsTrayFragment
    157 157
     import org.mozilla.fenix.tabstray.TabsTrayFragmentDirections
    
    158 158
     import org.mozilla.fenix.theme.DefaultThemeManager
    
    159 159
     import org.mozilla.fenix.theme.ThemeManager
    
    160
    +import org.mozilla.fenix.tor.TorConnectionAssistFragmentDirections
    
    160 161
     import org.mozilla.fenix.tor.TorEvents
    
    161 162
     import org.mozilla.fenix.trackingprotection.TrackingProtectionPanelDialogFragmentDirections
    
    162 163
     import org.mozilla.fenix.utils.BrowsersCache
    
    ... ... @@ -1085,6 +1086,10 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorIn
    1085 1086
             BrowserDirection.FromStudiesFragment -> StudiesFragmentDirections.actionGlobalBrowser(
    
    1086 1087
                 customTabSessionId,
    
    1087 1088
             )
    
    1089
    +        BrowserDirection.FromTorConnectionAssistFragment,
    
    1090
    +        -> TorConnectionAssistFragmentDirections.actionGlobalBrowser(
    
    1091
    +            customTabSessionId,
    
    1092
    +        )
    
    1088 1093
         }
    
    1089 1094
     
    
    1090 1095
         /**
    

  • fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
    ... ... @@ -115,7 +115,6 @@ import org.mozilla.fenix.search.toolbar.SearchSelectorMenu
    115 115
     import org.mozilla.fenix.tabstray.TabsTrayAccessPoint
    
    116 116
     import org.mozilla.fenix.tor.TorBootstrapFragmentDirections
    
    117 117
     import org.mozilla.fenix.tor.TorBootstrapStatus
    
    118
    -import org.mozilla.fenix.tor.bootstrap.TorQuickStart
    
    119 118
     import org.mozilla.fenix.utils.Settings.Companion.TOP_SITES_PROVIDER_MAX_THRESHOLD
    
    120 119
     import org.mozilla.fenix.utils.allowUndo
    
    121 120
     import org.mozilla.fenix.wallpapers.Wallpaper
    
    ... ... @@ -202,7 +201,6 @@ class HomeFragment : Fragment() {
    202 201
         private val recentBookmarksFeature = ViewBoundFeatureWrapper<RecentBookmarksFeature>()
    
    203 202
         private val historyMetadataFeature = ViewBoundFeatureWrapper<RecentVisitsFeature>()
    
    204 203
         private val searchSelectorBinding = ViewBoundFeatureWrapper<SearchSelectorBinding>()
    
    205
    -    private val torQuickStart by lazy { TorQuickStart(requireContext()) }
    
    206 204
         private val searchSelectorMenuBinding = ViewBoundFeatureWrapper<SearchSelectorMenuBinding>()
    
    207 205
         private lateinit var torBootstrapStatus: TorBootstrapStatus
    
    208 206
     
    
    ... ... @@ -236,7 +234,6 @@ class HomeFragment : Fragment() {
    236 234
             val components = requireComponents
    
    237 235
     
    
    238 236
             torBootstrapStatus = TorBootstrapStatus(
    
    239
    -            torQuickStart,
    
    240 237
                 !BuildConfig.DISABLE_TOR,
    
    241 238
                 components.torController,
    
    242 239
                 ::dispatchModeChanges
    

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorBetaConnectionFeaturesFragment.kt
    ... ... @@ -54,10 +54,7 @@ class TorBetaConnectionFeaturesFragment : Fragment() {
    54 54
                     children.forEach { it.isEnabled = false }
    
    55 55
                 }
    
    56 56
             } else {
    
    57
    -            // Do not enable the native UI until it is actually available.
    
    58
    -            // binding.enableBetaConnectionFeaturesModes.children.forEach { it.isEnabled = true }
    
    59
    -            binding.useNewBootstrapWithHtmlUiRadioButton.isEnabled = true
    
    60
    -            binding.useNewBootstrapWithNativeUiRadioButton.isEnabled = false
    
    57
    +            binding.enableBetaConnectionFeaturesModes.children.forEach { it.isEnabled = true }
    
    61 58
             }
    
    62 59
         }
    
    63 60
     
    

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorBootstrapFragment.kt
    ... ... @@ -8,14 +8,12 @@ import android.os.Bundle
    8 8
     import android.view.LayoutInflater
    
    9 9
     import android.view.View
    
    10 10
     import android.view.ViewGroup
    
    11
    -import androidx.annotation.VisibleForTesting
    
    12 11
     import androidx.core.view.children
    
    13 12
     import androidx.fragment.app.Fragment
    
    14 13
     import androidx.lifecycle.lifecycleScope
    
    15 14
     import org.mozilla.fenix.BuildConfig
    
    16 15
     import org.mozilla.fenix.databinding.FragmentHomeBinding
    
    17 16
     import org.mozilla.fenix.ext.requireComponents
    
    18
    -import org.mozilla.fenix.tor.bootstrap.TorQuickStart
    
    19 17
     import org.mozilla.fenix.tor.interactor.DefaultTorBootstrapInteractor
    
    20 18
     import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor
    
    21 19
     import androidx.navigation.fragment.findNavController
    
    ... ... @@ -30,7 +28,6 @@ import org.mozilla.fenix.tor.view.TorBootstrapView
    30 28
     
    
    31 29
     @Suppress("TooManyFunctions", "LargeClass")
    
    32 30
     class TorBootstrapFragment : Fragment() {
    
    33
    -    private val torQuickStart by lazy { TorQuickStart(requireContext()) }
    
    34 31
     
    
    35 32
         internal var _binding: FragmentHomeBinding? = null
    
    36 33
         private val binding get() = _binding!!
    
    ... ... @@ -55,7 +52,6 @@ class TorBootstrapFragment : Fragment() {
    55 52
             val components = requireComponents
    
    56 53
     
    
    57 54
             torBootstrapStatus = TorBootstrapStatus(
    
    58
    -            torQuickStart,
    
    59 55
                 !BuildConfig.DISABLE_TOR,
    
    60 56
                 components.torController,
    
    61 57
                 ::dispatchModeChanges
    

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorBootstrapStatus.kt
    ... ... @@ -4,11 +4,8 @@
    4 4
     
    
    5 5
     package org.mozilla.fenix.tor
    
    6 6
     
    
    7
    -import org.mozilla.fenix.tor.bootstrap.TorQuickStart
    
    8
    -
    
    9 7
     @SuppressWarnings("LongParameterList", "TooManyFunctions")
    
    10 8
     class TorBootstrapStatus(
    
    11
    -        private val torQuickStart: TorQuickStart,
    
    12 9
             private val shouldStartTor: Boolean,
    
    13 10
             private val torController: TorController,
    
    14 11
             private val dispatchModeChanges: (isShouldBootstrap: Boolean) -> Unit
    
    ... ... @@ -18,7 +15,7 @@ class TorBootstrapStatus(
    18 15
                 torController.registerTorListener(this)
    
    19 16
             }
    
    20 17
     
    
    21
    -        fun isBootstrapping() = (shouldStartTor && (!torQuickStart.quickStartTor() && !torController.isBootstrapped))
    
    18
    +        fun isBootstrapping() = (shouldStartTor && !torController.isBootstrapped)
    
    22 19
     
    
    23 20
     
    
    24 21
             @SuppressWarnings("EmptyFunctionBlock")
    

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistFragment.kt
    1
    +/* This Source Code Form is subject to the terms of the Mozilla Public
    
    2
    + * License, v. 2.0. If a copy of the MPL was not distributed with this
    
    3
    + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    
    4
    +
    
    5
    +package org.mozilla.fenix.tor
    
    6
    +
    
    7
    +import android.os.Build
    
    8
    +import android.os.Bundle
    
    9
    +import android.view.LayoutInflater
    
    10
    +import android.view.View
    
    11
    +import android.view.ViewGroup
    
    12
    +import androidx.fragment.app.Fragment
    
    13
    +import androidx.fragment.app.viewModels
    
    14
    +import androidx.lifecycle.Lifecycle
    
    15
    +import androidx.lifecycle.lifecycleScope
    
    16
    +import androidx.lifecycle.repeatOnLifecycle
    
    17
    +import androidx.navigation.fragment.findNavController
    
    18
    +import kotlinx.coroutines.launch
    
    19
    +import org.mozilla.fenix.R
    
    20
    +import org.mozilla.fenix.databinding.FragmentTorConnectionAssistBinding
    
    21
    +import org.mozilla.fenix.ext.hideToolbar
    
    22
    +
    
    23
    +class TorConnectionAssistFragment : Fragment() {
    
    24
    +
    
    25
    +    private var _binding: FragmentTorConnectionAssistBinding? = null
    
    26
    +    private val binding get() = _binding!!
    
    27
    +
    
    28
    +    private val viewModel: TorConnectionAssistViewModel by viewModels()
    
    29
    +
    
    30
    +    override fun onCreateView(
    
    31
    +        inflater: LayoutInflater,
    
    32
    +        container: ViewGroup?,
    
    33
    +        savedInstanceState: Bundle?,
    
    34
    +    ): View {
    
    35
    +        _binding = FragmentTorConnectionAssistBinding.inflate(
    
    36
    +            inflater, container, false,
    
    37
    +        )
    
    38
    +
    
    39
    +        return binding.root
    
    40
    +    }
    
    41
    +
    
    42
    +    override fun onResume() {
    
    43
    +        super.onResume()
    
    44
    +        hideToolbar()
    
    45
    +    }
    
    46
    +
    
    47
    +    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    
    48
    +        super.onViewCreated(view, savedInstanceState)
    
    49
    +
    
    50
    +        lifecycleScope.launch {
    
    51
    +            repeatOnLifecycle(Lifecycle.State.STARTED) {
    
    52
    +                viewModel.torConnectState.collect {
    
    53
    +                    when (it) {
    
    54
    +                        TorConnectState.Initial -> showConfiguring()
    
    55
    +                        TorConnectState.Configuring -> showConfiguring()
    
    56
    +                        TorConnectState.AutoBootstrapping -> showBootstrapping()
    
    57
    +                        TorConnectState.Bootstrapping -> showBootstrapping()
    
    58
    +                        TorConnectState.Error -> TODO()
    
    59
    +                        TorConnectState.Bootstrapped -> openHome()
    
    60
    +                        TorConnectState.Disabled -> openHome()
    
    61
    +                    }
    
    62
    +                }
    
    63
    +            }
    
    64
    +        }
    
    65
    +
    
    66
    +        viewModel.progress().observe(
    
    67
    +            viewLifecycleOwner,
    
    68
    +        ) { progress ->
    
    69
    +            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
    
    70
    +                binding.torBootstrapProgressBar.setProgress(progress, true)
    
    71
    +            } else {
    
    72
    +                binding.torBootstrapProgressBar.progress = progress
    
    73
    +            }
    
    74
    +        }
    
    75
    +
    
    76
    +        viewModel.quickconnectToggle().observe(
    
    77
    +            viewLifecycleOwner
    
    78
    +        ) {
    
    79
    +            binding.quickstartSwitch.isChecked = it
    
    80
    +        }
    
    81
    +
    
    82
    +        binding.settingsButton.setOnClickListener {
    
    83
    +            viewModel.cancelTorBootstrap()
    
    84
    +            openSettings()
    
    85
    +        }
    
    86
    +
    
    87
    +        binding.torBootstrapConnectButton.setOnClickListener {
    
    88
    +            viewModel.handleConnect(lifecycleScope = lifecycleScope)
    
    89
    +        }
    
    90
    +
    
    91
    +        binding.quickstartSwitch.setOnCheckedChangeListener { _, isChecked ->
    
    92
    +            viewModel.handleQuickstartChecked(isChecked)
    
    93
    +        }
    
    94
    +    }
    
    95
    +
    
    96
    +    private fun showConfiguring() {
    
    97
    +        binding.torBootstrapConnectButton.visibility = View.VISIBLE
    
    98
    +        binding.torBootstrapNetworkSettingsButton.text =
    
    99
    +            getString(R.string.connection_assist_configure_connection_button)
    
    100
    +        binding.torBootstrapNetworkSettingsButton.setOnClickListener {
    
    101
    +            openTorNetworkSettings()
    
    102
    +        }
    
    103
    +    }
    
    104
    +
    
    105
    +    private fun showBootstrapping() {
    
    106
    +        binding.torBootstrapConnectButton.visibility = View.INVISIBLE
    
    107
    +        binding.torBootstrapNetworkSettingsButton.text = getString(R.string.btn_cancel)
    
    108
    +        binding.torBootstrapNetworkSettingsButton.setOnClickListener {
    
    109
    +            viewModel.cancelTorBootstrap()
    
    110
    +        }
    
    111
    +    }
    
    112
    +
    
    113
    +    private fun openSettings(preferenceToScrollTo: String? = null) {
    
    114
    +        findNavController().navigate(
    
    115
    +            TorConnectionAssistFragmentDirections
    
    116
    +                .actionTorConnectionAssistFragmentToSettingsFragment(preferenceToScrollTo),
    
    117
    +        )
    
    118
    +    }
    
    119
    +
    
    120
    +    private fun openTorNetworkSettings() {
    
    121
    +        findNavController().navigate(
    
    122
    +            TorConnectionAssistFragmentDirections
    
    123
    +                .actionTorConnectionAssistFragmentToTorNetworkSettings(),
    
    124
    +        )
    
    125
    +    }
    
    126
    +
    
    127
    +    private fun openHome() {
    
    128
    +        findNavController().navigate(TorConnectionAssistFragmentDirections.actionStartupHome())
    
    129
    +    }
    
    130
    +
    
    131
    +}

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistViewModel.kt
    1
    +/* This Source Code Form is subject to the terms of the Mozilla Public
    
    2
    + * License, v. 2.0. If a copy of the MPL was not distributed with this
    
    3
    + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    
    4
    +
    
    5
    +package org.mozilla.fenix.tor
    
    6
    +
    
    7
    +import android.app.Application
    
    8
    +import android.util.Log
    
    9
    +import androidx.lifecycle.AndroidViewModel
    
    10
    +import androidx.lifecycle.LifecycleCoroutineScope
    
    11
    +import androidx.lifecycle.LiveData
    
    12
    +import androidx.lifecycle.MutableLiveData
    
    13
    +import kotlinx.coroutines.flow.MutableStateFlow
    
    14
    +import kotlinx.coroutines.flow.StateFlow
    
    15
    +import org.mozilla.fenix.ext.components
    
    16
    +
    
    17
    +class TorConnectionAssistViewModel(
    
    18
    +    application: Application,
    
    19
    +) : AndroidViewModel(application), TorEvents {
    
    20
    +
    
    21
    +    private val TAG = "torConnectionAssistVM"
    
    22
    +    private val components = getApplication<Application>().components
    
    23
    +
    
    24
    +    private val _torController: TorControllerGV = components.torController as TorControllerGV
    
    25
    +
    
    26
    +    private val _torConnectState = MutableStateFlow(TorConnectState.Initial)
    
    27
    +    internal val torConnectState: StateFlow<TorConnectState> = _torConnectState
    
    28
    +
    
    29
    +    init {
    
    30
    +        _torController.registerTorListener(this)
    
    31
    +    }
    
    32
    +
    
    33
    +    private val _progress = MutableLiveData(0)
    
    34
    +    fun progress(): LiveData<Int> {
    
    35
    +        return _progress
    
    36
    +    }
    
    37
    +
    
    38
    +    private val _quickconnectToggle = MutableLiveData(_torController.quickstart)
    
    39
    +    fun quickconnectToggle(): LiveData<Boolean> {
    
    40
    +        return _quickconnectToggle
    
    41
    +    }
    
    42
    +
    
    43
    +    fun handleConnect(
    
    44
    +        withDebugLogging: Boolean = false,
    
    45
    +        lifecycleScope: LifecycleCoroutineScope? = null,
    
    46
    +    ) {
    
    47
    +        _torController.initiateTorBootstrap(
    
    48
    +            withDebugLogging = withDebugLogging,
    
    49
    +            lifecycleScope = lifecycleScope,
    
    50
    +        )
    
    51
    +    }
    
    52
    +
    
    53
    +    fun handleQuickstartChecked(checked: Boolean) {
    
    54
    +        _torController.quickstart = checked
    
    55
    +    }
    
    56
    +
    
    57
    +    fun cancelTorBootstrap() {
    
    58
    +        _torController.stopTor()
    
    59
    +        _torController.setTorStopped()
    
    60
    +    }
    
    61
    +
    
    62
    +    override fun onTorConnecting() {
    
    63
    +        Log.d(TAG, "onTorConnecting()")
    
    64
    +    }
    
    65
    +
    
    66
    +    override fun onTorConnected() {
    
    67
    +        Log.d(TAG, "onTorConnected()")
    
    68
    +        _torController.unregisterTorListener(this)
    
    69
    +        _torConnectState.value = _torController.lastKnownStatus
    
    70
    +    }
    
    71
    +
    
    72
    +    override fun onTorStatusUpdate(entry: String?, status: String?, progress: Double?) {
    
    73
    +        Log.d(TAG, "onTorStatusUpdate($entry, $status, $progress)")
    
    74
    +        if (progress != null) {
    
    75
    +            _progress.value = progress.toInt()
    
    76
    +        }
    
    77
    +        _torConnectState.value = _torController.lastKnownStatus
    
    78
    +    }
    
    79
    +
    
    80
    +    override fun onTorStopped() {
    
    81
    +        Log.d(TAG, "onTorStopped()")
    
    82
    +        _progress.value = 0
    
    83
    +        _torConnectState.value = _torController.lastKnownStatus
    
    84
    +    }
    
    85
    +
    
    86
    +}

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorController.kt
    ... ... @@ -49,6 +49,7 @@ interface TorController: TorEvents {
    49 49
         var bridgesEnabled: Boolean
    
    50 50
         var bridgeTransport: TorBridgeTransportConfig
    
    51 51
         var userProvidedBridges: String?
    
    52
    +    var quickstart: Boolean
    
    52 53
     
    
    53 54
         fun start()
    
    54 55
         fun stop()
    

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerGV.kt
    ... ... @@ -52,7 +52,7 @@ class TorControllerGV(
    52 52
     
    
    53 53
         private var torListeners = mutableListOf<TorEvents>()
    
    54 54
     
    
    55
    -    private var lastKnownStatus = TorConnectState.Initial
    
    55
    +    internal var lastKnownStatus = TorConnectState.Initial
    
    56 56
         private var wasTorBootstrapped = false
    
    57 57
         private var isTorRestarting = false
    
    58 58
     
    
    ... ... @@ -66,6 +66,17 @@ class TorControllerGV(
    66 66
         override val isBootstrapped get() = isTorBootstrapped
    
    67 67
         override val isConnected get() = (lastKnownStatus.isStarted() && !isTorRestarting)
    
    68 68
     
    
    69
    +    override var quickstart: Boolean
    
    70
    +        get() {
    
    71
    +            return getTorSettings()?.quickstart ?: false
    
    72
    +        }
    
    73
    +        set(value) {
    
    74
    +            getTorSettings()?.let {
    
    75
    +                it.quickstart = value
    
    76
    +                getTorIntegration().setSettings(it, true, true)
    
    77
    +            }
    
    78
    +        }
    
    79
    +
    
    69 80
         private fun getTorIntegration(): TorIntegrationAndroid {
    
    70 81
             return (context.components.core.engine as GeckoEngine).getTorIntegrationController()
    
    71 82
         }
    
    ... ... @@ -198,7 +209,7 @@ class TorControllerGV(
    198 209
         }
    
    199 210
     
    
    200 211
         override fun setTorStopped() {
    
    201
    -        lastKnownStatus = TorConnectState.Disabled
    
    212
    +        lastKnownStatus = TorConnectState.Configuring
    
    202 213
             onTorStopped()
    
    203 214
         }
    
    204 215
     
    
    ... ... @@ -243,7 +254,7 @@ class TorControllerGV(
    243 254
                 if (isTorRestarting) {
    
    244 255
                     initiateTorBootstrap()
    
    245 256
                 } else {
    
    246
    -                onTorStopped()
    
    257
    +                setTorStopped()
    
    247 258
                 }
    
    248 259
             }
    
    249 260
     
    
    ... ... @@ -280,6 +291,7 @@ class TorControllerGV(
    280 291
         // TorEventsBootstrapStateChangeListener
    
    281 292
         override fun onBootstrapError(message: String?, details: String?) {
    
    282 293
             lastKnownStatus = TorConnectState.Error
    
    294
    +        onBootstrapStateChange(TorConnectState.Error.state)
    
    283 295
         }
    
    284 296
     
    
    285 297
         // TorEventsBootstrapStateChangeListener
    

  • fenix/app/src/main/java/org/mozilla/fenix/tor/TorControllerTAS.kt
    ... ... @@ -19,6 +19,7 @@ class TorControllerTAS (private val context: Context): TorController {
    19 19
         private val lbm: LocalBroadcastManager = LocalBroadcastManager.getInstance(context)
    
    20 20
         private val entries = mutableListOf<Pair<String?, String?>>()
    
    21 21
         override val logEntries get() = entries
    
    22
    +    override var quickstart: Boolean = false // Stub, is never used
    
    22 23
     
    
    23 24
         private var torListeners = mutableListOf<TorEvents>()
    
    24 25
     
    

  • fenix/app/src/main/java/org/mozilla/fenix/tor/bootstrap/TorQuickStart.kt deleted
    1
    -/* This Source Code Form is subject to the terms of the Mozilla Public
    
    2
    - * License, v. 2.0. If a copy of the MPL was not distributed with this
    
    3
    - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    
    4
    -
    
    5
    -package org.mozilla.fenix.tor.bootstrap
    
    6
    -
    
    7
    -import android.content.Context
    
    8
    -import android.content.SharedPreferences
    
    9
    -import android.os.StrictMode
    
    10
    -import androidx.annotation.VisibleForTesting
    
    11
    -import mozilla.components.support.ktx.android.content.PreferencesHolder
    
    12
    -import mozilla.components.support.ktx.android.content.booleanPreference
    
    13
    -import org.mozilla.fenix.ext.components
    
    14
    -
    
    15
    -class TorQuickStart(val context: Context) : PreferencesHolder {
    
    16
    -
    
    17
    -    override val preferences: SharedPreferences =
    
    18
    -        context.components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
    
    19
    -            context.getSharedPreferences(
    
    20
    -                PREF_NAME_TOR_BOOTSTRAP_KEY,
    
    21
    -                Context.MODE_PRIVATE
    
    22
    -            )
    
    23
    -        }
    
    24
    -
    
    25
    -    private var torQuickStart by booleanPreference(TOR_QUICK_START, default = false)
    
    26
    -
    
    27
    -    fun quickStartTor() =
    
    28
    -        context.components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) { torQuickStart }
    
    29
    -
    
    30
    -    fun enableQuickStartTor() {
    
    31
    -        torQuickStart = true
    
    32
    -    }
    
    33
    -    fun disableQuickStartTor() {
    
    34
    -        torQuickStart = false
    
    35
    -    }
    
    36
    -    fun setQuickStartTor(enabled: Boolean) = if (enabled) {
    
    37
    -        enableQuickStartTor()
    
    38
    -    } else {
    
    39
    -        disableQuickStartTor()
    
    40
    -    }
    
    41
    -
    
    42
    -    companion object {
    
    43
    -        /**
    
    44
    -         * Name of the shared preferences file.
    
    45
    -         */
    
    46
    -        private const val PREF_NAME_TOR_BOOTSTRAP_KEY = "tor.bootstrap"
    
    47
    -
    
    48
    -        /**
    
    49
    -         * Key for [quickStartTor].
    
    50
    -         */
    
    51
    -        @VisibleForTesting
    
    52
    -        internal const val TOR_QUICK_START = "tor.bootstrap.quick_start_enabled"
    
    53
    -    }
    
    54
    -}

  • fenix/app/src/main/java/org/mozilla/fenix/tor/view/TorBootstrapConnectViewHolder.kt
    ... ... @@ -10,7 +10,6 @@ import org.mozilla.fenix.R
    10 10
     import org.mozilla.fenix.components.Components
    
    11 11
     import org.mozilla.fenix.databinding.TorBootstrapConnectBinding
    
    12 12
     import org.mozilla.fenix.tor.TorEvents
    
    13
    -import org.mozilla.fenix.tor.bootstrap.TorQuickStart
    
    14 13
     import org.mozilla.fenix.tor.interactor.TorBootstrapInteractor
    
    15 14
     
    
    16 15
     class TorBootstrapConnectViewHolder(
    
    ... ... @@ -23,17 +22,6 @@ class TorBootstrapConnectViewHolder(
    23 22
     
    
    24 23
         init {
    
    25 24
             binding = TorBootstrapConnectBinding.bind(view)
    
    26
    -        val torQuickStart = TorQuickStart(view.context)
    
    27
    -        setQuickStartDescription(view, torQuickStart)
    
    28
    -
    
    29
    -        with(binding.quickStartToggle) {
    
    30
    -            setOnCheckedChangeListener { _, isChecked ->
    
    31
    -                torQuickStart.setQuickStartTor(isChecked)
    
    32
    -                setQuickStartDescription(view, torQuickStart)
    
    33
    -            }
    
    34
    -
    
    35
    -            isChecked = torQuickStart.quickStartTor()
    
    36
    -        }
    
    37 25
     
    
    38 26
             with(binding.torBootstrapNetworkSettingsButton) {
    
    39 27
                 setOnClickListener {
    
    ... ... @@ -66,20 +54,6 @@ class TorBootstrapConnectViewHolder(
    66 54
             components.torController.registerTorListener(this)
    
    67 55
         }
    
    68 56
     
    
    69
    -    private fun setQuickStartDescription(view: View, torQuickStart: TorQuickStart) {
    
    70
    -        val resources = view.context.resources
    
    71
    -        val appName = resources.getString(R.string.app_name)
    
    72
    -        if (torQuickStart.quickStartTor()) {
    
    73
    -            binding.torBootstrapQuickStartDescription.text = resources.getString(
    
    74
    -                R.string.tor_bootstrap_quick_start_enabled, appName
    
    75
    -            )
    
    76
    -        } else {
    
    77
    -            binding.torBootstrapQuickStartDescription.text = resources.getString(
    
    78
    -                R.string.tor_bootstrap_quick_start_disabled
    
    79
    -            )
    
    80
    -        }
    
    81
    -    }
    
    82
    -
    
    83 57
         @SuppressWarnings("EmptyFunctionBlock")
    
    84 58
         override fun onTorConnecting() {
    
    85 59
         }
    

  • fenix/app/src/main/res/drawable/connect.xml
    1
    +<vector xmlns:android="http://schemas.android.com/apk/res/android"
    
    2
    +    android:width="40dp"
    
    3
    +    android:height="40dp"
    
    4
    +    android:viewportWidth="40"
    
    5
    +    android:viewportHeight="40">
    
    6
    +  <path
    
    7
    +      android:pathData="M20,1.253C9.647,1.253 1.253,9.647 1.253,20C1.253,28.967 7.547,36.46 15.96,38.307C16.84,38.5 17.733,38.633 18.653,38.693V24.373C16.787,23.8 15.427,22.06 15.427,20C15.427,17.473 17.473,15.427 20,15.427C22.527,15.427 24.573,17.473 24.573,20C24.573,22.06 23.213,23.8 21.347,24.373V38.693C22.267,38.633 23.16,38.5 24.04,38.307C32.453,36.46 38.747,28.967 38.747,20C38.747,9.647 30.353,1.253 20,1.253ZM24.04,35.293V26.32C26.12,24.987 27.5,22.653 27.5,20C27.5,15.86 24.14,12.5 20,12.5C15.86,12.5 12.5,15.86 12.5,20C12.5,22.653 13.88,24.987 15.96,26.32V35.293C9.18,33.513 4.18,27.347 4.18,20C4.18,11.26 11.26,4.18 20,4.18C28.74,4.18 35.82,11.26 35.82,20C35.82,27.347 30.82,33.513 24.04,35.293Z"
    
    8
    +      android:fillColor="#FBFBFE"
    
    9
    +      android:fillType="evenOdd"/>
    
    10
    +  <path
    
    11
    +      android:pathData="M20,6.873C12.753,6.873 6.873,12.753 6.873,20C6.873,25.84 10.687,30.787 15.96,32.487V29.36C12.34,27.8 9.807,24.193 9.807,20C9.807,14.367 14.367,9.807 20,9.807C25.633,9.807 30.193,14.367 30.193,20C30.193,24.193 27.66,27.8 24.04,29.36V32.487C29.313,30.787 33.127,25.84 33.127,20C33.127,12.753 27.247,6.873 20,6.873Z"
    
    12
    +      android:fillColor="#FBFBFE"
    
    13
    +      android:fillType="evenOdd"/>
    
    14
    +  <path
    
    15
    +      android:pathData="M20,22.1C21.16,22.1 22.1,21.159 22.1,20C22.1,18.84 21.16,17.9 20,17.9C18.84,17.9 17.9,18.84 17.9,20C17.9,21.159 18.84,22.1 20,22.1Z"
    
    16
    +      android:fillColor="#FBFBFE"/>
    
    17
    +</vector>

  • fenix/app/src/main/res/drawable/progress_gradient.xml
    ... ... @@ -12,16 +12,10 @@
    12 12
         <item android:id="@android:id/progress">
    
    13 13
             <scale android:scaleWidth="100%">
    
    14 14
                 <shape>
    
    15
    -                <corners
    
    16
    -                    android:bottomLeftRadius="0dp"
    
    17
    -                    android:bottomRightRadius="8dp"
    
    18
    -                    android:topLeftRadius="0dp"
    
    19
    -                    android:topRightRadius="8dp"/>
    
    20 15
                     <gradient
    
    21
    -                    android:angle="45"
    
    22
    -                    android:centerColor="#F10366"
    
    23
    -                    android:endColor="#FF9100"
    
    24
    -                    android:startColor="#6173FF" />
    
    16
    +                    android:angle="0"
    
    17
    +                    android:endColor="#00DBDE"
    
    18
    +                    android:startColor="#FC00FF"/>
    
    25 19
                 </shape>
    
    26 20
             </scale>
    
    27 21
         </item>
    

  • fenix/app/src/main/res/layout/fragment_tor_connection_assist.xml
    1
    +<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
    
    2
    +   - License, v. 2.0. If a copy of the MPL was not distributed with this
    
    3
    +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
    
    4
    +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    
    5
    +    xmlns:app="http://schemas.android.com/apk/res-auto"
    
    6
    +    android:layout_width="match_parent"
    
    7
    +    android:layout_height="match_parent"
    
    8
    +    android:background="@drawable/tor_bootstrap_background_gradient">
    
    9
    +
    
    10
    +    <ProgressBar
    
    11
    +        android:id="@+id/tor_bootstrap_progress_bar"
    
    12
    +        style="?android:attr/progressBarStyleHorizontal"
    
    13
    +        android:layout_width="match_parent"
    
    14
    +        android:layout_height="6dp"
    
    15
    +        app:layout_constraintEnd_toEndOf="parent"
    
    16
    +        app:layout_constraintStart_toStartOf="parent"
    
    17
    +        app:layout_constraintTop_toTopOf="parent" />
    
    18
    +
    
    19
    +    <ImageView
    
    20
    +        android:id="@+id/settings_button"
    
    21
    +        android:layout_width="24dp"
    
    22
    +        android:layout_height="24dp"
    
    23
    +        android:layout_marginTop="26dp"
    
    24
    +        android:layout_marginEnd="20dp"
    
    25
    +        android:contentDescription="@string/settings"
    
    26
    +        app:layout_constraintEnd_toEndOf="parent"
    
    27
    +        app:layout_constraintTop_toTopOf="parent"
    
    28
    +        app:srcCompat="@drawable/mozac_ic_settings" />
    
    29
    +
    
    30
    +    <ImageView
    
    31
    +        android:id="@+id/tor_connect_image"
    
    32
    +        android:layout_width="40dp"
    
    33
    +        android:layout_height="40dp"
    
    34
    +        android:layout_marginStart="24dp"
    
    35
    +        android:contentDescription="@string/tor_bootstrap_connect"
    
    36
    +        android:visibility="visible"
    
    37
    +        app:layout_constraintBottom_toBottomOf="parent"
    
    38
    +        app:layout_constraintStart_toStartOf="parent"
    
    39
    +        app:layout_constraintTop_toBottomOf="@+id/tor_bootstrap_progress_bar"
    
    40
    +        app:layout_constraintVertical_bias="0.075"
    
    41
    +        app:srcCompat="@drawable/connect" />
    
    42
    +
    
    43
    +    <TextView
    
    44
    +        android:id="@+id/title_large_text_view"
    
    45
    +        android:layout_width="match_parent"
    
    46
    +        android:layout_height="wrap_content"
    
    47
    +        android:layout_marginStart="24dp"
    
    48
    +        android:layout_marginTop="24dp"
    
    49
    +        android:layout_marginEnd="24dp"
    
    50
    +        android:text="@string/connection_assist_tor_connect_title"
    
    51
    +        android:textColor="#FBFBFE"
    
    52
    +        android:textFontWeight="400"
    
    53
    +        android:textSize="22sp"
    
    54
    +        app:layout_constraintEnd_toEndOf="parent"
    
    55
    +        app:layout_constraintStart_toStartOf="parent"
    
    56
    +        app:layout_constraintTop_toBottomOf="@id/tor_connect_image" />
    
    57
    +
    
    58
    +    <TextView
    
    59
    +        android:id="@+id/connect_to_tor_description"
    
    60
    +        android:layout_width="match_parent"
    
    61
    +        android:layout_height="wrap_content"
    
    62
    +        android:layout_marginStart="24dp"
    
    63
    +        android:layout_marginTop="16dp"
    
    64
    +        android:layout_marginEnd="24dp"
    
    65
    +        android:text="@string/preferences_tor_network_settings_explanation"
    
    66
    +        android:textColor="#FBFBFE"
    
    67
    +        android:textFontWeight="400"
    
    68
    +        android:textSize="14sp"
    
    69
    +        app:layout_constraintEnd_toEndOf="parent"
    
    70
    +        app:layout_constraintHorizontal_bias="0.0"
    
    71
    +        app:layout_constraintStart_toStartOf="parent"
    
    72
    +        app:layout_constraintTop_toBottomOf="@id/title_large_text_view" />
    
    73
    +
    
    74
    +    <TextView
    
    75
    +        android:id="@+id/connect_automatically"
    
    76
    +        android:layout_width="wrap_content"
    
    77
    +        android:layout_height="wrap_content"
    
    78
    +        android:layout_marginStart="24dp"
    
    79
    +        android:layout_marginTop="24dp"
    
    80
    +        android:text="@string/connection_assist_always_connect_automatically_toggle_description"
    
    81
    +        android:textColor="#FBFBFE"
    
    82
    +        android:textSize="14sp"
    
    83
    +        app:layout_constraintBottom_toBottomOf="@+id/quickstart_switch"
    
    84
    +        app:layout_constraintStart_toStartOf="parent"
    
    85
    +        app:layout_constraintTop_toTopOf="@+id/quickstart_switch"
    
    86
    +        app:layout_constraintVertical_bias="1.25" />
    
    87
    +
    
    88
    +    <com.google.android.material.switchmaterial.SwitchMaterial
    
    89
    +        android:id="@+id/quickstart_switch"
    
    90
    +        android:layout_width="wrap_content"
    
    91
    +        android:layout_height="wrap_content"
    
    92
    +        android:layout_marginTop="24dp"
    
    93
    +        android:layout_marginEnd="24dp"
    
    94
    +        android:layout_marginBottom="24dp"
    
    95
    +        android:enabled="false"
    
    96
    +        android:gravity="center"
    
    97
    +        app:layout_constraintEnd_toEndOf="parent"
    
    98
    +        app:layout_constraintTop_toBottomOf="@id/connect_to_tor_description"
    
    99
    +        app:layout_goneMarginEnd="6dp"
    
    100
    +        app:layout_goneMarginTop="9dp" />
    
    101
    +
    
    102
    +    <Button
    
    103
    +        android:id="@+id/tor_bootstrap_connect_button"
    
    104
    +        android:layout_width="match_parent"
    
    105
    +        android:layout_height="wrap_content"
    
    106
    +        android:layout_marginStart="24dp"
    
    107
    +        android:layout_marginEnd="24dp"
    
    108
    +        android:layout_marginBottom="8dp"
    
    109
    +        android:background="@drawable/rounded_corners"
    
    110
    +        android:backgroundTint="@color/connect_button_purple"
    
    111
    +        android:maxWidth="312dp"
    
    112
    +        android:text="@string/tor_bootstrap_connect"
    
    113
    +        android:textAllCaps="false"
    
    114
    +        android:textColor="#FBFBFE"
    
    115
    +        android:textFontWeight="500"
    
    116
    +        android:textSize="14sp"
    
    117
    +        android:textStyle="bold"
    
    118
    +        app:layout_constraintBottom_toTopOf="@id/tor_bootstrap_network_settings_button"
    
    119
    +        app:layout_constraintEnd_toEndOf="parent"
    
    120
    +        app:layout_constraintHorizontal_bias="0.0"
    
    121
    +        app:layout_constraintStart_toStartOf="parent"
    
    122
    +        app:layout_constraintTop_toBottomOf="@+id/quickstart_switch"
    
    123
    +        app:layout_constraintVertical_bias="1" />
    
    124
    +
    
    125
    +
    
    126
    +    <Button
    
    127
    +        android:id="@+id/tor_bootstrap_network_settings_button"
    
    128
    +        android:layout_width="match_parent"
    
    129
    +        android:layout_height="wrap_content"
    
    130
    +        android:layout_marginStart="24dp"
    
    131
    +        android:layout_marginEnd="24dp"
    
    132
    +        android:layout_marginBottom="24dp"
    
    133
    +        android:background="@drawable/rounded_corners"
    
    134
    +        android:backgroundTint="@color/configure_connection_button_white"
    
    135
    +        android:maxWidth="312dp"
    
    136
    +        android:text="@string/connection_assist_configure_connection_button"
    
    137
    +        android:textAllCaps="false"
    
    138
    +        android:textColor="#15141A"
    
    139
    +        android:textFontWeight="500"
    
    140
    +        android:textSize="14sp"
    
    141
    +        android:textStyle="bold"
    
    142
    +        app:layout_constraintBottom_toBottomOf="parent"
    
    143
    +        app:layout_constraintEnd_toEndOf="parent"
    
    144
    +        app:layout_constraintStart_toStartOf="parent" />
    
    145
    +
    
    146
    +</androidx.constraintlayout.widget.ConstraintLayout>

  • fenix/app/src/main/res/layout/tor_bootstrap_connect.xml
    ... ... @@ -44,42 +44,6 @@
    44 44
             android:layout_height="wrap_content"
    
    45 45
             android:layout_above="@id/tor_bootstrap_connect_button" />
    
    46 46
     
    
    47
    -    <TextView
    
    48
    -        android:id="@+id/quick_start_label"
    
    49
    -        android:visibility="gone"
    
    50
    -        android:layout_width="wrap_content"
    
    51
    -        android:layout_height="wrap_content"
    
    52
    -        android:layout_marginStart="@dimen/library_item_icon_margin_horizontal"
    
    53
    -        android:layout_marginEnd="@dimen/library_item_icon_margin_horizontal"
    
    54
    -        android:layout_above="@id/tor_bootstrap_quick_start_description"
    
    55
    -        android:layout_toEndOf="@id/quick_start_toggle"
    
    56
    -        android:paddingStart="8dp"
    
    57
    -        android:paddingEnd="8dp"
    
    58
    -        android:clickable="false"
    
    59
    -        android:textAppearance="@style/ListItemTextStyle"
    
    60
    -        android:textColor="#EEEEEE"
    
    61
    -        android:text="@string/tor_bootstrap_quick_start_label"
    
    62
    -        android:textSize="18sp" />
    
    63
    -
    
    64
    -    <TextView
    
    65
    -        android:id="@+id/tor_bootstrap_quick_start_description"
    
    66
    -        android:visibility="gone"
    
    67
    -        android:layout_width="wrap_content"
    
    68
    -        android:layout_height="wrap_content"
    
    69
    -        android:layout_marginStart="@dimen/library_item_icon_margin_horizontal"
    
    70
    -        android:layout_marginEnd="@dimen/library_item_icon_margin_horizontal"
    
    71
    -        android:paddingStart="8dp"
    
    72
    -        android:paddingEnd="8dp"
    
    73
    -        android:clickable="false"
    
    74
    -        android:layout_marginBottom="20dp"
    
    75
    -        android:textAppearance="@style/ListItemTextStyle"
    
    76
    -        android:layout_toEndOf="@id/quick_start_toggle"
    
    77
    -        android:layout_above="@id/tor_bootstrap_connect_button"
    
    78
    -        android:textColor="#FFBBBBBB"
    
    79
    -        android:text="@string/tor_bootstrap_quick_start_disabled"
    
    80
    -        android:lines="3"
    
    81
    -        android:textSize="18sp" />
    
    82
    -
    
    83 47
         <Button
    
    84 48
             android:id="@+id/tor_bootstrap_connect_button"
    
    85 49
             android:layout_width="wrap_content"
    

  • fenix/app/src/main/res/layout/tor_network_settings_beta_connection_features.xml
    ... ... @@ -84,7 +84,6 @@
    84 84
                 android:background="?android:attr/selectableItemBackground"
    
    85 85
                 android:button="@null"
    
    86 86
                 android:drawablePadding="@dimen/radio_button_preference_drawable_padding"
    
    87
    -            android:enabled="false"
    
    88 87
                 android:paddingStart="@dimen/radio_button_preference_horizontal"
    
    89 88
                 android:paddingTop="@dimen/radio_button_preference_vertical"
    
    90 89
                 android:paddingEnd="@dimen/radio_button_preference_horizontal"
    

  • fenix/app/src/main/res/navigation/nav_graph.xml
    ... ... @@ -277,6 +277,31 @@
    277 277
                 app:popExitAnim="@anim/slide_out_right" />
    
    278 278
         </fragment>
    
    279 279
     
    
    280
    +    <fragment
    
    281
    +        android:id="@+id/torConnectionAssistFragment"
    
    282
    +        android:name="org.mozilla.fenix.tor.TorConnectionAssistFragment"
    
    283
    +        tools:layout="@layout/fragment_home">
    
    284
    +        <action
    
    285
    +            android:id="@+id/action_home"
    
    286
    +            app:destination="@id/homeFragment"
    
    287
    +            app:popUpTo="@id/torConnectionAssistFragment"
    
    288
    +            app:popUpToInclusive="true" />
    
    289
    +        <action
    
    290
    +            android:id="@+id/action_torConnectionAssistFragment_to_SettingsFragment"
    
    291
    +            app:destination="@id/settingsFragment"
    
    292
    +            app:enterAnim="@anim/slide_in_right"
    
    293
    +            app:exitAnim="@anim/slide_out_left"
    
    294
    +            app:popEnterAnim="@anim/slide_in_left"
    
    295
    +            app:popExitAnim="@anim/slide_out_right" />
    
    296
    +        <action
    
    297
    +            android:id="@+id/action_torConnectionAssistFragment_to_TorNetworkSettings"
    
    298
    +            app:destination="@id/torNetworkSettingsFragment"
    
    299
    +            app:enterAnim="@anim/slide_in_right"
    
    300
    +            app:exitAnim="@anim/slide_out_left"
    
    301
    +            app:popEnterAnim="@anim/slide_in_left"
    
    302
    +            app:popExitAnim="@anim/slide_out_right" />
    
    303
    +    </fragment>
    
    304
    +
    
    280 305
         <dialog
    
    281 306
             android:id="@+id/homeOnboardingDialogFragment"
    
    282 307
             android:name="org.mozilla.fenix.onboarding.HomeOnboardingDialogFragment" />
    
    ... ... @@ -769,6 +794,13 @@
    769 794
                 app:exitAnim="@anim/slide_out_left"
    
    770 795
                 app:popEnterAnim="@anim/slide_in_left"
    
    771 796
                 app:popExitAnim="@anim/slide_out_right" />
    
    797
    +        <action
    
    798
    +            android:id="@+id/action_settingsFragment_to_TorConnectionAssistFragment"
    
    799
    +            app:destination="@id/torConnectionAssistFragment"
    
    800
    +            app:enterAnim="@anim/slide_in_right"
    
    801
    +            app:exitAnim="@anim/slide_out_left"
    
    802
    +            app:popEnterAnim="@anim/slide_in_left"
    
    803
    +            app:popExitAnim="@anim/slide_out_right" />
    
    772 804
         </fragment>
    
    773 805
         <dialog
    
    774 806
             android:id="@+id/profilerStartDialogFragment"
    

  • fenix/app/src/main/res/values/colors.xml
    ... ... @@ -340,4 +340,9 @@
    340 340
     
    
    341 341
         <!-- Material Design colors -->
    
    342 342
         <color name="material_scrim_color">#52000000</color>
    
    343
    +
    
    344
    +    <!-- Connection Assist -->
    
    345
    +    <color name="connect_button_purple">#9059FF</color>
    
    346
    +    <color name="configure_connection_button_white">#E1E0E7</color>
    
    347
    +
    
    343 348
     </resources>

  • fenix/app/src/main/res/values/torbrowser_strings.xml
    ... ... @@ -75,4 +75,73 @@
    75 75
         <!-- Onion location -->
    
    76 76
         <string name="preferences_tor_prioritize_onions">Prioritize .onion sites</string>
    
    77 77
     
    
    78
    +    <!-- Connection assist. -->
    
    79
    +    <string name="connection_assist_tor_connect_title">Connect to Tor</string>
    
    80
    +    <!-- Connection assist. -->
    
    81
    +    <string name="connection_assist_always_connect_automatically_toggle_description">Always connect automatically</string>
    
    82
    +    <!-- Connection assist. -->
    
    83
    +    <string name="connection_assist_configure_connection_button">Configure connection…</string>
    
    84
    +
    
    85
    +    <!-- Connection assist. -->
    
    86
    +    <string name="connection_assist_connecting_title">Establishing a connection…</string>
    
    87
    +
    
    88
    +    <!-- Connection assist. -->
    
    89
    +    <string name="connection_assist_internet_error_title">We can’t reach the internet</string>
    
    90
    +    <!-- Connection assist. %1$s is connection_assist_internet_error_learn_more-->
    
    91
    +    <string name="connection_assist_internet_error_description">This could be due to a connection issue rather than Tor being blocked. Check your internet connection, proxy, and firewall settings before trying again. %1$s</string>
    
    92
    +    <!-- Connection assist. -->
    
    93
    +    <string name="connection_assist_internet_error_learn_more">Learn more</string>
    
    94
    +    <!-- Connection assist. -->
    
    95
    +    <string name="connection_assist_internet_error_try_again">Try again</string>
    
    96
    +
    
    97
    +    <!-- Connection assist. -->
    
    98
    +    <string name="connection_assist_trying_again_waiting_title">Trying again…</string>
    
    99
    +
    
    100
    +    <!-- Connection assist. -->
    
    101
    +    <string name="connection_assist_cant_connect_to_tor_title">We can’t connect to Tor directly</string>
    
    102
    +    <!-- Connection assist. %1$s is connection_assist_try_a_bridge_learn_more-->
    
    103
    +    <string name="connection_assist_try_a_bridge_description">Try connecting via a bridge instead. By providing your location, we can look up the bridge that’s most likely to unblock the internet in your country or region. %1$s</string>
    
    104
    +    <!-- Connection assist. -->
    
    105
    +    <string name="connection_assist_unblock_the_internet_in_country_or_region">Unblock the internet in:</string>
    
    106
    +    <!-- Connection assist. -->
    
    107
    +    <string name="connection_assist_share_my_location_country_or_region">Share my location</string>
    
    108
    +    <!-- Connection assist. -->
    
    109
    +    <string name="connection_assist_try_a_bridge_button">Try a bridge</string>
    
    110
    +
    
    111
    +    <!-- Connection assist. %1$s is connection_assist_choose_a_bridge_manually_link-->
    
    112
    +    <string name="connection_assist_try_a_bridge_learn_more_description1">Tor Browser will need to establish a brief non-Tor connection to determine your location and look up a bridge. If you don’t want to do that, you can %1$s instead.</string>
    
    113
    +    <!-- Connection assist. -->
    
    114
    +    <string name="connection_assist_choose_a_bridge_manually_link">choose a bridge manually</string>
    
    115
    +    <!-- Connection assist. %s is the error code-->
    
    116
    +    <string name="connection_assist_try_a_bridge_learn_more_error_code">Error code: %s</string>
    
    117
    +
    
    118
    +    <!-- Connection assist. -->
    
    119
    +    <string name="connection_assist_trying_a_bridge_title">Trying a bridge…</string>
    
    120
    +
    
    121
    +    <!-- Connection assist. -->
    
    122
    +    <string name="connection_assist_location_error_title">We couldn’t find your location</string>
    
    123
    +    <!-- Connection assist. %1$s is connection_assist_find_bridge_location_description, %2$s is connection_assist_select_country_try_again, %3$s is connection_assist_location_error_learn_more_link-->
    
    124
    +    <string name="connection_assist_location_error_description" translatable="false">%1$s %2$s %3$s</string>
    
    125
    +    <string name="connection_assist_find_bridge_location_description">To find a bridge that can unblock your internet, we need to know where you’re connecting from.</string>
    
    126
    +    <string name="connection_assist_select_country_try_again">Select your country or region and try again.</string>
    
    127
    +    <!-- Connection assist. %1$s is connection_assist_find_bridge_location_description, %2$s is connection_assist_check_location_settings_try_again. %3$s is connection_assist_location_error_learn_more_link-->
    
    128
    +    <string name="connection_assist_location_error_last_try_description">%1$s %2$s %3$s</string>
    
    129
    +    <string name="connection_assist_check_location_settings_try_again">Please check your location settings are correct and try again.</string>
    
    130
    +
    
    131
    +    <string name="connection_assist_location_error_learn_more_link">Learn more</string>
    
    132
    +
    
    133
    +    <!-- Connection assist. -->
    
    134
    +    <string name="connection_assist_location_check_title">We’re still having trouble connecting</string>
    
    135
    +
    
    136
    +    <!-- Connection assist. -->
    
    137
    +    <string name="connection_assist_last_try_title">Trying one more time…</string>
    
    138
    +
    
    139
    +    <!-- Connection assist. -->
    
    140
    +    <string name="connection_assist_final_error_title">We weren’t able to connect automatically</string>
    
    141
    +    <!-- Connection assist. %1$s is connection_assist_final_error_troubleshoot_connection_link. %2$s is connection_assist_final_error_learn_more_link-->
    
    142
    +    <string name="connection_assist_final_error_description1">Despite our best efforts, we weren’t able to connect to Tor. We recommend %1$s and adding a bridge manually instead. %2$s</string>
    
    143
    +    <!-- Connection assist. -->
    
    144
    +    <string name="connection_assist_final_error_troubleshoot_connection_link">troubleshooting your connection</string>
    
    145
    +    <!-- Connection assist. -->
    
    146
    +    <string name="connection_assist_final_error_learn_more_link">Learn more</string>
    
    78 147
     </resources>

  • fenix/tools/tba-fetch-deps.sh
    ... ... @@ -14,7 +14,7 @@ fi
    14 14
     
    
    15 15
     onion_proxy_library="$(ls -1td "$TOR_BROWSER_BUILD/out/tor-onion-proxy-library/"tor-onion-proxy-library-* | head -1)"
    
    16 16
     if [ -z "$onion_proxy_library" ]; then
    
    17
    -	echo "Cannot find Tor Onoin Proxy library artifacts!"
    
    17
    +	echo "Cannot find Tor Onion Proxy library artifacts!"
    
    18 18
     	exit 2
    
    19 19
     fi
    
    20 20