Huge refactor for better maintainability

This commit is contained in:
Mygod
2018-06-01 20:21:05 +08:00
parent a5bec59bbe
commit 8aa7d6d8c7
35 changed files with 1072 additions and 824 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#000000"
android:pathData="M17 16.99c-1.35 0-2.2 0.42 -2.95 0.8 -0.65 0.33 -1.18 0.6 -2.05 0.6 -0.9 0-1.4-0.25-2.05-0.6-0.75-0.38-1.57-0.8-2.95-0.8s-2.2 0.42 -2.95 0.8 c-0.65 0.33 -1.17 0.6 -2.05 0.6 v1.95c1.35 0 2.2-0.42 2.95-0.8 0.65 -0.33 1.17-0.6 2.05-0.6s1.4 0.25 2.05 0.6 c0.75 0.38 1.57 0.8 2.95 0.8 s2.2-0.42 2.95-0.8c0.65-0.33 1.18-0.6 2.05-0.6 0.9 0 1.4 0.25 2.05 0.6 0.75 0.38 1.58 0.8 2.95 0.8 v-1.95c-0.9 0-1.4-0.25-2.05-0.6-0.75-0.38-1.6-0.8-2.95-0.8zm0-4.45c-1.35 0-2.2 0.43 -2.95 0.8 -0.65 0.32 -1.18 0.6 -2.05 0.6 -0.9 0-1.4-0.25-2.05-0.6-0.75-0.38-1.57-0.8-2.95-0.8s-2.2 0.43 -2.95 0.8 c-0.65 0.32 -1.17 0.6 -2.05 0.6 v1.95c1.35 0 2.2-0.43 2.95-0.8 0.65 -0.35 1.15-0.6 2.05-0.6s1.4 0.25 2.05 0.6 c0.75 0.38 1.57 0.8 2.95 0.8 s2.2-0.43 2.95-0.8c0.65-0.35 1.15-0.6 2.05-0.6s1.4 0.25 2.05 0.6 c0.75 0.38 1.58 0.8 2.95 0.8 v-1.95c-0.9 0-1.4-0.25-2.05-0.6-0.75-0.38-1.6-0.8-2.95-0.8zm2.95-8.08c-0.75-0.38-1.58-0.8-2.95-0.8s-2.2 0.42 -2.95 0.8 c-0.65 0.32 -1.18 0.6 -2.05 0.6 -0.9 0-1.4-0.25-2.05-0.6-0.75-0.37-1.57-0.8-2.95-0.8s-2.2 0.42 -2.95 0.8 c-0.65 0.33 -1.17 0.6 -2.05 0.6 v1.93c1.35 0 2.2-0.43 2.95-0.8 0.65 -0.33 1.17-0.6 2.05-0.6s1.4 0.25 2.05 0.6 c0.75 0.38 1.57 0.8 2.95 0.8 s2.2-0.43 2.95-0.8c0.65-0.32 1.18-0.6 2.05-0.6 0.9 0 1.4 0.25 2.05 0.6 0.75 0.38 1.58 0.8 2.95 0.8 V5.04c-0.9 0-1.4-0.25-2.05-0.58zM17 8.09c-1.35 0-2.2 0.43 -2.95 0.8 -0.65 0.35 -1.15 0.6 -2.05 0.6 s-1.4-0.25-2.05-0.6c-0.75-0.38-1.57-0.8-2.95-0.8s-2.2 0.43 -2.95 0.8 c-0.65 0.35 -1.15 0.6 -2.05 0.6 v1.95c1.35 0 2.2-0.43 2.95-0.8 0.65 -0.32 1.18-0.6 2.05-0.6s1.4 0.25 2.05 0.6 c0.75 0.38 1.57 0.8 2.95 0.8 s2.2-0.43 2.95-0.8c0.65-0.32 1.18-0.6 2.05-0.6 0.9 0 1.4 0.25 2.05 0.6 0.75 0.38 1.58 0.8 2.95 0.8 V9.49c-0.9 0-1.4-0.25-2.05-0.6-0.75-0.38-1.6-0.8-2.95-0.8z" />
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M4,6h18L22,4L4,4c-1.1,0 -2,0.9 -2,2v11L0,17v3h14v-3L4,17L4,6zM23,8h-6c-0.55,0 -1,0.45 -1,1v10c0,0.55 0.45,1 1,1h6c0.55,0 1,-0.45 1,-1L24,9c0,-0.55 -0.45,-1 -1,-1zM22,17h-4v-7h4v7z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M20.5,9.5c0.28,0 0.55,0.04 0.81,0.08L24,6c-3.34,-2.51 -7.5,-4 -12,-4S3.34,3.49 0,6l12,16 3.5,-4.67L15.5,14.5c0,-2.76 2.24,-5 5,-5zM23,16v-1.5c0,-1.38 -1.12,-2.5 -2.5,-2.5S18,13.12 18,14.5L18,16c-0.55,0 -1,0.45 -1,1v4c0,0.55 0.45,1 1,1h5c0.55,0 1,-0.45 1,-1v-4c0,-0.55 -0.45,-1 -1,-1zM22,16h-3v-1.5c0,-0.83 0.67,-1.5 1.5,-1.5s1.5,0.67 1.5,1.5L22,16z"/>
</vector>

View File

@@ -8,16 +8,22 @@
android:layout_height="match_parent"
tools:context="be.mygod.vpnhotspot.MainActivity">
<android.support.v7.widget.Toolbar
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:title="@string/app_name"
android:id="@+id/toolbar"/>
<FrameLayout
android:id="@+id/fragmentHolder"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="0dp"
android:layout_marginStart="0dp"
app:layout_constraintBottom_toTopOf="@+id/navigation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
app:layout_constraintTop_toBottomOf="@+id/toolbar"/>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"

View File

@@ -2,111 +2,18 @@
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="data"
type="be.mygod.vpnhotspot.RepeaterFragment.Data"/>
</data>
<LinearLayout
android:orientation="vertical"
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefresher"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:layout_height="?attr/actionBarSize"
<android.support.v7.widget.RecyclerView
android:id="@+id/clients"
android:layout_width="match_parent"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:touchscreenBlocksFocus="false"
android:id="@+id/toolbar">
<Switch
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="8dp"
android:enabled="@{data.switchEnabled}"
android:checked="@{data.serviceStarted}"
android:onCheckedChanged="@{(_, checked) -> data.setServiceStarted(checked)}"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"/>
</android.support.v7.widget.Toolbar>
<GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/wifi_ssid"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<Space
android:layout_width="8dp"
android:layout_height="0dp"
android:layout_column="1"
android:layout_row="0"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_column="2"
android:layout_row="0"
android:focusable="false"
android:layout_gravity="fill_horizontal"
android:layout_columnWeight="1"
android:text="@{data.ssid}"
tools:text="DIRECT-rA-nd0m"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_row="1"
android:text="@string/repeater_addresses"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_column="2"
android:layout_row="1"
android:layout_gravity="fill_horizontal"
android:layout_columnWeight="1"
android:text="@{data.addresses}"
android:textIsSelectable="true"
tools:text="192.168.49.1/24\nfe80::abcd:efff:1234:5678%p2p-p2p0-0/64\n01:23:45:ab:cd:ef"/>
</GridLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/connected_devices"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#000"
android:backgroundTint="?android:attr/textColorSecondary"/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefresher"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/clients"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbars="vertical"
tools:listitem="@layout/listitem_client"/>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbars="vertical"
tools:listitem="@layout/listitem_client"/>
</android.support.v4.widget.SwipeRefreshLayout>
</layout>

View File

@@ -1,21 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
class="be.mygod.vpnhotspot.SettingsPreferenceFragment"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:title="@string/app_name"
android:id="@+id/toolbar"/>
<fragment
class="be.mygod.vpnhotspot.SettingsPreferenceFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:id="@+id/preference"/>
</LinearLayout>
android:layout_height="match_parent"
android:id="@+id/preference"/>

View File

@@ -1,26 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:orientation="vertical"
<android.support.v7.widget.RecyclerView
android:id="@+id/interfaces"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:title="@string/app_name"
android:id="@+id/toolbar"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/interfaces"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
android:scrollbars="vertical"
tools:listitem="@layout/listitem_interface"/>
</LinearLayout>
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbars="vertical"
tools:listitem="@layout/listitem_interface"/>
</layout>

View File

@@ -11,10 +11,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="8dp">
android:padding="16dp">
<ImageView
android:layout_width="wrap_content"

View File

@@ -5,7 +5,7 @@
<data>
<variable
name="data"
type="be.mygod.vpnhotspot.TetheringFragment.Data"/>
type="be.mygod.vpnhotspot.manage.Data"/>
</data>
<LinearLayout
android:layout_width="match_parent"
@@ -30,7 +30,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
android:orientation="vertical"
android:layout_gravity="center_vertical">
<TextView
android:layout_width="match_parent"
@@ -39,7 +40,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:text="wlan0"/>
<TextView
<be.mygod.vpnhotspot.widget.AutoCollapseTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{data.text}"

View File

@@ -3,19 +3,9 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="be.mygod.vpnhotspot.TetheringFragment"/>
<variable
name="icon"
type="Integer"/>
<variable
name="title"
type="String"/>
<variable
name="tetherListener"
type="TetheringFragment.TetherListener"/>
<variable
name="type"
type="be.mygod.vpnhotspot.net.TetherType"/>
name="data"
type="be.mygod.vpnhotspot.manage.TetherManager.Data"/>
</data>
<LinearLayout
android:layout_width="match_parent"
@@ -30,7 +20,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@{safeUnbox(icon)}"
android:src="@{data.tetherType.icon}"
android:tint="?android:attr/textColorPrimary"
tools:src="@drawable/ic_device_network_wifi"/>
@@ -43,7 +33,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:text="@{title}"
android:text="@{data.title}"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
tools:text="@string/tethering_manage_wifi"/>
@@ -51,7 +41,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:checked="@{tetherListener.isStarted(type, tetherListener.enabledTypes)}"
android:checked="@{data.isStarted}"
android:clickable="false"
android:ellipsize="end"
android:focusable="false"

View File

@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="data"
type="be.mygod.vpnhotspot.manage.RepeaterManager.Data"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:background="?android:attr/selectableItemBackground"
android:padding="16dp"
android:onClick="@{_ -> data.toggle()}">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_device_network_wifi"
android:tint="?android:attr/textColorPrimary"/>
<Space
android:layout_width="16dp"
android:layout_height="0dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_repeater"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<be.mygod.vpnhotspot.widget.AutoCollapseTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{data.addresses}"
android:textIsSelectable="true"
tools:text="192.168.43.1/24\n01:23:45:ab:cd:ef"/>
</LinearLayout>
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:checked="@{data.serviceStarted}"
android:enabled="@{data.switchEnabled}"
android:clickable="false"
android:ellipsize="end"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:focusable="true"
android:padding="16dp"
android:onClick="@{_ -> data.editConfigurations()}">
<Space
android:layout_width="40dp"
android:layout_height="0dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_device_wifi_lock"
android:tint="?android:attr/textColorPrimary"/>
<Space
android:layout_width="16dp"
android:layout_height="0dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_ssid"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<be.mygod.vpnhotspot.widget.AutoCollapseTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{data.ssid}"
tools:text="…"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<Space
android:layout_width="40dp"
android:layout_height="0dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_content_wave"
android:tint="?android:attr/textColorPrimary"/>
<Space
android:layout_width="16dp"
android:layout_height="0dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_service_repeater_oc"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@={data.oc}"
android:inputType="number"
android:imeOptions="actionDone"
android:maxLength="3"
android:hint="@string/settings_service_repeater_oc_summary"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:background="?android:attr/selectableItemBackground"
android:padding="16dp"
android:onClick="@{_ -> data.wps()}"
android:visibility="@{data.serviceStarted}">
<Space
android:layout_width="40dp"
android:layout_height="0dp"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_wps"
android:tint="?android:attr/textColorPrimary"/>
<Space
android:layout_width="16dp"
android:layout_height="0dp"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/repeater_wps"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/navigation_repeater"
android:icon="@drawable/ic_device_network_wifi"
android:title="@string/title_repeater"/>
<item
android:id="@+id/navigation_tethering"
android:icon="@drawable/ic_device_wifi_tethering"
android:title="@string/title_tethering"/>
<item
android:id="@+id/navigation_clients"
android:icon="@drawable/ic_device_devices"
android:title="@string/title_clients"/>
<item
android:id="@+id/navigation_settings"
android:icon="@drawable/ic_action_settings"

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/wps"
android:icon="@drawable/ic_wps"
android:title="@string/repeater_wps"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/edit"
android:icon="@drawable/ic_image_edit"
android:title="@string/repeater_configure"
app:showAsAction="ifRoom"/>
</menu>

View File

@@ -2,11 +2,10 @@
<resources>
<string name="app_name">VPN 热点</string>
<string name="title_repeater">无线中继</string>
<string name="title_tethering">系统共享</string>
<string name="title_tethering">共享管理</string>
<string name="title_clients">已连设备</string>
<string name="title_settings">设置选项</string>
<string name="service_inactive">未打开</string>
<string name="repeater_addresses">中继地址</string>
<string name="repeater_wps_dialog_title">输入 PIN</string>
<string name="repeater_wps_dialog_pbc">一键加密</string>
<string name="repeater_wps_success_pbc">请在 2 分钟内在需要连接的设备上使用一键加密以连接到此中继。</string>
@@ -51,7 +50,6 @@
<string name="tethering_manage_bluetooth">蓝牙网络共享</string>
<string name="tethering_manage_failed">Android 系统无法打开网络共享。</string>
<string name="connected_devices">已连接设备</string>
<string name="connected_state_incomplete">%s (正在连接)</string>
<string name="connected_state_valid">%s (已连上)</string>
<string name="connected_state_failed">%s (已断开)</string>
@@ -60,7 +58,7 @@
<string name="settings_service_repeater_oc">Wi\u2011Fi 运行频段 (不稳定)</string>
<string name="settings_service_repeater_oc_summary">"自动 (1\u201114 = 2.4GHz, 15\u2011165 = 5GHz)"</string>
<string name="settings_service_repeater_strict">严格模式</string>
<string name="settings_service_repeater_strict_summary">只允许通过 VPN 隧道的包通过,适用于临时热点</string>
<string name="settings_service_repeater_strict_summary">只允许通过 VPN 隧道的包通过,适用于系统共享</string>
<string name="settings_service_dns">备用 DNS 服务器[:端口]</string>
<string name="settings_service_clean">清理/重新应用路由规则</string>
<string name="settings_misc">杂项</string>

View File

@@ -12,10 +12,9 @@
<string name="app_name">VPN Hotspot</string>
<string name="title_repeater">Repeater</string>
<string name="title_tethering">Tethering</string>
<string name="title_clients">Clients</string>
<string name="title_settings">Settings</string>
<string name="service_inactive">Service inactive</string>
<string name="repeater_addresses">Addresses</string>
<string name="repeater_wps">WPS</string>
<string name="repeater_wps_dialog_title">Enter PIN</string>
<string name="repeater_wps_dialog_pbc">Push Button</string>
@@ -54,7 +53,6 @@
<string name="tethering_manage_bluetooth">Bluetooth tethering</string>
<string name="tethering_manage_failed">Android system has failed to start tethering.</string>
<string name="connected_devices">Connected devices</string>
<string name="connected_state_incomplete">%s (connecting)</string>
<string name="connected_state_valid">%s (reachable)</string>
<string name="connected_state_failed">%s (lost)</string>
@@ -63,8 +61,8 @@
<string name="settings_service_repeater_oc">Operating Wi\u2011Fi channel (unstable)</string>
<string name="settings_service_repeater_oc_summary">Auto (1\u201114 = 2.4GHz, 15\u2011165 = 5GHz)</string>
<string name="settings_service_repeater_strict">Strict mode</string>
<string name="settings_service_repeater_strict_summary">Only allow packets that goes through VPN tunnel, also
applies to temporary Wi\u2011Fi hotspot.</string>
<string name="settings_service_repeater_strict_summary">Only allow packets that goes through VPN tunnel. Does not
apply to system tethering.</string>
<string name="settings_service_dns">Fallback DNS server[:port]</string>
<string name="settings_service_clean">Clean/reapply routing rules</string>
<string name="settings_misc">Misc</string>

View File

@@ -1,21 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/title_repeater">
<AutoSummaryEditTextPreference
android:key="service.repeater.oc"
android:title="@string/settings_service_repeater_oc"
android:summary="@string/settings_service_repeater_oc_summary"
android:hint="@string/settings_service_repeater_oc_summary"
android:inputType="number"
android:maxLength="3"/>
android:title="@string/settings_service">
<SwitchPreference
android:key="service.repeater.strict"
android:title="@string/settings_service_repeater_strict"
android:summary="@string/settings_service_repeater_strict_summary"/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/settings_service">
<AutoSummaryEditTextPreference
android:key="service.dns"
android:title="@string/settings_service_dns"