]> git.ipfire.org Git - thirdparty/strongswan.git/commit
android: Add Quick Settings tile to toggle VPN state
authorTobias Brunner <tobias@strongswan.org>
Fri, 8 Jun 2018 12:22:52 +0000 (14:22 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 3 Jul 2018 09:31:35 +0000 (11:31 +0200)
commit64b7a6d62222544806ebc6e5c9fefc37272ad891
tree376e5291991b3d92c866f28e7598fb6294709756
parent08c79d5112f346cfd98255430a916929343d2f2c
android: Add Quick Settings tile to toggle VPN state

Only if there is no currently active (or previously active) profile does
this currently operate on the configured (or stored most recently used)
profile.  This way it's possible to use a different connection and
quickly disable and re-enable it again.  When unlocked the profile name
is shown, when locked a generic text is used (this detection doesn't seem
to work 100% reliably).  To disconnect, the user is forced to unlock the
device, connecting is possible without, if the credentials are available
and no fatal error occurs (it even works with the system credential store,
at least on Android 8.1).

Note that the tile is not available right after a reboot.  It seems that
the system has to be unlocked once to activate third-party tiles (will
be interesting to see how this works together with Always-on VPN).
12 files changed:
src/frontends/android/app/src/main/AndroidManifest.xml
src/frontends/android/app/src/main/java/org/strongswan/android/ui/VpnTileService.java [new file with mode: 0644]
src/frontends/android/app/src/main/res/drawable-hdpi/ic_notification_disconnected.png [new file with mode: 0755]
src/frontends/android/app/src/main/res/drawable-mdpi/ic_notification_disconnected.png [new file with mode: 0755]
src/frontends/android/app/src/main/res/drawable-xhdpi/ic_notification_disconnected.png [new file with mode: 0755]
src/frontends/android/app/src/main/res/values-de/strings.xml
src/frontends/android/app/src/main/res/values-pl/strings.xml
src/frontends/android/app/src/main/res/values-ru/strings.xml
src/frontends/android/app/src/main/res/values-ua/strings.xml
src/frontends/android/app/src/main/res/values-zh-rCN/strings.xml
src/frontends/android/app/src/main/res/values-zh-rTW/strings.xml
src/frontends/android/app/src/main/res/values/strings.xml