Commit edeae5b3 authored by Max Lv's avatar Max Lv

allow auto start in non-root mode

parent 13505db7
...@@ -232,7 +232,7 @@ object Shadowsocks { ...@@ -232,7 +232,7 @@ object Shadowsocks {
if (pref != null) { if (pref != null) {
val status = getActivity.getSharedPreferences(Key.status, Context.MODE_PRIVATE) val status = getActivity.getSharedPreferences(Key.status, Context.MODE_PRIVATE)
val isRoot = status.getBoolean(Key.isRoot, false) val isRoot = status.getBoolean(Key.isRoot, false)
if (Seq(Key.isAutoConnect, Key.isGlobalProxy, Key.isTrafficStat, Key.proxyedApps) if (Seq(Key.isGlobalProxy, Key.isTrafficStat, Key.proxyedApps)
.contains(name)) { .contains(name)) {
pref.setEnabled(enabled && isRoot) pref.setEnabled(enabled && isRoot)
} else { } else {
...@@ -855,7 +855,7 @@ class Shadowsocks ...@@ -855,7 +855,7 @@ class Shadowsocks
for (name <- Shadowsocks.FEATRUE_PREFS) { for (name <- Shadowsocks.FEATRUE_PREFS) {
val pref = findPreference(name) val pref = findPreference(name)
if (pref != null) { if (pref != null) {
if (Seq(Key.isAutoConnect, Key.isGlobalProxy, Key.isTrafficStat, Key.proxyedApps) if (Seq(Key.isGlobalProxy, Key.isTrafficStat, Key.proxyedApps)
.contains(name)) { .contains(name)) {
pref.setEnabled(enabled && isRoot) pref.setEnabled(enabled && isRoot)
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment