Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ANON-Public
orbot
Commits
b322e530
Commit
b322e530
authored
Oct 16, 2017
by
n8fr8
Browse files
make sure receiver unregisters when destroyed
parent
2bd56142
Changes
1
Hide whitespace changes
Inline
Side-by-side
orbotservice/src/main/java/org/torproject/android/service/TorService.java
View file @
b322e530
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment