summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-03-26 13:33:25 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-03-29 14:22:55 +0000
commit9707fd6cb04253746b0bcce00984c6a48e432bd0 (patch)
treeccbf5dbdec55690bb7ff3fce0d791a54c899642e /android/src
parent242bee0d8855e90eef90944efdf38538b00e6500 (diff)
downloadmullvadvpn-9707fd6cb04253746b0bcce00984c6a48e432bd0.tar.xz
mullvadvpn-9707fd6cb04253746b0bcce00984c6a48e432bd0.zip
Remove unnecessary `Parcelable` marker
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Event.kt9
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Request.kt5
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/model/Constraint.kt4
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt9
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettings.kt4
5 files changed, 13 insertions, 18 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Event.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Event.kt
index ba94206a73..0e51c646e3 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Event.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Event.kt
@@ -1,24 +1,23 @@
package net.mullvad.mullvadvpn.ipc
import android.os.Message as RawMessage
-import android.os.Parcelable
import kotlinx.parcelize.Parcelize
import net.mullvad.mullvadvpn.model.GeoIpLocation
import net.mullvad.mullvadvpn.model.Settings
// Events that can be sent from the service
-sealed class Event : Message(), Parcelable {
+sealed class Event : Message() {
protected override val messageId = 1
protected override val messageKey = MESSAGE_KEY
@Parcelize
- object ListenerReady : Event(), Parcelable
+ object ListenerReady : Event()
@Parcelize
- data class NewLocation(val location: GeoIpLocation?) : Event(), Parcelable
+ data class NewLocation(val location: GeoIpLocation?) : Event()
@Parcelize
- data class SettingsUpdate(val settings: Settings?) : Event(), Parcelable
+ data class SettingsUpdate(val settings: Settings?) : Event()
companion object {
private const val MESSAGE_KEY = "event"
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Request.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Request.kt
index 388f60b07e..a5db82ce81 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Request.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/ipc/Request.kt
@@ -2,16 +2,15 @@ package net.mullvad.mullvadvpn.ipc
import android.os.Message as RawMessage
import android.os.Messenger
-import android.os.Parcelable
import kotlinx.parcelize.Parcelize
// Requests that the service can handle
-sealed class Request : Message(), Parcelable {
+sealed class Request : Message() {
protected override val messageId = 2
protected override val messageKey = MESSAGE_KEY
@Parcelize
- data class RegisterListener(val listener: Messenger) : Request(), Parcelable
+ data class RegisterListener(val listener: Messenger) : Request()
companion object {
private const val MESSAGE_KEY = "request"
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/Constraint.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/Constraint.kt
index 55779fd720..37b98298ab 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/Constraint.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/Constraint.kt
@@ -6,8 +6,8 @@ import kotlinx.parcelize.Parcelize
sealed class Constraint<T>() : Parcelable {
@Parcelize
@Suppress("PARCELABLE_PRIMARY_CONSTRUCTOR_IS_EMPTY")
- class Any<T>() : Constraint<T>(), Parcelable
+ class Any<T>() : Constraint<T>()
@Parcelize
- data class Only<T : Parcelable>(val value: T) : Constraint<T>(), Parcelable
+ data class Only<T : Parcelable>(val value: T) : Constraint<T>()
}
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt
index 55757e5b8f..6734ff418e 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt
@@ -7,16 +7,13 @@ sealed class LocationConstraint : Parcelable {
abstract val location: GeoIpLocation
@Parcelize
- data class Country(val countryCode: String) : LocationConstraint(), Parcelable {
+ data class Country(val countryCode: String) : LocationConstraint() {
override val location: GeoIpLocation
get() = GeoIpLocation(null, null, countryCode, null, null)
}
@Parcelize
- data class City(
- val countryCode: String,
- val cityCode: String
- ) : LocationConstraint(), Parcelable {
+ data class City(val countryCode: String, val cityCode: String) : LocationConstraint() {
override val location: GeoIpLocation
get() = GeoIpLocation(null, null, countryCode, cityCode, null)
}
@@ -26,7 +23,7 @@ sealed class LocationConstraint : Parcelable {
val countryCode: String,
val cityCode: String,
val hostname: String
- ) : LocationConstraint(), Parcelable {
+ ) : LocationConstraint() {
override val location: GeoIpLocation
get() = GeoIpLocation(null, null, countryCode, cityCode, hostname)
}
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettings.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettings.kt
index e1e56c3c51..6a247997db 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettings.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettings.kt
@@ -5,8 +5,8 @@ import kotlinx.parcelize.Parcelize
sealed class RelaySettings : Parcelable {
@Parcelize
- object CustomTunnelEndpoint : RelaySettings(), Parcelable
+ object CustomTunnelEndpoint : RelaySettings()
@Parcelize
- class Normal(val relayConstraints: RelayConstraints) : RelaySettings(), Parcelable
+ class Normal(val relayConstraints: RelayConstraints) : RelaySettings()
}