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
821c6eb9
Commit
821c6eb9
authored
Aug 20, 2021
by
Daniel Wolf
Browse files
Do not run vpn watchdog when in non-VPN mode
parent
a5ae877e
Pipeline
#7824
passed with stage
in 17 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/service/DnsVpnService.kt
View file @
821c6eb9
...
...
@@ -1444,9 +1444,15 @@ class DnsVpnService : VpnService(), Runnable, CoroutineScope {
hideBadConnectionNotification
()
},
logger
=
this
@DnsVpnService
.
logger
,
advancedLogging
=
getPreferences
().
advancedLogging
)
}
vpnWatchdog
=
VpnWatchDog
({
showVpnRevokedNotification
()
},
this
)
vpnWatchdog
=
if
(!
runInNonVpnMode
)
{
vpnWatchdog
?.
stop
()
VpnWatchDog
({
showVpnRevokedNotification
()
},
this
)
}
else
{
vpnWatchdog
?.
stop
()
null
}
}
private
fun
createQueryLogger
():
QueryListener
?
{
...
...
app/src/main/java/com/frostnerd/smokescreen/service/VpnWatchDog.kt
View file @
821c6eb9
...
...
@@ -26,7 +26,7 @@ import kotlinx.coroutines.*
* You can contact the developer at daniel.wolf@frostnerd.com.
*/
class
VpnWatchDog
(
private
val
onVpnDisconnected
:()
->
Unit
,
private
val
context
:
Context
)
{
context
:
Context
)
{
private
val
supervisor
=
SupervisorJob
()
private
val
scope
=
CoroutineScope
(
supervisor
+
Dispatchers
.
IO
)
private
var
running
=
true
...
...
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