implement per-app VPN for Android 5.0

This commit is contained in:
Max Lv
2014-10-19 18:23:27 +08:00
parent 55f25d3272
commit 5f95cccce4
4 changed files with 35 additions and 6 deletions
@@ -766,7 +766,7 @@ class Shadowsocks
if (pref != null) {
if (Seq(Key.isGlobalProxy, Key.isTrafficStat, Key.proxyedApps)
.contains(name)) {
pref.setEnabled(enabled && !isVpnEnabled)
pref.setEnabled(enabled && (!isVpnEnabled || Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP))
} else {
pref.setEnabled(enabled)
}