diff options
Diffstat (limited to 'android/lib')
9 files changed, 342 insertions, 1 deletions
diff --git a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt index 38b152b00a..448d96778f 100644 --- a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt +++ b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt @@ -39,6 +39,7 @@ class Intermittent<T> { // resume execution. This allows performing any extra initialization before the value is made // available for usage. fun registerListener(id: Any, listener: (T?) -> Unit) = notifier.subscribe(id, listener) + fun unregisterListener(id: Any) = notifier.unsubscribe(id) suspend fun await(): T { diff --git a/android/lib/ipc/src/main/kotlin/net/mullvad/mullvadvpn/lib/ipc/Message.kt b/android/lib/ipc/src/main/kotlin/net/mullvad/mullvadvpn/lib/ipc/Message.kt index dd5f9442e1..7cc293b373 100644 --- a/android/lib/ipc/src/main/kotlin/net/mullvad/mullvadvpn/lib/ipc/Message.kt +++ b/android/lib/ipc/src/main/kotlin/net/mullvad/mullvadvpn/lib/ipc/Message.kt @@ -6,6 +6,7 @@ import android.os.Parcelable sealed class Message(private val messageId: Int) : Parcelable { abstract class EventMessage : Message(1) + abstract class RequestMessage : Message(2) protected abstract val messageKey: String diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/DeviceList.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/DeviceList.kt index de1acb0e23..afe5982ed5 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/DeviceList.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/DeviceList.kt @@ -2,6 +2,8 @@ package net.mullvad.mullvadvpn.model sealed class DeviceList { object Unavailable : DeviceList() + data class Available(val devices: List<Device>) : DeviceList() + object Error : DeviceList() } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/GetAccountDataResult.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/GetAccountDataResult.kt index cbed622df6..2e94266e2a 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/GetAccountDataResult.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/GetAccountDataResult.kt @@ -2,7 +2,10 @@ package net.mullvad.mullvadvpn.model sealed class GetAccountDataResult { class Ok(val accountData: AccountData) : GetAccountDataResult() + object InvalidAccount : GetAccountDataResult() + object RpcError : GetAccountDataResult() + object OtherError : GetAccountDataResult() } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt index de7dd4e99b..0c9d331e3b 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt @@ -6,5 +6,6 @@ import kotlinx.parcelize.Parcelize sealed class LocationConstraint : Parcelable { @Parcelize data class Location(val location: GeographicLocationConstraint) : LocationConstraint() + @Parcelize data class CustomList(val listId: String) : LocationConstraint() } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettingsUpdate.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettingsUpdate.kt index 85f5de2a32..a7d4c0b03d 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettingsUpdate.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettingsUpdate.kt @@ -2,5 +2,6 @@ package net.mullvad.mullvadvpn.model sealed class RelaySettingsUpdate { object CustomTunnelEndpoint : RelaySettingsUpdate() + data class Normal(var constraints: RelayConstraintsUpdate) : RelaySettingsUpdate() } diff --git a/android/lib/resource/lint-baseline.xml b/android/lib/resource/lint-baseline.xml index 81140b098e..1fa0b32b28 100644 --- a/android/lib/resource/lint-baseline.xml +++ b/android/lib/resource/lint-baseline.xml @@ -1,5 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> -<issues format="6" by="lint 8.0.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.2)" variant="all" version="8.0.2"> +<issues format="6" by="lint 8.1.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0)" variant="all" version="8.1.0"> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="days_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="3" + column="5"/> + </issue> <issue id="MissingQuantity" @@ -14,6 +25,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="days_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="3" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="days_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="3" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="months_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="7" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="months_left">" errorLine2=" ^"> @@ -25,6 +69,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="months_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="7" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="months_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="7" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="years_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="11" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="years_left">" errorLine2=" ^"> @@ -36,6 +113,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="years_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="11" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="years_left">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="11" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="days_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="15" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="days_ago">" errorLine2=" ^"> @@ -47,6 +157,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="days_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="15" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="days_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="15" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="minutes_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="19" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="minutes_ago">" errorLine2=" ^"> @@ -58,6 +201,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="minutes_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="19" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="minutes_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="19" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="months_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="23" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="months_ago">" errorLine2=" ^"> @@ -69,6 +245,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="months_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="23" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="months_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="23" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="years_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="27" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="years_ago">" errorLine2=" ^"> @@ -80,6 +289,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="years_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="27" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="years_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="27" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="hours_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="31" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="hours_ago">" errorLine2=" ^"> @@ -91,6 +333,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="hours_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="31" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="hours_ago">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="31" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="account_credit_expires_in_days">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="35" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="account_credit_expires_in_days">" errorLine2=" ^"> @@ -102,6 +377,39 @@ <issue id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="account_credit_expires_in_days">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="35" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="account_credit_expires_in_days">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="35" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "es" (Spanish) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="account_credit_expires_in_hours">" + errorLine2=" ^"> + <location + file="src/main/res/values-es/plurals.xml" + line="39" + column="5"/> + </issue> + + <issue + id="MissingQuantity" message="For locale "fr" (French) the following quantity should also be defined: `many` (e.g. "1000000 de jours")" errorLine1=" <plurals name="account_credit_expires_in_hours">" errorLine2=" ^"> @@ -112,6 +420,28 @@ </issue> <issue + id="MissingQuantity" + message="For locale "it" (Italian) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="account_credit_expires_in_hours">" + errorLine2=" ^"> + <location + file="src/main/res/values-it/plurals.xml" + line="39" + column="5"/> + </issue> + + <issue + id="MissingQuantity" + message="For locale "pt" (Portuguese) the following quantity should also be defined: `many`" + errorLine1=" <plurals name="account_credit_expires_in_hours">" + errorLine2=" ^"> + <location + file="src/main/res/values-pt/plurals.xml" + line="39" + column="5"/> + </issue> + + <issue id="ImpliedQuantity" message="The quantity `'one'` matches more than one specific number in this locale (0, 1), but the message did not \
include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue \
explanation for more." errorLine1=" <item quantity="one">1 jour restant</item>" diff --git a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/ConnectivityListener.kt b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/ConnectivityListener.kt index de56ebb878..cdc16567e1 100644 --- a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/ConnectivityListener.kt +++ b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/ConnectivityListener.kt @@ -65,5 +65,6 @@ class ConnectivityListener { } private external fun notifyConnectivityChange(isConnected: Boolean, senderAddress: Long) + private external fun destroySender(senderAddress: Long) } diff --git a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/TalpidVpnService.kt b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/TalpidVpnService.kt index a94bfac428..caa8f11447 100644 --- a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/TalpidVpnService.kt +++ b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/TalpidVpnService.kt @@ -146,5 +146,6 @@ open class TalpidVpnService : VpnService() { } private external fun defaultTunConfig(): TunConfig + private external fun waitForTunnelUp(tunFd: Int, isIpv6Enabled: Boolean) } |
