summaryrefslogtreecommitdiffhomepage
path: root/android/lib/common
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2024-02-08 11:17:02 +0100
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2024-02-08 11:17:02 +0100
commitec4c473c5c08e30e16822a8a82531d3ff5a1135f (patch)
treead2ced90d3ece795a71a004a6006c377c04c1bf0 /android/lib/common
parent1b80203504f58fab47dc6dbe53f223084acecc6a (diff)
parentaf3df963648d4cc535b552f75cf3abdfe936b395 (diff)
downloadmullvadvpn-ec4c473c5c08e30e16822a8a82531d3ff5a1135f.tar.xz
mullvadvpn-ec4c473c5c08e30e16822a8a82531d3ff5a1135f.zip
Merge branch 'add-support-for-custom-list-in-the-app-layer-droid-653'
Diffstat (limited to 'android/lib/common')
-rw-r--r--android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/LocationConstraintExtensions.kt23
1 files changed, 0 insertions, 23 deletions
diff --git a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/LocationConstraintExtensions.kt b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/LocationConstraintExtensions.kt
deleted file mode 100644
index d845e3aba9..0000000000
--- a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/LocationConstraintExtensions.kt
+++ /dev/null
@@ -1,23 +0,0 @@
-package net.mullvad.mullvadvpn.lib.common.util
-
-import net.mullvad.mullvadvpn.model.Constraint
-import net.mullvad.mullvadvpn.model.GeographicLocationConstraint
-import net.mullvad.mullvadvpn.model.LocationConstraint
-
-fun LocationConstraint.toGeographicLocationConstraint(): GeographicLocationConstraint? =
- when (this) {
- is LocationConstraint.Location -> this.location
- is LocationConstraint.CustomList -> null
- }
-
-fun Constraint<LocationConstraint>.toGeographicLocationConstraint():
- Constraint<GeographicLocationConstraint> =
- when (this) {
- is Constraint.Only ->
- when (value) {
- is LocationConstraint.Location ->
- Constraint.Only((value as LocationConstraint.Location).location)
- is LocationConstraint.CustomList -> Constraint.Any()
- }
- is Constraint.Any -> Constraint.Any()
- }