-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android: make disconnected notification non-foreground #391
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments.
I'm not 100% sure we want to do this. Dropping this means that we lose the disconnected state status bar icon.
Put disconnected notification back in, but it is no longer a persistent notification. Also fix issue so that the correct notification is used for always-on VPN and when IPNService is restarted after being killed |
@@ -41,6 +41,7 @@ open class IPNService : VpnService(), libtailscale.IPNService { | |||
// This means we were started by Android due to Always On VPN. | |||
// Get the application to make sure it's been initialized, then | |||
// request the VPN. | |||
showForegroundNotification() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this? I think it might not work because I'm not sure that startForeground()
has been called in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using non-foreground notification. Also canceling notifications when App closes to clear any lingering notifications, and only showing a disconnected notification when in the Stopped state.
fc6e776
to
acd0e6f
Compare
Follow-up to #389 Only use foreground notifications when VPN was started as a foreground service. Updates #cleanup Signed-off-by: kari-ts <kari@tailscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Follow-up to #389
Use foreground notifications only when the service was started as a foreground service
Updates #cleanup