Commit 0f2ae652 authored by Mygod's avatar Mygod

Oops fix a bug

parent 4c1a817c
...@@ -15,7 +15,7 @@ import android.webkit.{WebView, WebViewClient} ...@@ -15,7 +15,7 @@ import android.webkit.{WebView, WebViewClient}
import com.github.shadowsocks.database.Profile import com.github.shadowsocks.database.Profile
import com.github.shadowsocks.preferences._ import com.github.shadowsocks.preferences._
import com.github.shadowsocks.utils.CloseUtils._ import com.github.shadowsocks.utils.CloseUtils._
import com.github.shadowsocks.utils.Key import com.github.shadowsocks.utils.{Key, Utils}
object ShadowsocksSettings { object ShadowsocksSettings {
// Constants // Constants
...@@ -198,7 +198,8 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan ...@@ -198,7 +198,8 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan
this.enabled = enabled this.enabled = enabled
for (name <- Key.isNAT #:: PROXY_PREFS.toStream #::: FEATURE_PREFS.toStream) { for (name <- Key.isNAT #:: PROXY_PREFS.toStream #::: FEATURE_PREFS.toStream) {
val pref = findPreference(name) val pref = findPreference(name)
if (pref != null) pref.setEnabled(enabled) if (pref != null) pref.setEnabled(enabled &&
(name != Key.isProxyApps || Utils.isLollipopOrAbove || !ShadowsocksApplication.isVpnEnabled))
} }
} }
......
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