we don't need a separate service for the VPN
This commit is contained in:
parent
7950cac801
commit
7c3a16f86f
|
@ -121,13 +121,5 @@
|
|||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!--
|
||||
<service android:name="org.torproject.android.vpn.OrbotVpnService"
|
||||
android:permission="android.permission.BIND_VPN_SERVICE">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.VpnService"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
-->
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -12,10 +12,12 @@ import org.torproject.android.vpn.VPNEnableActivity;
|
|||
|
||||
public class OnBootReceiver extends BroadcastReceiver {
|
||||
|
||||
private static boolean sReceivedBoot = false;
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Prefs.setContext(context);
|
||||
if (Prefs.startOnBoot())
|
||||
if (Prefs.startOnBoot() && (!sReceivedBoot))
|
||||
{
|
||||
|
||||
if (Prefs.useVpn())
|
||||
|
@ -23,6 +25,7 @@ public class OnBootReceiver extends BroadcastReceiver {
|
|||
else
|
||||
startService(TorServiceConstants.ACTION_START, context);
|
||||
|
||||
sReceivedBoot = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue