From 0f2ae6521bff6b1fdc39d98c28f32437c9c1f30c Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 11 Mar 2016 22:53:18 +0800 Subject: [PATCH] Oops fix a bug --- .../scala/com/github/shadowsocks/ShadowsocksSettings.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala index c99199fe..5e9218fc 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala @@ -15,7 +15,7 @@ import android.webkit.{WebView, WebViewClient} import com.github.shadowsocks.database.Profile import com.github.shadowsocks.preferences._ import com.github.shadowsocks.utils.CloseUtils._ -import com.github.shadowsocks.utils.Key +import com.github.shadowsocks.utils.{Key, Utils} object ShadowsocksSettings { // Constants @@ -198,7 +198,8 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan this.enabled = enabled for (name <- Key.isNAT #:: PROXY_PREFS.toStream #::: FEATURE_PREFS.toStream) { val pref = findPreference(name) - if (pref != null) pref.setEnabled(enabled) + if (pref != null) pref.setEnabled(enabled && + (name != Key.isProxyApps || Utils.isLollipopOrAbove || !ShadowsocksApplication.isVpnEnabled)) } }