tuning boot code to work with VPN

This commit is contained in:
Nathan Freitas 2015-02-23 12:29:36 -05:00
parent b2ec768d8d
commit dd09c6b19a
1 changed files with 1 additions and 0 deletions

View File

@ -34,6 +34,7 @@ public class OnBootReceiver extends BroadcastReceiver {
public void startVpnService (Context context) public void startVpnService (Context context)
{ {
Intent intent = VpnService.prepare(context); Intent intent = VpnService.prepare(context);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (intent != null) { if (intent != null) {
context.startActivity(intent); context.startActivity(intent);
} }