make sure tor network is re-enabled when user tries to restart
This commit is contained in:
parent
d09c2b59b4
commit
ff61d66bcf
|
@ -581,14 +581,13 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
|||
|
||||
if (mNotificationManager == null)
|
||||
{
|
||||
|
||||
IntentFilter mNetworkStateFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||
registerReceiver(mNetworkStateReceiver , mNetworkStateFilter);
|
||||
|
||||
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
}
|
||||
|
||||
IntentFilter mNetworkStateFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||
registerReceiver(mNetworkStateReceiver , mNetworkStateFilter);
|
||||
|
||||
|
||||
new Thread(new Runnable ()
|
||||
{
|
||||
public void run ()
|
||||
|
@ -773,6 +772,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
|||
} else if (mCurrentStatus == STATUS_ON) {
|
||||
|
||||
sendCallbackLogMessage("Ignoring start request, already started.");
|
||||
setTorNetworkEnabled (true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1521,7 +1521,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
|||
mNetworkType = newNetType;
|
||||
mConnectivity = newConnectivityState;
|
||||
|
||||
if (doNetworKSleep)
|
||||
if (doNetworKSleep && mCurrentStatus != STATUS_OFF)
|
||||
{
|
||||
setTorNetworkEnabled (mConnectivity);
|
||||
|
||||
|
@ -1539,18 +1539,15 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
|||
|
||||
try {
|
||||
|
||||
if (mCurrentStatus != STATUS_OFF)
|
||||
if (mConnectivity)
|
||||
{
|
||||
if (mConnectivity)
|
||||
if (Prefs.useRoot() && Prefs.useTransparentProxying() && Prefs.transProxyNetworkRefresh())
|
||||
{
|
||||
if (Prefs.useRoot() && Prefs.useTransparentProxying() && Prefs.transProxyNetworkRefresh())
|
||||
{
|
||||
|
||||
|
||||
disableTransparentProxy();
|
||||
enableTransparentProxy();
|
||||
disableTransparentProxy();
|
||||
enableTransparentProxy();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue