summaryrefslogtreecommitdiffhomepage
path: root/android/service/src
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-09-21 08:56:05 +0200
committerAlbin <albin@mullvad.net>2023-09-21 18:30:53 +0200
commitd946bd89697294b88974dcecb185d6dc94867a00 (patch)
tree3fc5c9897630546e94158e944112f58234cac96a /android/service/src
parent119da166330aaf5ef037f4269e36eedc5f142da9 (diff)
downloadmullvadvpn-d946bd89697294b88974dcecb185d6dc94867a00.tar.xz
mullvadvpn-d946bd89697294b88974dcecb185d6dc94867a00.zip
Use play flavor to comply with policies
Diffstat (limited to 'android/service/src')
-rw-r--r--android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/constant/BuildConstant.kt5
-rw-r--r--android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt5
2 files changed, 7 insertions, 3 deletions
diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/constant/BuildConstant.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/constant/BuildConstant.kt
new file mode 100644
index 0000000000..5c7c387c91
--- /dev/null
+++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/constant/BuildConstant.kt
@@ -0,0 +1,5 @@
+package net.mullvad.mullvadvpn.service.constant
+
+import net.mullvad.mullvadvpn.service.BuildConfig
+
+const val IS_PLAY_BUILD = BuildConfig.FLAVOR == "play"
diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt
index e07f1725d7..83e2c970ec 100644
--- a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt
+++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/notifications/AccountExpiryNotification.kt
@@ -10,7 +10,6 @@ import android.net.Uri
import androidx.core.app.NotificationCompat
import kotlin.properties.Delegates.observable
import kotlinx.coroutines.delay
-import net.mullvad.mullvadvpn.lib.common.constant.BuildTypes
import net.mullvad.mullvadvpn.lib.common.constant.MAIN_ACTIVITY_CLASS
import net.mullvad.mullvadvpn.lib.common.constant.MULLVAD_PACKAGE_NAME
import net.mullvad.mullvadvpn.lib.common.util.Intermittent
@@ -18,9 +17,9 @@ import net.mullvad.mullvadvpn.lib.common.util.JobTracker
import net.mullvad.mullvadvpn.lib.common.util.SdkUtils
import net.mullvad.mullvadvpn.lib.common.util.SdkUtils.isNotificationPermissionGranted
import net.mullvad.mullvadvpn.model.AccountExpiry
-import net.mullvad.mullvadvpn.service.BuildConfig
import net.mullvad.mullvadvpn.service.MullvadDaemon
import net.mullvad.mullvadvpn.service.R
+import net.mullvad.mullvadvpn.service.constant.IS_PLAY_BUILD
import net.mullvad.mullvadvpn.service.endpoint.AccountCache
import org.joda.time.DateTime
import org.joda.time.Duration
@@ -105,7 +104,7 @@ class AccountExpiryNotification(
Uri.parse("$buyMoreTimeUrl?token=${daemon.await().getWwwAuthToken()}")
}
val intent =
- if (BuildTypes.RELEASE == BuildConfig.BUILD_TYPE) {
+ if (IS_PLAY_BUILD) {
Intent().apply {
setClassName(MULLVAD_PACKAGE_NAME, MAIN_ACTIVITY_CLASS)
flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP