Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PublicAndroidApps
Nebulo
Commits
b74f136a
Commit
b74f136a
authored
Dec 25, 2020
by
Daniel Wolf
Browse files
Receiver has to be unregistered in onStop() when it is registered in onStart(), not in onDestroy()
parent
f333f830
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/fragment/MainFragment.kt
View file @
b74f136a
...
@@ -221,9 +221,9 @@ class MainFragment : Fragment() {
...
@@ -221,9 +221,9 @@ class MainFragment : Fragment() {
}
}
}
}
override
fun
on
Destroy
()
{
override
fun
on
Stop
()
{
super
.
on
Destroy
()
super
.
on
Stop
()
if
(
vpnStateReceiver
!=
null
)
requireContext
().
unregisterLocalReceiver
(
vpnStateReceiver
!!
)
vpnStateReceiver
?.
also
{
requireContext
().
unregisterLocalReceiver
(
it
)
}
}
}
private
fun
startVpn
()
{
private
fun
startVpn
()
{
...
...
Write
Preview
Supports
Markdown
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