add vpn support (no root anymore for Android 4.0+)

This commit is contained in:
Max Lv
2013-05-05 20:57:34 +08:00
parent 503547a012
commit 5808d574bf
967 changed files with 225911 additions and 88 deletions
@@ -85,8 +85,16 @@ class ShadowsocksReceiver extends BroadcastReceiver {
return
}
}
val it: Intent = new Intent(context, classOf[ShadowsocksService])
context.startService(it)
if (Utils.getRoot) {
if (ShadowsocksService.isServiceStarted) return
val it: Intent = new Intent(context, classOf[ShadowsocksService])
context.startService(it)
} else {
if (ShadowVpnService.isServiceStarted) return
val it: Intent = new Intent(context, classOf[ShadowVpnService])
context.startService(it)
}
}
}
}