Add a toggle for showing traffic in notification.

TODO: Disabling it causes weird behavior. :-(
This commit is contained in:
Mygod
2015-11-24 21:16:08 +08:00
parent 9fa57dfe4b
commit c1730e4fa6
8 changed files with 43 additions and 29 deletions
+1 -2
View File
@@ -32,8 +32,7 @@
<string name="bypass_apps_summary">启用该选项,以使所选应用程序的流量不经过代理</string>
<string name="auto_connect">自动连接</string>
<string name="auto_connect_summary">随系统启动后台服务</string>
<string name="traffic_stat">流量统计</string>
<string name="traffic_stat_summary">在通知栏上显示当前上下行速率</string>
<string name="notification_traffic">在通知内显示当前上下行速率</string>
<string name="forward_success">后台服务已开始运行。</string>
<string name="service_running">影梭 → %s</string>
<string name="service_failed">无法连接远程服务器</string>
+1 -2
View File
@@ -13,6 +13,7 @@
<string name="nat_summary">Use NAT mode instead of VPN mode</string>
<string name="nat_summary_no_root">NAT mode is disabled without root</string>
<string name="stat">Network Traffic</string>
<string name="notification_traffic">Show traffic in notification</string>
<string name="stat_summary">Sent: \t\t\t\t\t%3$s\t↑\t%1$s/s\nReceived: \t%4$s\t↓\t%2$s/s</string>
<string name="stat_profiles">\n%1$s↑\t%2$s↓</string>
<string name="traffic_summary">%1$s/s↑\t%2$s/s↓</string>
@@ -55,8 +56,6 @@
<string name="bypass_apps_summary">Enable this option to bypass selected apps</string>
<string name="auto_connect">Auto Connect</string>
<string name="auto_connect_summary">Enable Shadowsocks on startup</string>
<string name="traffic_stat">Traffic Stats</string>
<string name="traffic_stat_summary">Show traffic stats in notification bar</string>
<string name="udp_dns">UDP Forwarding</string>
<string name="udp_dns_summary">Forward UDP packets to remote</string>
+2
View File
@@ -82,6 +82,8 @@
android:key="isAutoConnect"
android:summary="@string/auto_connect_summary"
android:title="@string/auto_connect"/>
<SwitchPreference android:key="notificationTraffic" android:defaultValue="true"
android:title="@string/notification_traffic"/>
<com.github.shadowsocks.preferences.NatSwitchPreference android:key="isNAT"
android:title="@string/nat"