summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2022-07-08 10:47:15 +0200
committerAlbin <albin@mullvad.net>2022-07-08 10:47:15 +0200
commit67b0483662f66a601d2ef7c7ee30f7e52d7b2c05 (patch)
tree5d871f1dab35aa04ddaf81a15909c60bafeaed2a
parentd9c60e62e74e29736b0c59055ea36caa01bb86e6 (diff)
parent73601a2c422e88ce529f32997dc7a2f89281badc (diff)
downloadmullvadvpn-67b0483662f66a601d2ef7c7ee30f7e52d7b2c05.tar.xz
mullvadvpn-67b0483662f66a601d2ef7c7ee30f7e52d7b2c05.zip
Merge branch 'disable-badge-for-tunnel-state'
-rw-r--r--CHANGELOG.md1
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt1
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/NotificationChannel.kt5
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt1
4 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 882cfe1971..1c51fdb530 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,7 @@ Line wrap the file at 100 chars. Th
### Changed
#### Android
- Lowered default MTU to 1280 on Android.
+- Disable app icon badge for tunnel state notification/status.
### Removed
#### Android
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt
index 2d1e86b46c..8c27f985a2 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt
@@ -41,6 +41,7 @@ class AccountExpiryNotification(
R.string.account_time_notification_channel_name,
R.string.account_time_notification_channel_description,
NotificationManager.IMPORTANCE_HIGH,
+ true,
true
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/NotificationChannel.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/NotificationChannel.kt
index cceb5b4344..cb875d0d6b 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/NotificationChannel.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/NotificationChannel.kt
@@ -15,7 +15,8 @@ class NotificationChannel(
name: Int,
description: Int,
importance: Int,
- isVibrationEnabled: Boolean
+ isVibrationEnabled: Boolean,
+ isBadgeEnabled: Boolean
) {
private val badgeColor by lazy {
context.getColor(R.color.colorPrimary)
@@ -30,7 +31,7 @@ class NotificationChannel(
val channel = NotificationChannelCompat.Builder(id, importance)
.setName(channelName)
.setDescription(channelDescription)
- .setShowBadge(true)
+ .setShowBadge(isBadgeEnabled)
.setVibrationEnabled(isVibrationEnabled)
.build()
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt
index 5a6cc690ce..94002ba735 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/TunnelStateNotification.kt
@@ -24,6 +24,7 @@ class TunnelStateNotification(val context: Context) {
R.string.foreground_notification_channel_name,
R.string.foreground_notification_channel_description,
NotificationManager.IMPORTANCE_MIN,
+ false,
false
)