Fix Android 11 notification action not clickable#793
Conversation
… for all Workers, thus fixing intent handling on Android 11 and older Fixes tailscale/tailscale#19772 Signed-off-by: Pawloland <59684145+Pawloland@users.noreply.github.com>
|
I tested the intents with bellow adb commands. It works as expected on Android 11 now. I also added guards inside, so workers are triggered only when the actual state changes. Otherwise the temporary notification which is always sent by the system on older Androids, when expedited worker request is run, would replace the normal status notification, the one with the connect/disconnect button. Since the state would not change, the rerender of the default notification would not be triggered, but the temporary one would be, and it would be shown until the VPN is connected again, triggering the change in prefs and rerender of the default notification. This fixed the issue which made it apparent to me - non clickable connect/disconnect button in the notification, but it fundamentally fixes intent handling on older APIs, so 3rd party apps integrations on those. |
Fix expedited WorkRequests by implementing getForegroundInfo() method for all Workers, thus fixing intent handling on Android 11 and older.
Fixes tailscale/tailscale#19772