Commit 55f25d32 authored by Max Lv's avatar Max Lv

disable NAT mode on lollipop for now

parent 93273cbc
...@@ -4,7 +4,7 @@ import android.Dependencies.{apklib,aar} ...@@ -4,7 +4,7 @@ import android.Dependencies.{apklib,aar}
android.Plugin.androidBuild android.Plugin.androidBuild
platformTarget in Android := "android-19" platformTarget in Android := "android-21"
name := "shadowsocks" name := "shadowsocks"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<uses-sdk <uses-sdk
android:minSdkVersion="16" android:minSdkVersion="16"
android:targetSdkVersion="19"/> android:targetSdkVersion="21"/>
<application <application
android:allowBackup="true" android:allowBackup="true"
......
...@@ -755,7 +755,6 @@ class Shadowsocks ...@@ -755,7 +755,6 @@ class Shadowsocks
} }
private def setPreferenceEnabled(enabled: Boolean) { private def setPreferenceEnabled(enabled: Boolean) {
val isRoot = status.getBoolean(Key.isRoot, false)
for (name <- Shadowsocks.PROXY_PREFS) { for (name <- Shadowsocks.PROXY_PREFS) {
val pref = findPreference(name) val pref = findPreference(name)
if (pref != null) { if (pref != null) {
...@@ -767,7 +766,7 @@ class Shadowsocks ...@@ -767,7 +766,7 @@ class Shadowsocks
if (pref != null) { if (pref != null) {
if (Seq(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 && !isVpnEnabled)
} else { } else {
pref.setEnabled(enabled) pref.setEnabled(enabled)
} }
...@@ -875,8 +874,8 @@ class Shadowsocks ...@@ -875,8 +874,8 @@ class Shadowsocks
def isVpnEnabled: Boolean = { def isVpnEnabled: Boolean = {
if (vpnEnabled < 0) { if (vpnEnabled < 0) {
vpnEnabled = if (Build.VERSION.SDK_INT vpnEnabled = if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP
>= Build.VERSION_CODES.ICE_CREAM_SANDWICH && !status.getBoolean(Key.isRoot, false)) { || !status.getBoolean(Key.isRoot, false)) {
1 1
} else { } else {
0 0
......
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