aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/res
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-11-28 20:11:38 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-12-01 12:00:50 +0100
commitf0b1761ec3826b72fe3b20032b532dc5b1adfc1c (patch)
tree823fdcf119dd96bc062a22dc3527943cc407e23e /src/main/res
parent06cadab7ccd315c35f1325b4d95f0bf7a24082ea (diff)
initial tor support
Diffstat (limited to '')
-rw-r--r--src/main/res/layout/activity_edit_account.xml54
-rw-r--r--src/main/res/menu/editaccount.xml5
-rw-r--r--src/main/res/values/strings.xml8
-rw-r--r--src/main/res/xml/preferences.xml7
4 files changed, 73 insertions, 1 deletions
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index 8d60f5f1..73395bba 100644
--- a/src/main/res/layout/activity_edit_account.xml
+++ b/src/main/res/layout/activity_edit_account.xml
@@ -78,7 +78,59 @@
android:textColorHint="@color/black54"
android:textSize="?attr/TextSizeBody" />
- <CheckBox
+ <LinearLayout
+ android:id="@+id/name_port"
+ android:layout_marginTop="8dp"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:weightSum="1">
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="0.8">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/account_settings_hostname"
+ android:textColor="@color/black87"
+ android:textSize="?attr/TextSizeBody"
+ android:id="@+id/textView"/>
+ <EditText
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:textColor="@color/black87"
+ android:textColorHint="@color/black54"
+ android:textSize="?attr/TextSizeBody"
+ android:id="@+id/hostname"
+ android:inputType="textNoSuggestions"
+ android:hint="@string/hostname_or_onion"/>
+ </LinearLayout>
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="0.2"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/account_settings_port"
+ android:textColor="@color/black87"
+ android:textSize="?attr/TextSizeBody"/>
+ <EditText
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:inputType="number"
+ android:maxLength="5"
+ android:textColor="@color/black87"
+ android:textColorHint="@color/black54"
+ android:textSize="?attr/TextSizeBody"
+ android:id="@+id/port"/>
+ </LinearLayout>
+ </LinearLayout>
+ <CheckBox
android:id="@+id/account_register_new"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/src/main/res/menu/editaccount.xml b/src/main/res/menu/editaccount.xml
index 62981a45..b7a40418 100644
--- a/src/main/res/menu/editaccount.xml
+++ b/src/main/res/menu/editaccount.xml
@@ -31,4 +31,9 @@
<item android:id="@+id/action_clear_devices"
android:title="@string/clear_other_devices"
android:showAsAction="never"/>
+ <item
+ android:id="@+id/action_settings"
+ android:orderInCategory="100"
+ android:showAsAction="never"
+ android:title="@string/action_settings"/>
</menu> \ No newline at end of file
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index fa484a82..eaff3534 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -540,4 +540,12 @@
<string name="error_fetching_omemo_key">Error fetching OMEMO key!</string>
<string name="verified_omemo_key_with_certificate">Verified OMEMO key with certificate!</string>
<string name="device_does_not_support_certificates">Your device does not support the selection of client certificates!</string>
+ <string name="pref_connection_options">Connection options</string>
+ <string name="pref_use_tor">Connect via Tor</string>
+ <string name="pref_use_tor_summary">Tunnel all connections through the TOR network. Requires Orbot</string>
+ <string name="account_settings_hostname">Hostname</string>
+ <string name="account_settings_port">Port</string>
+ <string name="hostname_or_onion">Server- or .onion-Address</string>
+ <string name="not_a_valid_port">This is not a valid port number</string>
+ <string name="not_valid_hostname">This is not a valid hostname</string>
</resources>
diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml
index f05738ac..6ef3c029 100644
--- a/src/main/res/xml/preferences.xml
+++ b/src/main/res/xml/preferences.xml
@@ -147,6 +147,13 @@
android:summary="@string/pref_remove_trusted_certificates_summary"
android:title="@string/pref_remove_trusted_certificates_title"/>
</PreferenceCategory>
+ <PreferenceCategory android:title="@string/pref_connection_options">
+ <CheckBoxPreference
+ android:defaultValue="false"
+ android:key="use_tor"
+ android:title="@string/pref_use_tor"
+ android:summary="@string/pref_use_tor_summary"/>
+ </PreferenceCategory>
<PreferenceCategory android:title="@string/pref_input_options">
<CheckBoxPreference
android:defaultValue="false"