summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2021-12-20 11:38:46 +0100
committerAlbin <albin@mullvad.net>2021-12-20 11:38:46 +0100
commit5c75c5e44795270a06d6074976774afe26b0d319 (patch)
treeecae8cf1ac868c2e7389dff4b2878a69e9e424fe
parent9bb408fd13c12fa31118638d108af4ce7a449b91 (diff)
parent6015a03ed83c58ec7097fc9381c341b689dbf3ba (diff)
downloadmullvadvpn-5c75c5e44795270a06d6074976774afe26b0d319.tar.xz
mullvadvpn-5c75c5e44795270a06d6074976774afe26b0d319.zip
Merge branch 'clarify-android-tile-text'
-rw-r--r--CHANGELOG.md2
-rw-r--r--android/app/src/main/AndroidManifest.xml2
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadTileService.kt9
-rw-r--r--android/app/src/main/res/values/strings.xml1
-rw-r--r--gui/locales/messages.pot3
5 files changed, 16 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index db6e9d55b3..d7061f405b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -45,6 +45,8 @@ Line wrap the file at 100 chars. Th
* Swiping to remove from the Recents/Overview screen.
* Android Background Execution Limits.
* The System Settings way of killing apps ("Force Stop").
+- Change Quick Settings tile label to reflect the action of clicking the tile. Also add a subtitle
+ on supported Android versions (Q and above) to reflect the state.
#### Windows
- Update wireguard-nt to 0.10.1.
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 ""