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