Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
fenix
Commits
89af908e
Commit
89af908e
authored
Sep 18, 2020
by
Matthew Finkel
Browse files
Bug 40041: Integrate Tor Network Settings
parent
5b08b682
Changes
7
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
View file @
89af908e
...
...
@@ -108,7 +108,6 @@ import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.DefaultTopSite
import
org.mozilla.fenix.onboarding.FenixOnboarding
import
org.mozilla.fenix.settings.SupportUtils
import
org.mozilla.fenix.settings.deletebrowsingdata.deleteAndQuit
import
org.mozilla.fenix.tor.TorEvents
import
org.mozilla.fenix.tor.bootstrap.TorQuickStart
import
org.mozilla.fenix.theme.ThemeManager
import
org.mozilla.fenix.utils.FragmentPreDrawManager
...
...
@@ -1146,6 +1145,10 @@ class HomeFragment : Fragment() {
}
private
fun
openTorNetworkSettings
()
{
val
directions
=
HomeFragmentDirections
.
actionHomeFragmentToTorNetworkSettingsFragment
()
findNavController
().
navigate
(
directions
)
}
companion
object
{
...
...
app/src/main/res/drawable/ic_tor_network_settings.png
deleted
100644 → 0
View file @
5b08b682
475 Bytes
app/src/main/res/drawable/ic_tor_network_settings.xml
0 → 100644
View file @
89af908e
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
>
<path
android:pathData=
"M12,0.75C18.2132,0.75 23.25,5.7865 23.25,11.9997C23.25,18.2132 18.2132,23.25 12,23.25C5.7865,23.25 0.75,18.2132 0.75,11.9997C0.75,5.7865 5.7865,0.75 12,0.75ZM12.0231,2.7958L12.0231,4.1596C16.3429,4.172 19.8408,7.677 19.8408,11.9997C19.8408,16.3227 16.3429,19.8277 12.0231,19.8401L12.0231,19.8401L12.0231,21.2039C17.0961,21.1914 21.2042,17.0758 21.2042,11.9997C21.2042,6.9239 17.0961,2.8086 12.0231,2.7958L12.0231,2.7958ZM12.0231,6.2057L12.0231,7.5691C14.4596,7.5819 16.4318,9.56 16.4318,11.9997C16.4318,14.4397 14.4596,16.4178 12.0231,16.4306L12.0231,16.4306L12.0231,17.794C15.2131,17.7816 17.7956,15.1928 17.7956,11.9997C17.7956,8.8069 15.2131,6.2181 12.0231,6.2057L12.0231,6.2057ZM12.0231,9.6146L12.0231,14.3851C13.3301,14.3726 14.3863,13.3101 14.3863,11.9997C14.3863,10.6896 13.3301,9.6271 12.0231,9.6146L12.0231,9.6146Z"
android:strokeAlpha=
"0.8"
android:strokeWidth=
"1"
android:fillColor=
"?attr/primaryText"
android:fillType=
"evenOdd"
android:strokeColor=
"#00000000"
android:fillAlpha=
"0.8"
/>
</vector>
app/src/main/res/navigation/nav_graph.xml
View file @
89af908e
...
...
@@ -144,6 +144,13 @@
android:defaultValue=
"@null"
app:argType=
"string"
app:nullable=
"true"
/>
<action
android:id=
"@+id/action_homeFragment_to_torNetworkSettingsFragment"
app:destination=
"@id/torNetworkSettingsFragment"
app:enterAnim=
"@anim/slide_in_right"
app:exitAnim=
"@anim/slide_out_left"
app:popEnterAnim=
"@anim/slide_in_left"
app:popExitAnim=
"@anim/slide_out_right"
/>
</fragment>
<dialog
...
...
@@ -506,6 +513,13 @@
app:exitAnim=
"@anim/slide_out_left"
app:popEnterAnim=
"@anim/slide_in_left"
app:popExitAnim=
"@anim/slide_out_right"
/>
<action
android:id=
"@+id/action_settingsFragment_to_torNetworkSettingsFragment"
app:destination=
"@id/torNetworkSettingsFragment"
app:enterAnim=
"@anim/slide_in_right"
app:exitAnim=
"@anim/slide_out_left"
app:popEnterAnim=
"@anim/slide_in_left"
app:popExitAnim=
"@anim/slide_out_right"
/>
<action
android:id=
"@+id/action_settingsFragment_to_trackingProtectionFragment"
app:destination=
"@id/trackingProtectionFragment"
...
...
@@ -655,6 +669,23 @@
android:id=
"@+id/privateBrowsingFragment"
android:name=
"org.mozilla.fenix.settings.PrivateBrowsingFragment"
android:label=
"@string/preferences_private_browsing_options"
/>
<fragment
android:id=
"@+id/torNetworkSettingsFragment"
android:name=
"org.mozilla.fenix.settings.TorNetworkSettingsFragment"
>
<action
android:id=
"@+id/action_torNetworkSettingsFragment_to_torBridgeConfigFragment"
app:destination=
"@id/torBridgeConfigFragment"
app:enterAnim=
"@anim/slide_in_right"
app:exitAnim=
"@anim/slide_out_left"
app:popEnterAnim=
"@anim/slide_in_left"
app:popExitAnim=
"@anim/slide_out_right"
/>
</fragment>
<fragment
android:id=
"@+id/torBridgeConfigFragment"
android:name=
"org.mozilla.fenix.settings.TorBridgeConfigFragment"
android:label=
"@string/preferences_tor_network_settings_bridge_config"
tools:layout=
"@layout/fragment_tor_bridge_config"
>
</fragment>
<fragment
android:id=
"@+id/trackingProtectionFragment"
android:name=
"org.mozilla.fenix.settings.TrackingProtectionFragment"
>
...
...
app/src/main/res/values/torbrowser_strings.xml
View file @
89af908e
...
...
@@ -46,8 +46,8 @@
<string
name=
"preferences_tor_network_settings_status"
>
Current Status
</string>
<string
name=
"preferences_tor_network_settings_tor_ready"
>
Is Tor Ready: %s
</string>
<string
name=
"preferences_tor_network_settings_state"
>
State: %s
</string>
<string
name=
"preferences_tor_network_settings_yes"
>
y
es
</string>
<string
name=
"preferences_tor_network_settings_no"
>
n
o
</string>
<string
name=
"preferences_tor_network_settings_yes"
>
Y
es
</string>
<string
name=
"preferences_tor_network_settings_no"
>
N
o
</string>
<string
name=
"preferences_tor_network_settings_disconnected"
>
Disconnected
</string>
<string
name=
"preferences_tor_network_settings_connecting"
>
Connecting
</string>
<string
name=
"preferences_tor_network_settings_connected"
>
Connected
</string>
...
...
app/src/main/res/xml/preferences.xml
View file @
89af908e
...
...
@@ -96,6 +96,11 @@
app:isPreferenceVisible=
"false"
android:title=
"@string/preferences_private_browsing_options"
/>
<androidx.preference.Preference
android:icon=
"@drawable/ic_tor_network_settings"
android:key=
"@string/pref_key_tor_network_settings"
android:title=
"@string/preferences_tor_network_settings"
/>
<androidx.preference.Preference
android:icon=
"@drawable/ic_tracking_protection_enabled"
android:key=
"@string/pref_key_tracking_protection_settings"
...
...
app/src/main/res/xml/tor_network_settings_preferences.xml
View file @
89af908e
...
...
@@ -6,11 +6,6 @@
<Preference
android:key=
"@string/pref_key_tor_network_settings_explanation"
android:title=
"@string/preferences_tor_network_settings_explanation"
/>
<Preference
android:icon=
"@drawable/ic_tor_config_bridge"
android:key=
"@string/pref_key_tor_network_settings_bridge_config"
android:title=
"@string/preferences_tor_network_settings_bridge_config"
android:summary=
"@string/preferences_tor_network_settings_bridge_config_description"
/>
<androidx.preference.PreferenceCategory
android:key=
"@string/pref_key_tor_network_settings_status"
android:title=
"@string/preferences_tor_network_settings_status"
...
...
@@ -26,4 +21,10 @@
android:key=
"@string/pref_key_tor_network_settings_bridges_enabled"
android:title=
"@string/preferences_tor_network_settings_bridges_enabled"
/>
</androidx.preference.PreferenceCategory>
<Preference
android:icon=
"@drawable/ic_tor_config_bridge"
android:key=
"@string/pref_key_tor_network_settings_bridge_config"
android:title=
"@string/preferences_tor_network_settings_bridge_config"
android:summary=
"@string/preferences_tor_network_settings_bridge_config_description"
app:allowDividerAbove=
"true"
/>
</androidx.preference.PreferenceScreen>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment