Android service issue fixed - VPN is keep running when connected and ui closed

This commit is contained in:
aman 2022-02-13 22:52:04 +05:30
parent 505c9c6218
commit b63bf2465f
3 changed files with 27 additions and 46 deletions

View file

@ -165,6 +165,7 @@ class VPNService : android.net.VpnService() {
return 0
}
}
NotificationUtil.show(this) // Go foreground
return 1
}
@ -402,8 +403,6 @@ class VPNService : android.net.VpnService() {
prefs.edit()
.putString("lastConf", mConfig.toString())
.apply()
NotificationUtil.show(this) // Go foreground
}
companion object {