summaryrefslogtreecommitdiffhomepage
path: root/android/lib
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-08-04 11:25:57 +0200
committerAlbin <albin@mullvad.net>2023-08-04 11:25:57 +0200
commitc02098a983aa33e70f56f9153022d3916f71283c (patch)
tree4bbb505f1ee58ad7ae9a60dd79aeeff6430a8d1f /android/lib
parentf5d5a5c7bf3889685c7c9fce9b53f85fd56e59b0 (diff)
parentbfe2a3d0d0b6ed4bbe19f580735d0cc6b3bfafd6 (diff)
downloadmullvadvpn-c02098a983aa33e70f56f9153022d3916f71283c.tar.xz
mullvadvpn-c02098a983aa33e70f56f9153022d3916f71283c.zip
Merge branch 'bump-android-dependencies'
Diffstat (limited to 'android/lib')
-rw-r--r--android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt1
-rw-r--r--android/lib/ipc/src/main/kotlin/net/mullvad/mullvadvpn/lib/ipc/Message.kt1
-rw-r--r--android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/DeviceList.kt2
-rw-r--r--android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/GetAccountDataResult.kt3
-rw-r--r--android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt1
-rw-r--r--android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/RelaySettingsUpdate.kt1
-rw-r--r--android/lib/resource/lint-baseline.xml332
-rw-r--r--android/lib/talpid/src/main/kotlin/net/mullvad/talpid/ConnectivityListener.kt1
-rw-r--r--android/lib/talpid/src/main/kotlin/net/mullvad/talpid/TalpidVpnService.kt1
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 &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;days_left&quot;>"
+ 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 &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;days_left&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="3"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;days_left&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="3"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;months_left&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="7"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;months_left&quot;>"
errorLine2=" ^">
@@ -25,6 +69,39 @@
<issue
id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;months_left&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="7"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;months_left&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="7"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;years_left&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="11"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;years_left&quot;>"
errorLine2=" ^">
@@ -36,6 +113,39 @@
<issue
id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;years_left&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="11"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;years_left&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="11"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;days_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="15"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;days_ago&quot;>"
errorLine2=" ^">
@@ -47,6 +157,39 @@
<issue
id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;days_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="15"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;days_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="15"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;minutes_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="19"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;minutes_ago&quot;>"
errorLine2=" ^">
@@ -58,6 +201,39 @@
<issue
id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;minutes_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="19"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;minutes_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="19"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;months_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="23"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;months_ago&quot;>"
errorLine2=" ^">
@@ -69,6 +245,39 @@
<issue
id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;months_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="23"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;months_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="23"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;years_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="27"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;years_ago&quot;>"
errorLine2=" ^">
@@ -80,6 +289,39 @@
<issue
id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;years_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="27"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;years_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="27"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;hours_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="31"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;hours_ago&quot;>"
errorLine2=" ^">
@@ -91,6 +333,39 @@
<issue
id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;hours_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="31"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;hours_ago&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="31"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_days&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="35"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_days&quot;>"
errorLine2=" ^">
@@ -102,6 +377,39 @@
<issue
id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_days&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="35"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_days&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="35"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_hours&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-es/plurals.xml"
+ line="39"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_hours&quot;>"
errorLine2=" ^">
@@ -112,6 +420,28 @@
</issue>
<issue
+ id="MissingQuantity"
+ message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_hours&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-it/plurals.xml"
+ line="39"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="MissingQuantity"
+ message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
+ errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_hours&quot;>"
+ errorLine2=" ^">
+ <location
+ file="src/main/res/values-pt/plurals.xml"
+ line="39"
+ column="5"/>
+ </issue>
+
+ <issue
id="ImpliedQuantity"
message="The quantity `&apos;one&apos;` matches more than one specific number in this locale (0, 1), but the message did not \&#xA;include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue \&#xA;explanation for more."
errorLine1=" &lt;item quantity=&quot;one&quot;>1 jour restant&lt;/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)
}