summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/model/KeygenEvent.kt16
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/service/KeyStatusListener.kt2
2 files changed, 3 insertions, 15 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/KeygenEvent.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/KeygenEvent.kt
index e719484e76..8c476ef5ff 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/KeygenEvent.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/KeygenEvent.kt
@@ -17,20 +17,8 @@ sealed class KeygenEvent {
}
}
- class TooManyKeys : KeygenEvent() {
- companion object {
- @JvmStatic
- val INSTANCE = TooManyKeys()
- }
- }
-
- class GenerationFailure : KeygenEvent() {
- companion object {
- @JvmStatic
- val INSTANCE = GenerationFailure()
- }
- }
-
+ object TooManyKeys : KeygenEvent()
+ object GenerationFailure : KeygenEvent()
fun failure(): KeygenFailure? {
return when (this) {
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/KeyStatusListener.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/KeyStatusListener.kt
index 8d44be4d36..2b8c2245dd 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/KeyStatusListener.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/KeyStatusListener.kt
@@ -32,7 +32,7 @@ class KeyStatusListener(val daemon: MullvadDaemon) {
newFailure
)
} else {
- keyStatus = newStatus ?: KeygenEvent.GenerationFailure()
+ keyStatus = newStatus ?: KeygenEvent.GenerationFailure
}
}