Commit b322e530 authored by n8fr8's avatar n8fr8
Browse files

make sure receiver unregisters when destroyed

parent 2bd56142
......@@ -428,6 +428,14 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
@Override
public void onDestroy() {
try {
unregisterReceiver(mNetworkStateReceiver);
}
catch (IllegalArgumentException iae)
{
//not registered yet
}
stopTor();
/**
......@@ -476,13 +484,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
clearNotifications();
sendCallbackStatus(STATUS_OFF);
try {
unregisterReceiver(mNetworkStateReceiver);
}
catch (IllegalArgumentException iae)
{
//not registered yet
}
}
private void killAllDaemons() throws Exception {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment