diff options
| author | Albin <albin@mullvad.net> | 2021-12-17 12:02:49 +0100 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2021-12-20 07:07:15 +0100 |
| commit | 4e85f2a8cfd1ca4e30138081ddb0dafbea6c8618 (patch) | |
| tree | fb409aca2a1edb35f7e62e1764aa67909c79fa81 | |
| parent | 9bb408fd13c12fa31118638d108af4ce7a449b91 (diff) | |
| download | mullvadvpn-4e85f2a8cfd1ca4e30138081ddb0dafbea6c8618.tar.xz mullvadvpn-4e85f2a8cfd1ca4e30138081ddb0dafbea6c8618.zip | |
Clarify Android tile text
Change Android tile title/label to "Toggle VPN" to better inform the
user about the tile action. Also set the subtitle (on Android Q and
above) to match the state shown in the notification.
| -rw-r--r-- | android/app/src/main/AndroidManifest.xml | 2 | ||||
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt | 9 | ||||
| -rw-r--r-- | android/app/src/main/res/values/strings.xml | 1 | ||||
| -rw-r--r-- | gui/locales/messages.pot | 3 |
4 files changed, 14 insertions, 1 deletions
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 66edb7dc33..e309f71016 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -66,7 +66,7 @@ </intent-filter> </service> <service android:name="net.mullvad.mullvadvpn.service.MullvadTileService" - android:label="@string/app_name" + android:label="@string/toggle_vpn" android:icon="@drawable/small_logo_black" android:permission="android.permission.BIND_QUICK_SETTINGS_TILE" android:process=":mullvadvpn_tile"> diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt index 4c15559912..3fbc627b7e 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt @@ -2,6 +2,7 @@ package net.mullvad.mullvadvpn.service import android.content.Intent import android.graphics.drawable.Icon +import android.os.Build import android.service.quicksettings.Tile import android.service.quicksettings.TileService import kotlin.properties.Delegates.observable @@ -94,9 +95,17 @@ class MullvadTileService : TileService() { if (secured) { state = Tile.STATE_ACTIVE icon = securedIcon + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + subtitle = resources.getText(R.string.secured) + } } else { state = Tile.STATE_INACTIVE icon = unsecuredIcon + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + subtitle = resources.getText(R.string.unsecured) + } } updateTile() diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index b0828e73b0..13faeb6a83 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -172,4 +172,5 @@ <string name="all_applications">All applications</string> <string name="copied_to_clipboard">Copied to clipboard</string> <string name="show_system_apps">Show system apps</string> + <string name="toggle_vpn">Toggle VPN</string> </resources> diff --git a/gui/locales/messages.pot b/gui/locales/messages.pot index faf84e7b08..f4d5af9325 100644 --- a/gui/locales/messages.pot +++ b/gui/locales/messages.pot @@ -1408,6 +1408,9 @@ msgstr "" msgid "This device is offline, no tunnels can be established" msgstr "" +msgid "Toggle VPN" +msgstr "" + msgid "Too many WireGuard keys registered to account" msgstr "" |
