]> git.ipfire.org Git - thirdparty/strongswan.git/commit
android: Request permission to display notifications on Android 13
authorTobias Brunner <tobias@strongswan.org>
Tue, 29 Aug 2023 15:45:32 +0000 (17:45 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 29 Aug 2023 16:03:30 +0000 (18:03 +0200)
commitddf84c165d94811a025f128fb6016f5911d6b179
treea51ccdf33932fced36f0844ef07df7b4a674aefa
parent3839bcfe878d1e866fa63ab9074a2e7b59d26dd1
android: Request permission to display notifications on Android 13

Note that displaying the notification for the background service is
apparently not strictly necessary.  So it's fine if the user wants to
hide it.  That the service is running can still be seen in the task
manager (pull down the status drawer twice, there is a bullet with a number
at the bottom if the service is running).

Simply use the system dialog.  If the user denies it twice, it won't show
up again.  The explanation dialog would not show up the first time (i.e.
shouldShowRequestPermissionRationale() returns false), only once the user
denied the permission once.  Currently seems like a bit much work
as we don't need the user to allow notifications.
src/frontends/android/app/src/main/AndroidManifest.xml
src/frontends/android/app/src/main/java/org/strongswan/android/ui/VpnProfileControlActivity.java