Skip to content

Commit

Permalink
Merge branch 'expose-ownership-and-provider-for-relays-droid-464'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Oct 27, 2023
2 parents 36f2fad + eda60b2 commit 44676ed
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,19 @@ class SelectLocationScreenTest {
companion object {
private val DUMMY_RELAY_1 =
net.mullvad.mullvadvpn.model.Relay(
"Relay host 1",
true,
RelayEndpointData.Wireguard(WireguardRelayEndpointData)
hostname = "Relay host 1",
active = true,
endpointData = RelayEndpointData.Wireguard(WireguardRelayEndpointData),
owned = true,
provider = "PROVIDER"
)
private val DUMMY_RELAY_2 =
net.mullvad.mullvadvpn.model.Relay(
"Relay host 2",
true,
RelayEndpointData.Wireguard(WireguardRelayEndpointData)
hostname = "Relay host 2",
active = true,
endpointData = RelayEndpointData.Wireguard(WireguardRelayEndpointData),
owned = true,
provider = "PROVIDER"
)
private val DUMMY_RELAY_CITY_1 =
RelayListCity("Relay City 1", "RCi1", arrayListOf(DUMMY_RELAY_1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ import android.os.Parcelable
import kotlinx.parcelize.Parcelize

@Parcelize
data class Relay(val hostname: String, val active: Boolean, val endpointData: RelayEndpointData) :
Parcelable {
data class Relay(
val hostname: String,
val active: Boolean,
val owned: Boolean,
val provider: String,
val endpointData: RelayEndpointData
) : Parcelable {
val isWireguardRelay
get() = endpointData is RelayEndpointData.Wireguard
}
2 changes: 0 additions & 2 deletions mullvad-types/src/relay_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ pub struct Relay {
#[cfg_attr(target_os = "android", jnix(skip))]
pub include_in_country: bool,
pub active: bool,
#[cfg_attr(target_os = "android", jnix(skip))]
pub owned: bool,
#[cfg_attr(target_os = "android", jnix(skip))]
pub provider: String,
#[cfg_attr(target_os = "android", jnix(skip))]
pub weight: u64,
Expand Down

0 comments on commit 44676ed

Please sign in to comment.