add vpn support (no root anymore for Android 4.0+)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user