diff options
| author | Albin <albin@mullvad.net> | 2024-08-28 20:33:46 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2024-08-28 20:44:14 +0200 |
| commit | b52c423d777213d5bb92430bccec880c6367a70b (patch) | |
| tree | 6ce254a809c1555fbde9a1c5692725042803854c /android/lib | |
| parent | a71f1e7a6888bc6af5a9df355afd26d3f56d0e5c (diff) | |
| download | mullvadvpn-b52c423d777213d5bb92430bccec880c6367a70b.tar.xz mullvadvpn-b52c423d777213d5bb92430bccec880c6367a70b.zip | |
Reformat kotlin code using updated ktfmt plugin
This commit mostly adds trailing commas throughout the project,
but also includes a few other formatting changes.
Diffstat (limited to 'android/lib')
58 files changed, 175 insertions, 182 deletions
diff --git a/android/lib/billing/src/androidTest/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingRepositoryTest.kt b/android/lib/billing/src/androidTest/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingRepositoryTest.kt index 7ca3219cfb..35dedb6200 100644 --- a/android/lib/billing/src/androidTest/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingRepositoryTest.kt +++ b/android/lib/billing/src/androidTest/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingRepositoryTest.kt @@ -158,7 +158,7 @@ class BillingRepositoryTest { billingRepository.startPurchaseFlow( mockProductDetails, transactionId, - mockActivityProvider + mockActivityProvider, ) // Assert @@ -184,7 +184,7 @@ class BillingRepositoryTest { billingRepository.startPurchaseFlow( mockProductDetails, transactionId, - mockActivityProvider + mockActivityProvider, ) // Assert @@ -252,7 +252,7 @@ class BillingRepositoryTest { // Assert assertEquals( expectedError.toBillingResult().responseCode, - result.billingResult.responseCode + result.billingResult.responseCode, ) assertEquals(expectedError.message, result.billingResult.debugMessage) } @@ -269,7 +269,7 @@ class BillingRepositoryTest { billingRepository.purchaseEvents.test { purchaseUpdatedListenerSlot.captured.onPurchasesUpdated( mockBillingResult, - mockPurchaseList + mockPurchaseList, ) val result = awaitItem() assertIs<PurchaseEvent.Completed>(result) diff --git a/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepository.kt b/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepository.kt index b526a10032..540a8ad929 100644 --- a/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepository.kt +++ b/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepository.kt @@ -30,7 +30,7 @@ import net.mullvad.mullvadvpn.lib.payment.model.VerificationResult class BillingPaymentRepository( private val billingRepository: BillingRepository, - private val playPurchaseRepository: PlayPurchaseRepository + private val playPurchaseRepository: PlayPurchaseRepository, ) : PaymentRepository { override fun queryPaymentAvailability(): Flow<PaymentAvailability> = flow { @@ -49,7 +49,7 @@ class BillingPaymentRepository( override fun purchaseProduct( productId: ProductId, - activityProvider: () -> Activity + activityProvider: () -> Activity, ): Flow<PurchaseResult> = flow { emit(PurchaseResult.FetchingProducts) @@ -68,7 +68,7 @@ class BillingPaymentRepository( emit( PurchaseResult.Error.FetchProductsError( productId, - productDetailsResult.toBillingException() + productDetailsResult.toBillingException(), ) ) return@flow @@ -84,14 +84,14 @@ class BillingPaymentRepository( emit(PurchaseResult.Error.TransactionIdError(productId, null)) return@flow }, - { it } + { it }, ) val result = billingRepository.startPurchaseFlow( productDetails = productDetails, obfuscatedId = obfuscatedId.value, - activityProvider = activityProvider + activityProvider = activityProvider, ) if (result.responseCode == BillingResponseCode.OK) { @@ -123,7 +123,7 @@ class BillingPaymentRepository( verifyPurchase(event.purchases.first()) .fold( { PurchaseResult.Error.VerificationError(null) }, - { PurchaseResult.Completed.Success } + { PurchaseResult.Completed.Success }, ) ) } diff --git a/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingRepository.kt b/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingRepository.kt index 6b3098fad0..544c348170 100644 --- a/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingRepository.kt +++ b/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingRepository.kt @@ -48,7 +48,7 @@ class BillingRepository(context: Context) { exception = BillingException( responseCode = result.responseCode, - message = result.debugMessage + message = result.debugMessage, ) ) ) @@ -110,7 +110,7 @@ class BillingRepository(context: Context) { suspend fun startPurchaseFlow( productDetails: ProductDetails, obfuscatedId: String, - activityProvider: () -> Activity + activityProvider: () -> Activity, ): BillingResult { return try { ensureConnected() @@ -172,7 +172,7 @@ class BillingRepository(context: Context) { } catch (t: Throwable) { ProductDetailsResult( BillingResult.newBuilder().setResponseCode(BillingResponseCode.ERROR).build(), - null + null, ) } } diff --git a/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/extension/ProductDetailsToPaymentProduct.kt b/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/extension/ProductDetailsToPaymentProduct.kt index fa9a20613f..5a0d0b42fb 100644 --- a/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/extension/ProductDetailsToPaymentProduct.kt +++ b/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/extension/ProductDetailsToPaymentProduct.kt @@ -10,7 +10,7 @@ fun ProductDetails.toPaymentProduct(productIdToStatus: Map<String, PaymentStatus PaymentProduct( productId = ProductId(this.productId), price = ProductPrice(this.oneTimePurchaseOfferDetails?.formattedPrice ?: ""), - productIdToStatus[this.productId] + productIdToStatus[this.productId], ) fun List<ProductDetails>.toPaymentProducts(productIdToStatus: Map<String, PaymentStatus?>) = diff --git a/android/lib/billing/src/test/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepositoryTest.kt b/android/lib/billing/src/test/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepositoryTest.kt index ad716cd30c..48618feb2b 100644 --- a/android/lib/billing/src/test/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepositoryTest.kt +++ b/android/lib/billing/src/test/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepositoryTest.kt @@ -49,7 +49,7 @@ class BillingPaymentRepositoryTest { paymentRepository = BillingPaymentRepository( billingRepository = mockBillingRepository, - playPurchaseRepository = mockPlayPurchaseRepository + playPurchaseRepository = mockPlayPurchaseRepository, ) } @@ -203,7 +203,7 @@ class BillingPaymentRepositoryTest { mockBillingRepository.startPurchaseFlow( productDetails = any(), obfuscatedId = any(), - activityProvider = any() + activityProvider = any(), ) } returns mockBillingResult coEvery { mockPlayPurchaseRepository.initializePlayPurchase() } returns @@ -238,7 +238,7 @@ class BillingPaymentRepositoryTest { mockBillingRepository.startPurchaseFlow( productDetails = any(), obfuscatedId = mockObfuscatedId, - activityProvider = any() + activityProvider = any(), ) } returns mockBillingResult coEvery { mockPlayPurchaseRepository.initializePlayPurchase() } returns @@ -280,7 +280,7 @@ class BillingPaymentRepositoryTest { mockBillingRepository.startPurchaseFlow( productDetails = any(), obfuscatedId = any(), - activityProvider = any() + activityProvider = any(), ) } returns mockBillingResult coEvery { mockPlayPurchaseRepository.initializePlayPurchase() } returns @@ -323,7 +323,7 @@ class BillingPaymentRepositoryTest { mockBillingRepository.startPurchaseFlow( productDetails = any(), obfuscatedId = any(), - activityProvider = any() + activityProvider = any(), ) } returns mockBillingResult coEvery { mockPlayPurchaseRepository.initializePlayPurchase() } returns @@ -364,7 +364,7 @@ class BillingPaymentRepositoryTest { mockBillingRepository.startPurchaseFlow( productDetails = any(), obfuscatedId = any(), - activityProvider = any() + activityProvider = any(), ) } returns mockBillingResult coEvery { mockPlayPurchaseRepository.initializePlayPurchase() } returns diff --git a/android/lib/common-test/src/main/java/net/mullvad/mullvadvpn/lib/common/test/TestUtils.kt b/android/lib/common-test/src/main/java/net/mullvad/mullvadvpn/lib/common/test/TestUtils.kt index 8d09cdf22c..60f991fce6 100644 --- a/android/lib/common-test/src/main/java/net/mullvad/mullvadvpn/lib/common/test/TestUtils.kt +++ b/android/lib/common-test/src/main/java/net/mullvad/mullvadvpn/lib/common/test/TestUtils.kt @@ -12,5 +12,5 @@ fun <T> assertLists(expected: List<T>, actual: List<T>, message: String? = null) | Expected(${expected.size}): $expected | Actual(${actual.size}) : $actual """ - .trimMargin() + .trimMargin(), ) diff --git a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ErrorNotificationMessage.kt b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ErrorNotificationMessage.kt index bbdd2a56a5..4a5c902d96 100644 --- a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ErrorNotificationMessage.kt +++ b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ErrorNotificationMessage.kt @@ -3,5 +3,5 @@ package net.mullvad.mullvadvpn.lib.common.util data class ErrorNotificationMessage( val titleResourceId: Int, val messageResourceId: Int, - val optionalMessageArgument: String? = null + val optionalMessageArgument: String? = null, ) diff --git a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ErrorStateExtension.kt b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ErrorStateExtension.kt index 2c9554a842..5d30a01b2f 100644 --- a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ErrorStateExtension.kt +++ b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/ErrorStateExtension.kt @@ -15,7 +15,7 @@ fun ErrorState.getErrorNotificationResources(context: Context): ErrorNotificatio cause.errorMessageId(), (cause as ErrorStateCause.InvalidDnsServers).addresses.joinToString { address -> address.addressString() - } + }, ) } cause is ErrorStateCause.VpnPermissionDenied -> { @@ -33,12 +33,12 @@ private fun resolveAlwaysOnVpnErrorNotificationMessage( ErrorNotificationMessage( R.string.always_on_vpn_error_notification_title, R.string.always_on_vpn_error_notification_content, - alwaysOnVpnAppName + alwaysOnVpnAppName, ) } else { ErrorNotificationMessage( R.string.vpn_permission_error_notification_title, - R.string.vpn_permission_error_notification_message + R.string.vpn_permission_error_notification_message, ) } } diff --git a/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt b/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt index c10f3b58e6..b51fd7eb2f 100644 --- a/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt +++ b/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt @@ -145,7 +145,7 @@ class ManagementService( private val channel = UdsChannelBuilder.forPath( rpcSocketFile.absolutePath, - LocalSocketAddress.Namespace.FILESYSTEM + LocalSocketAddress.Namespace.FILESYSTEM, ) // We need to provide a DummyNameResolver to avoid default NameResolver making incorrect // InetSocketAddress look ups. For more info see: @@ -264,14 +264,14 @@ class ManagementService( suspend fun removeDevice( token: AccountNumber, - deviceId: DeviceId + deviceId: DeviceId, ): Either<DeleteDeviceError, Unit> = Either.catch { grpc.removeDevice( ManagementInterface.DeviceRemoval.newBuilder() .setAccountToken(token.value) .setDeviceId(deviceId.value.toString()) - .build(), + .build() ) } .mapEmpty() @@ -363,7 +363,7 @@ class ManagementService( async { _mutableSettings.update { getSettings() } }, async { _mutableVersionInfo.update { getVersionInfo().getOrNull() } }, async { _mutableRelayList.update { getRelayList() } }, - async { _mutableCurrentAccessMethod.update { getCurrentApiAccessMethod() } } + async { _mutableCurrentAccessMethod.update { getCurrentApiAccessMethod() } }, ) } } @@ -584,7 +584,7 @@ class ManagementService( suspend fun setOwnershipAndProviders( ownershipConstraint: Constraint<ModelOwnership>, - providersConstraint: Constraint<Providers> + providersConstraint: Constraint<Providers>, ): Either<SetWireguardConstraintsError, Unit> = Either.catch { val relaySettings = getSettings().relaySettings diff --git a/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/mapper/ToDomain.kt b/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/mapper/ToDomain.kt index ca4e924b6c..5e8df1edc4 100644 --- a/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/mapper/ToDomain.kt +++ b/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/mapper/ToDomain.kt @@ -80,7 +80,7 @@ internal fun ManagementInterface.TunnelState.toDomain(): TunnelState = if (hasDisconnectedLocation()) { disconnectedLocation.toDomain() } else null - }, + } ) ManagementInterface.TunnelState.StateCase.CONNECTING -> TunnelState.Connecting( @@ -91,7 +91,7 @@ internal fun ManagementInterface.TunnelState.toDomain(): TunnelState = location.toDomain() } else null }, - featureIndicators = connected.featureIndicators.toDomain() + featureIndicators = connected.featureIndicators.toDomain(), ) ManagementInterface.TunnelState.StateCase.CONNECTED -> TunnelState.Connected( @@ -104,18 +104,16 @@ internal fun ManagementInterface.TunnelState.toDomain(): TunnelState = null } }, - featureIndicators = connected.featureIndicators.toDomain() + featureIndicators = connected.featureIndicators.toDomain(), ) ManagementInterface.TunnelState.StateCase.DISCONNECTING -> TunnelState.Disconnecting( - actionAfterDisconnect = disconnecting.afterDisconnect.toDomain(), + actionAfterDisconnect = disconnecting.afterDisconnect.toDomain() ) ManagementInterface.TunnelState.StateCase.ERROR -> TunnelState.Error(errorState = error.errorState.toDomain()) ManagementInterface.TunnelState.StateCase.STATE_NOT_SET -> - TunnelState.Disconnected( - location = disconnected.disconnectedLocation.toDomain(), - ) + TunnelState.Disconnected(location = disconnected.disconnectedLocation.toDomain()) } internal fun ManagementInterface.GeoIpLocation.toDomain(): GeoIpLocation = @@ -136,7 +134,7 @@ internal fun ManagementInterface.GeoIpLocation.toDomain(): GeoIpLocation = city = city, latitude = latitude, longitude = longitude, - hostname = hostname + hostname = hostname, ) internal fun ManagementInterface.TunnelEndpoint.toDomain(): TunnelEndpoint = @@ -150,7 +148,7 @@ internal fun ManagementInterface.TunnelEndpoint.toDomain(): TunnelEndpoint = Endpoint( address = InetSocketAddress(InetAddress.getByName(ipPart), portPart.toInt()), - protocol = protocol.toDomain() + protocol = protocol.toDomain(), ) }, quantumResistant = quantumResistant, @@ -159,14 +157,14 @@ internal fun ManagementInterface.TunnelEndpoint.toDomain(): TunnelEndpoint = obfuscation.toDomain() } else { null - } + }, ) internal fun ManagementInterface.ObfuscationEndpoint.toDomain(): ObfuscationEndpoint = ObfuscationEndpoint( endpoint = Endpoint(address = InetSocketAddress(address, port), protocol = protocol.toDomain()), - obfuscationType = obfuscationType.toDomain() + obfuscationType = obfuscationType.toDomain(), ) internal fun ManagementInterface.ObfuscationEndpoint.ObfuscationType.toDomain(): ObfuscationType = @@ -220,7 +218,7 @@ internal fun ManagementInterface.ErrorState.toDomain(): ErrorState = ManagementInterface.ErrorState.Cause.CREATE_TUNNEL_DEVICE -> throw IllegalArgumentException("Unrecognized error state cause") }, - isBlocking = !hasBlockingError() + isBlocking = !hasBlockingError(), ) internal fun ManagementInterface.ErrorState.FirewallPolicyError.toDomain(): @@ -258,14 +256,14 @@ internal fun ManagementInterface.Settings.toDomain(): Settings = relayOverrides = relayOverridesList.map { it.toDomain() }, showBetaReleases = showBetaReleases, splitTunnelSettings = splitTunnel.toDomain(), - apiAccessMethodSettings = apiAccessMethods.toDomain() + apiAccessMethodSettings = apiAccessMethods.toDomain(), ) internal fun ManagementInterface.RelayOverride.toDomain(): RelayOverride = RelayOverride( hostname = hostname, ipv4AddressIn = if (hasIpv4AddrIn()) InetAddress.getByName(ipv4AddrIn) else null, - ipv6AddressIn = if (hasIpv6AddrIn()) InetAddress.getByName(ipv6AddrIn) else null + ipv6AddressIn = if (hasIpv6AddrIn()) InetAddress.getByName(ipv6AddrIn) else null, ) internal fun ManagementInterface.RelaySettings.toDomain(): RelaySettings = @@ -283,7 +281,7 @@ internal fun ManagementInterface.NormalRelaySettings.toDomain(): RelayConstraint location = location.toDomain(), providers = providersList.toDomain(), ownership = ownership.toDomain(), - wireguardConstraints = wireguardConstraints.toDomain() + wireguardConstraints = wireguardConstraints.toDomain(), ) internal fun ManagementInterface.LocationConstraint.toDomain(): Constraint<RelayItemId> = @@ -320,7 +318,7 @@ internal fun ManagementInterface.WireguardConstraints.toDomain(): WireguardConst Constraint.Only(Port(port)) } else { Constraint.Any - }, + } ) internal fun ManagementInterface.Ownership.toDomain(): Constraint<Ownership> = @@ -335,7 +333,7 @@ internal fun ManagementInterface.Ownership.toDomain(): Constraint<Ownership> = internal fun ManagementInterface.ObfuscationSettings.toDomain(): ObfuscationSettings = ObfuscationSettings( selectedObfuscation = selectedObfuscation.toDomain(), - udp2tcp = udp2Tcp.toDomain() + udp2tcp = udp2Tcp.toDomain(), ) internal fun ManagementInterface.ObfuscationSettings.SelectedObfuscation.toDomain(): @@ -362,7 +360,7 @@ internal fun ManagementInterface.CustomList.toDomain(): CustomList = CustomList( id = CustomListId(id), name = CustomListName.fromString(name), - locations = locationsList.map { it.toDomain() } + locations = locationsList.map { it.toDomain() }, ) internal fun ManagementInterface.TunnelOptions.toDomain(): TunnelOptions = @@ -388,7 +386,7 @@ internal fun ManagementInterface.DnsOptions.toDomain(): DnsOptions = DnsOptions( state = state.toDomain(), defaultOptions = defaultOptions.toDomain(), - customOptions = customOptions.toDomain() + customOptions = customOptions.toDomain(), ) internal fun ManagementInterface.DnsOptions.DnsState.toDomain(): DnsState = @@ -406,7 +404,7 @@ internal fun ManagementInterface.DefaultDnsOptions.toDomain() = blockAdultContent = blockAdultContent, blockGambling = blockGambling, blockSocialMedia = blockSocialMedia, - blockTrackers = blockTrackers + blockTrackers = blockTrackers, ) internal fun ManagementInterface.CustomDnsOptions.toDomain() = @@ -426,7 +424,7 @@ internal fun QuantumResistantState.toDomain(): ManagementInterface.QuantumResist internal fun ManagementInterface.AppVersionInfo.toDomain(): AppVersionInfo = AppVersionInfo( supported = supported, - suggestedUpgrade = if (hasSuggestedUpgrade()) suggestedUpgrade else null + suggestedUpgrade = if (hasSuggestedUpgrade()) suggestedUpgrade else null, ) internal fun ConnectivityState.toDomain(): GrpcConnectivityState = @@ -465,7 +463,7 @@ internal fun ManagementInterface.RelayListCountry.toDomain(): RelayItem.Location citiesList .map { city -> city.toDomain(countryCode) } .filter { it.relays.isNotEmpty() } - .sortedBy { it.name } + .sortedBy { it.name }, ) } @@ -480,7 +478,7 @@ internal fun ManagementInterface.RelayListCity.toDomain( relaysList .filter { it.endpointType == ManagementInterface.Relay.RelayType.WIREGUARD } .map { it.toDomain(cityCode) } - .sortedWith(RelayNameComparator) + .sortedWith(RelayNameComparator), ) } @@ -493,8 +491,8 @@ internal fun ManagementInterface.Relay.toDomain( provider = Provider( ProviderId(provider), - ownership = if (owned) Ownership.MullvadOwned else Ownership.Rented - ) + ownership = if (owned) Ownership.MullvadOwned else Ownership.Rented, + ), ) internal fun ManagementInterface.Device.toDomain(): Device = @@ -514,19 +512,19 @@ internal fun ManagementInterface.DeviceState.toDomain(): DeviceState = internal fun ManagementInterface.AccountData.toDomain(): AccountData = AccountData( AccountId(UUID.fromString(id)), - expiryDate = Instant.ofEpochSecond(expiry.seconds).toDateTime() + expiryDate = Instant.ofEpochSecond(expiry.seconds).toDateTime(), ) internal fun ManagementInterface.VoucherSubmission.toDomain(): RedeemVoucherSuccess = RedeemVoucherSuccess( timeAdded = secondsAdded, - newExpiryDate = Instant.ofEpochSecond(newExpiry.seconds).toDateTime() + newExpiryDate = Instant.ofEpochSecond(newExpiry.seconds).toDateTime(), ) internal fun ManagementInterface.SplitTunnelSettings.toDomain(): SplitTunnelSettings = SplitTunnelSettings( enabled = enableExclusions, - excludedApps = appsList.map { AppId(it) }.toSet() + excludedApps = appsList.map { AppId(it) }.toSet(), ) internal fun ManagementInterface.PlayPurchasePaymentToken.toDomain(): PlayPurchasePaymentToken = @@ -540,7 +538,7 @@ internal fun ManagementInterface.AccessMethodSetting.toDomain(): ApiAccessMethod id = ApiAccessMethodId.fromString(id.value), name = ApiAccessMethodName.fromString(name), enabled = enabled, - apiAccessMethod = accessMethod.toDomain() + apiAccessMethod = accessMethod.toDomain(), ) internal fun ManagementInterface.AccessMethod.toDomain(): ApiAccessMethod = @@ -564,7 +562,7 @@ internal fun ManagementInterface.Shadowsocks.toDomain(): ApiAccessMethod.CustomP ip = ip, port = Port(port), password = password, - cipher = Cipher.fromString(cipher) + cipher = Cipher.fromString(cipher), ) internal fun ManagementInterface.Socks5Remote.toDomain(): ApiAccessMethod.CustomProxy.Socks5Remote = @@ -576,7 +574,7 @@ internal fun ManagementInterface.Socks5Remote.toDomain(): ApiAccessMethod.Custom auth.toDomain() } else { null - } + }, ) internal fun ManagementInterface.SocksAuth.toDomain(): SocksAuth = diff --git a/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/util/LogInterceptor.kt b/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/util/LogInterceptor.kt index b01b0266b7..1bff85300f 100644 --- a/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/util/LogInterceptor.kt +++ b/android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/util/LogInterceptor.kt @@ -11,7 +11,7 @@ internal class LogInterceptor : ClientInterceptor { override fun <ReqT : Any?, RespT : Any?> interceptCall( method: MethodDescriptor<ReqT, RespT>?, callOptions: CallOptions?, - next: Channel? + next: Channel?, ): ClientCall<ReqT, RespT> { Logger.v("Intercepted call: ${method?.fullMethodName}") return next!!.newCall(method, callOptions) diff --git a/android/lib/daemon-grpc/src/test/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/RelayNameComparatorTest.kt b/android/lib/daemon-grpc/src/test/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/RelayNameComparatorTest.kt index 42cf745510..1494851bcb 100644 --- a/android/lib/daemon-grpc/src/test/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/RelayNameComparatorTest.kt +++ b/android/lib/daemon-grpc/src/test/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/RelayNameComparatorTest.kt @@ -27,7 +27,7 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned + ownership = Ownership.MullvadOwned, ), ) val relay10 = @@ -37,8 +37,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) relay9 assertOrderBothDirection relay10 @@ -53,8 +53,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relay9b = RelayItem.Location.Relay( @@ -63,8 +63,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) assertTrue(RelayNameComparator.compare(relay9a, relay9b) == 0) @@ -80,8 +80,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relay1 = RelayItem.Location.Relay( @@ -90,8 +90,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relay3 = RelayItem.Location.Relay( @@ -100,8 +100,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relay100 = RelayItem.Location.Relay( @@ -110,8 +110,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) relay001 assertOrderBothDirection relay1 @@ -129,8 +129,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relay9b = RelayItem.Location.Relay( @@ -139,8 +139,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) assertTrue(RelayNameComparator.compare(relay9a, relay9b) == 0) @@ -156,8 +156,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relay005 = RelayItem.Location.Relay( @@ -166,8 +166,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) relay001 assertOrderBothDirection relay005 @@ -182,8 +182,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relayAr8 = RelayItem.Location.Relay( @@ -192,8 +192,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relaySe5 = RelayItem.Location.Relay( @@ -202,8 +202,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relaySe10 = RelayItem.Location.Relay( @@ -212,8 +212,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) relayAr2 assertOrderBothDirection relayAr8 @@ -230,8 +230,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relay2w = RelayItem.Location.Relay( @@ -240,8 +240,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) relay2c assertOrderBothDirection relay2w @@ -256,8 +256,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) val relay22b = RelayItem.Location.Relay( @@ -266,8 +266,8 @@ class RelayNameComparatorTest { provider = Provider( providerId = ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) relay22a assertOrderBothDirection relay22b diff --git a/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/ApiEndpoint.kt b/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/ApiEndpoint.kt index 4b5beacf49..1fd26bddae 100644 --- a/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/ApiEndpoint.kt +++ b/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/ApiEndpoint.kt @@ -8,5 +8,5 @@ import kotlinx.parcelize.Parcelize data class ApiEndpoint( val address: InetSocketAddress, val disableAddressCache: Boolean, - val disableTls: Boolean + val disableTls: Boolean, ) : Parcelable diff --git a/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/CustomApiEndpointConfiguration.kt b/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/CustomApiEndpointConfiguration.kt index b1559be777..92dffed35f 100644 --- a/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/CustomApiEndpointConfiguration.kt +++ b/android/lib/endpoint/src/main/kotlin/net/mullvad/mullvadvpn/lib/endpoint/CustomApiEndpointConfiguration.kt @@ -10,12 +10,12 @@ data class CustomApiEndpointConfiguration( val hostname: String, val port: Int, val disableAddressCache: Boolean = true, - val disableTls: Boolean = false + val disableTls: Boolean = false, ) : ApiEndpointConfiguration { override fun apiEndpoint() = ApiEndpoint( address = InetSocketAddress(hostname, port), disableAddressCache = disableAddressCache, - disableTls = disableTls + disableTls = disableTls, ) } diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/CameraAnimation.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/CameraAnimation.kt index 4047783825..2e0b2fcf05 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/CameraAnimation.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/CameraAnimation.kt @@ -81,7 +81,7 @@ fun animatedCameraPosition( EaseInOut 1f at duration using EaseInOut } - } + }, ) } } @@ -91,9 +91,9 @@ fun animatedCameraPosition( latLong = LatLong( Latitude(latitudeAnimation.value), - Longitude.fromFloat(longitudeAnimation.value) + Longitude.fromFloat(longitudeAnimation.value), ), - verticalBias = cameraVerticalBias + verticalBias = cameraVerticalBias, ) } diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/Map.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/Map.kt index b1ea1144f9..a1e411bece 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/Map.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/Map.kt @@ -33,7 +33,7 @@ fun AnimatedMap( cameraBaseZoom: Float, cameraVerticalBias: Float, markers: List<Marker>, - globeColors: GlobeColors + globeColors: GlobeColors, ) { Map( modifier = modifier, @@ -41,10 +41,10 @@ fun AnimatedMap( animatedCameraPosition( baseZoom = cameraBaseZoom, targetCameraLocation = cameraLocation, - cameraVerticalBias = cameraVerticalBias + cameraVerticalBias = cameraVerticalBias, ), markers = markers, - globeColors + globeColors, ) } diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/LocationMarkerColors.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/LocationMarkerColors.kt index 7d4edb09cb..4e0959912b 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/LocationMarkerColors.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/LocationMarkerColors.kt @@ -8,7 +8,7 @@ data class LocationMarkerColors( val centerColor: Color, val ringBorderColor: Color = Color.White, val shadowColor: Color = Color.Black.copy(alpha = DEFAULT_SHADOW_ALPHA), - val perimeterColors: Color = centerColor.copy(alpha = DEFAULT_PERIMETER_ALPHA) + val perimeterColors: Color = centerColor.copy(alpha = DEFAULT_PERIMETER_ALPHA), ) { companion object { private const val DEFAULT_SHADOW_ALPHA = 0.55f diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/MapViewState.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/MapViewState.kt index 1e1a211115..5430a4fe1c 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/MapViewState.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/MapViewState.kt @@ -6,5 +6,5 @@ import androidx.compose.runtime.Immutable class MapViewState( val cameraPosition: CameraPosition, val locationMarker: List<Marker>, - val globeColors: GlobeColors + val globeColors: GlobeColors, ) diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/Marker.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/Marker.kt index 4d26348d45..a7f25ec545 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/Marker.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/data/Marker.kt @@ -7,7 +7,7 @@ import net.mullvad.mullvadvpn.lib.model.LatLong data class Marker( val latLong: LatLong, val size: Float = DEFAULT_MARKER_SIZE, - val colors: LocationMarkerColors + val colors: LocationMarkerColors, ) { companion object { private const val DEFAULT_MARKER_SIZE = 0.02f diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/GLHelper.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/GLHelper.kt index b60dc83c7f..b54fd97e4b 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/GLHelper.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/GLHelper.kt @@ -76,7 +76,7 @@ private fun initArrayBuffer(dataBuffer: Buffer, unitSizeInBytes: Int = 1): Int { GLES20.GL_ARRAY_BUFFER, dataBuffer.capacity() * unitSizeInBytes, dataBuffer, - GLES20.GL_STATIC_DRAW + GLES20.GL_STATIC_DRAW, ) return buffer[0] } @@ -90,11 +90,11 @@ internal fun initIndexBuffer(dataBuffer: Buffer): IndexBufferWithLength { GLES20.GL_ELEMENT_ARRAY_BUFFER, dataBuffer.capacity(), dataBuffer, - GLES20.GL_STATIC_DRAW + GLES20.GL_STATIC_DRAW, ) return IndexBufferWithLength( indexBuffer = buffer[0], - length = dataBuffer.capacity() / Float.SIZE_BYTES + length = dataBuffer.capacity() / Float.SIZE_BYTES, ) } diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/MapGLRenderer.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/MapGLRenderer.kt index 887e64bebd..b767d894b7 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/MapGLRenderer.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/MapGLRenderer.kt @@ -27,7 +27,7 @@ internal class MapGLRenderer(private val resources: Resources) : GLSurfaceView.R evicted: Boolean, key: LocationMarkerColors, oldValue: LocationMarker, - newValue: LocationMarker? + newValue: LocationMarker?, ) { oldValue.onRemove() } @@ -114,7 +114,7 @@ internal class MapGLRenderer(private val resources: Resources) : GLSurfaceView.R FIELD_OF_VIEW, ratio, PERSPECTIVE_Z_NEAR, - PERSPECTIVE_Z_FAR + PERSPECTIVE_Z_FAR, ) } } diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt index 7e862ef59e..8b5b834f61 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/Globe.kt @@ -61,7 +61,7 @@ internal class Globe(resources: Resources) { UniformLocation( color = GLES20.glGetUniformLocation(shaderProgram, "uColor"), projectionMatrix = GLES20.glGetUniformLocation(shaderProgram, "uProjectionMatrix"), - modelViewMatrix = GLES20.glGetUniformLocation(shaderProgram, "uModelViewMatrix") + modelViewMatrix = GLES20.glGetUniformLocation(shaderProgram, "uModelViewMatrix"), ) } @@ -69,7 +69,7 @@ internal class Globe(resources: Resources) { projectionMatrix: FloatArray, viewMatrix: FloatArray, colors: GlobeColors, - contourWidth: Float = 3f + contourWidth: Float = 3f, ) { val globeViewMatrix = viewMatrix.copyOf() @@ -84,7 +84,7 @@ internal class Globe(resources: Resources) { landVertexBuffer, landContour, colors.contourColorArray, - GLES20.GL_LINE_STRIP + GLES20.GL_LINE_STRIP, ) // Scale the globe to avoid z-fighting @@ -93,7 +93,7 @@ internal class Globe(resources: Resources) { 0, LAND_OCEAN_SCALE_FACTOR, LAND_OCEAN_SCALE_FACTOR, - LAND_OCEAN_SCALE_FACTOR + LAND_OCEAN_SCALE_FACTOR, ) // Draw land @@ -113,7 +113,7 @@ internal class Globe(resources: Resources) { oceanVertexBuffer, oceanIndices, colors.oceanColorArray, - GLES20.GL_TRIANGLES + GLES20.GL_TRIANGLES, ) } @@ -149,7 +149,7 @@ internal class Globe(resources: Resources) { private data class UniformLocation( val color: Int, val projectionMatrix: Int, - val modelViewMatrix: Int + val modelViewMatrix: Int, ) companion object { diff --git a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/LocationMarker.kt b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/LocationMarker.kt index c67a0a1bb7..26e69416b9 100644 --- a/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/LocationMarker.kt +++ b/android/lib/map/src/main/kotlin/net/mullvad/mullvadvpn/lib/map/internal/shapes/LocationMarker.kt @@ -41,12 +41,12 @@ internal class LocationMarker(val colors: LocationMarkerColors) { attribLocations = AttribLocations( vertexPosition = GLES20.glGetAttribLocation(shaderProgram, "aVertexPosition"), - vertexColor = GLES20.glGetAttribLocation(shaderProgram, "aVertexColor") + vertexColor = GLES20.glGetAttribLocation(shaderProgram, "aVertexColor"), ) uniformLocation = UniformLocation( projectionMatrix = GLES20.glGetUniformLocation(shaderProgram, "uProjectionMatrix"), - modelViewMatrix = GLES20.glGetUniformLocation(shaderProgram, "uModelViewMatrix") + modelViewMatrix = GLES20.glGetUniformLocation(shaderProgram, "uModelViewMatrix"), ) } @@ -177,7 +177,7 @@ internal class LocationMarker(val colors: LocationMarkerColors) { floatArrayOf(0.0f, 0.0f, 0.00003f), colors.centerColor, colors.centerColor, - ) // Center colored circle + ), // Center colored circle ) fun onRemove() { diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/AccountData.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/AccountData.kt index 60395721d8..8a4182b2e5 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/AccountData.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/AccountData.kt @@ -2,7 +2,4 @@ package net.mullvad.mullvadvpn.lib.model import org.joda.time.DateTime -data class AccountData( - val id: AccountId, - val expiryDate: DateTime, -) +data class AccountData(val id: AccountId, val expiryDate: DateTime) diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ActionAfterDisconnect.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ActionAfterDisconnect.kt index 531fc1c073..d18d887b50 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ActionAfterDisconnect.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ActionAfterDisconnect.kt @@ -3,5 +3,5 @@ package net.mullvad.mullvadvpn.lib.model enum class ActionAfterDisconnect { Nothing, Block, - Reconnect + Reconnect, } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ApiAccessMethod.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ApiAccessMethod.kt index d8762af391..3fdcf8c730 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ApiAccessMethod.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ApiAccessMethod.kt @@ -17,7 +17,7 @@ sealed interface ApiAccessMethod : Parcelable { val ip: String, val port: Port, val password: String?, - val cipher: Cipher + val cipher: Cipher, ) : CustomProxy } } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ApiAccessMethodSetting.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ApiAccessMethodSetting.kt index 07e1c185df..ff1fa8a771 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ApiAccessMethodSetting.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ApiAccessMethodSetting.kt @@ -4,5 +4,5 @@ data class ApiAccessMethodSetting( val id: ApiAccessMethodId, val name: ApiAccessMethodName, val enabled: Boolean, - val apiAccessMethod: ApiAccessMethod + val apiAccessMethod: ApiAccessMethod, ) diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/CustomList.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/CustomList.kt index ed43ac1097..12468aaecd 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/CustomList.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/CustomList.kt @@ -6,7 +6,7 @@ import arrow.optics.optics data class CustomList( val id: CustomListId, val name: CustomListName, - val locations: List<GeoLocationId> + val locations: List<GeoLocationId>, ) { companion object } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/DnsOptions.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/DnsOptions.kt index ae27e47457..0aee2239d2 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/DnsOptions.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/DnsOptions.kt @@ -6,7 +6,7 @@ import arrow.optics.optics data class DnsOptions( val state: DnsState, val defaultOptions: DefaultDnsOptions, - val customOptions: CustomDnsOptions + val customOptions: CustomDnsOptions, ) { companion object } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/DnsState.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/DnsState.kt index 4bf053eef1..7529b54864 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/DnsState.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/DnsState.kt @@ -2,5 +2,5 @@ package net.mullvad.mullvadvpn.lib.model enum class DnsState { Default, - Custom + Custom, } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/NewAccessMethodSetting.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/NewAccessMethodSetting.kt index 990dc300bc..b7a1016b8f 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/NewAccessMethodSetting.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/NewAccessMethodSetting.kt @@ -7,5 +7,5 @@ import kotlinx.parcelize.Parcelize data class NewAccessMethodSetting( val name: ApiAccessMethodName, val enabled: Boolean, - val apiAccessMethod: ApiAccessMethod.CustomProxy + val apiAccessMethod: ApiAccessMethod.CustomProxy, ) : Parcelable diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Notification.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Notification.kt index 5dda03aa9d..acb8d74907 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Notification.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Notification.kt @@ -18,7 +18,7 @@ sealed interface Notification { override val channelId: NotificationChannelId, override val actions: List<NotificationAction.AccountExpiry>, val websiteAuthToken: WebsiteAuthToken?, - val durationUntilExpiry: Duration + val durationUntilExpiry: Duration, ) : Notification { override val ongoing: Boolean = false } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ObfuscationSettings.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ObfuscationSettings.kt index b8a26973a2..1bf12b2f9b 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ObfuscationSettings.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ObfuscationSettings.kt @@ -5,7 +5,7 @@ import arrow.optics.optics @optics data class ObfuscationSettings( val selectedObfuscation: SelectedObfuscation, - val udp2tcp: Udp2TcpObfuscationSettings + val udp2tcp: Udp2TcpObfuscationSettings, ) { companion object } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ObfuscationType.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ObfuscationType.kt index 4e7cb1f5a8..80c2f70e13 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ObfuscationType.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ObfuscationType.kt @@ -2,5 +2,5 @@ package net.mullvad.mullvadvpn.lib.model enum class ObfuscationType { Udp2Tcp, - Shadowsocks + Shadowsocks, } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Ownership.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Ownership.kt index 5257f944d3..682419c19b 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Ownership.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Ownership.kt @@ -2,5 +2,5 @@ package net.mullvad.mullvadvpn.lib.model enum class Ownership { MullvadOwned, - Rented + Rented, } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ParameterGenerationError.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ParameterGenerationError.kt index 476aed1407..0aadc19094 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ParameterGenerationError.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/ParameterGenerationError.kt @@ -4,5 +4,5 @@ enum class ParameterGenerationError { NoMatchingRelay, NoMatchingBridgeRelay, NoWireguardKey, - CustomTunnelHostResultionError + CustomTunnelHostResultionError, } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/QuantumResistantState.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/QuantumResistantState.kt index c77dab72d3..26179c25c3 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/QuantumResistantState.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/QuantumResistantState.kt @@ -3,5 +3,5 @@ package net.mullvad.mullvadvpn.lib.model enum class QuantumResistantState { Auto, On, - Off + Off, } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayItem.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayItem.kt index 17bc563a8d..edf00d4cb4 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayItem.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayItem.kt @@ -13,10 +13,8 @@ sealed interface RelayItem { val hasChildren: Boolean @optics - data class CustomList( - val customList: DomainCustomList, - val locations: List<Location>, - ) : RelayItem { + data class CustomList(val customList: DomainCustomList, val locations: List<Location>) : + RelayItem { override val name: String = customList.name.value override val id = customList.id @@ -34,7 +32,7 @@ sealed interface RelayItem { data class Country( override val id: GeoLocationId.Country, override val name: String, - val cities: List<City> + val cities: List<City>, ) : Location { val relays = cities.flatMap { city -> city.relays } override val active = cities.any { it.active } @@ -47,7 +45,7 @@ sealed interface RelayItem { data class City( override val id: GeoLocationId.City, override val name: String, - val relays: List<Relay> + val relays: List<Relay>, ) : Location { override val active = relays.any { it.active } override val hasChildren: Boolean = relays.isNotEmpty() diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayList.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayList.kt index 39e43a713e..197849b2f1 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayList.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayList.kt @@ -2,5 +2,5 @@ package net.mullvad.mullvadvpn.lib.model data class RelayList( val countries: List<RelayItem.Location.Country>, - val wireguardEndpointData: WireguardEndpointData + val wireguardEndpointData: WireguardEndpointData, ) diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayOverride.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayOverride.kt index 3bd0a2f0a1..522031a332 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayOverride.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/RelayOverride.kt @@ -7,7 +7,7 @@ import java.net.InetAddress data class RelayOverride( val hostname: String, val ipv4AddressIn: InetAddress?, - val ipv6AddressIn: InetAddress? + val ipv6AddressIn: InetAddress?, ) { companion object } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/SelectedObfuscation.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/SelectedObfuscation.kt index 1651d61db7..03de12079e 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/SelectedObfuscation.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/SelectedObfuscation.kt @@ -3,5 +3,5 @@ package net.mullvad.mullvadvpn.lib.model enum class SelectedObfuscation { Auto, Off, - Udp2Tcp + Udp2Tcp, } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Settings.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Settings.kt index e801397b27..0c15202bee 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Settings.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/Settings.kt @@ -13,7 +13,7 @@ data class Settings( val relayOverrides: List<RelayOverride>, val showBetaReleases: Boolean, val splitTunnelSettings: SplitTunnelSettings, - val apiAccessMethodSettings: List<ApiAccessMethodSetting> + val apiAccessMethodSettings: List<ApiAccessMethodSetting>, ) { companion object } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TransportProtocol.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TransportProtocol.kt index b25e3061be..4a36c3ce3c 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TransportProtocol.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TransportProtocol.kt @@ -6,5 +6,5 @@ import kotlinx.parcelize.Parcelize @Parcelize enum class TransportProtocol : Parcelable { Tcp, - Udp + Udp, } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TunnelEndpoint.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TunnelEndpoint.kt index d715f16766..1465997cc5 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TunnelEndpoint.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TunnelEndpoint.kt @@ -3,5 +3,5 @@ package net.mullvad.mullvadvpn.lib.model data class TunnelEndpoint( val endpoint: Endpoint, val quantumResistant: Boolean, - val obfuscation: ObfuscationEndpoint? + val obfuscation: ObfuscationEndpoint?, ) diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TunnelState.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TunnelState.kt index 8ed43bd294..53d468c01e 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TunnelState.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/lib/model/TunnelState.kt @@ -6,13 +6,13 @@ sealed class TunnelState { data class Connecting( val endpoint: TunnelEndpoint?, val location: GeoIpLocation?, - val featureIndicators: List<FeatureIndicator> + val featureIndicators: List<FeatureIndicator>, ) : TunnelState() data class Connected( val endpoint: TunnelEndpoint, val location: GeoIpLocation?, - val featureIndicators: List<FeatureIndicator> + val featureIndicators: List<FeatureIndicator>, ) : TunnelState() data class Disconnecting(val actionAfterDisconnect: ActionAfterDisconnect) : TunnelState() @@ -33,7 +33,7 @@ sealed class TunnelState { return when (this) { is Connected, is Connecting, - is Disconnecting, -> true + is Disconnecting -> true is Disconnected -> false is Error -> this.errorState.isBlocking } diff --git a/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/PaymentRepository.kt b/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/PaymentRepository.kt index 0f076eab74..8faa7d08bc 100644 --- a/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/PaymentRepository.kt +++ b/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/PaymentRepository.kt @@ -13,7 +13,7 @@ interface PaymentRepository { fun purchaseProduct( productId: ProductId, - activityProvider: () -> Activity + activityProvider: () -> Activity, ): Flow<PurchaseResult> suspend fun verifyPurchases(): Either<VerificationError, VerificationResult> diff --git a/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/model/PaymentProduct.kt b/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/model/PaymentProduct.kt index 8945453d37..6185d9d093 100644 --- a/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/model/PaymentProduct.kt +++ b/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/model/PaymentProduct.kt @@ -3,5 +3,5 @@ package net.mullvad.mullvadvpn.lib.payment.model data class PaymentProduct( val productId: ProductId, val price: ProductPrice, - val status: PaymentStatus? + val status: PaymentStatus?, ) diff --git a/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/model/PaymentStatus.kt b/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/model/PaymentStatus.kt index 37574249a6..294802c1d7 100644 --- a/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/model/PaymentStatus.kt +++ b/android/lib/payment/src/main/kotlin/net/mullvad/mullvadvpn/lib/payment/model/PaymentStatus.kt @@ -2,5 +2,5 @@ package net.mullvad.mullvadvpn.lib.payment.model enum class PaymentStatus { PENDING, - VERIFICATION_IN_PROGRESS + VERIFICATION_IN_PROGRESS, } diff --git a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt index 82f70e8140..b605bf7ac0 100644 --- a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt +++ b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/AccountRepository.kt @@ -25,7 +25,7 @@ import org.joda.time.DateTime class AccountRepository( private val managementService: ManagementService, private val deviceRepository: DeviceRepository, - val scope: CoroutineScope + val scope: CoroutineScope, ) { private val _mutableAccountDataCache: MutableSharedFlow<AccountData> = MutableSharedFlow() @@ -43,7 +43,7 @@ class AccountRepository( DeviceState.Revoked -> null } }, - _mutableAccountDataCache + _mutableAccountDataCache, ) .distinctUntilChanged() .stateIn(scope = scope, SharingStarted.Eagerly, null) diff --git a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt index 13d668b65b..2dbd15ec03 100644 --- a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt +++ b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt @@ -12,7 +12,7 @@ import net.mullvad.mullvadvpn.lib.model.TunnelState class ConnectionProxy( private val managementService: ManagementService, translationRepository: RelayLocationTranslationRepository, - private val vpnPermissionRepository: VpnPermissionRepository + private val vpnPermissionRepository: VpnPermissionRepository, ) { val tunnelState = combine(managementService.tunnelState, translationRepository.translations) { diff --git a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt index 29f91b43f1..258f918788 100644 --- a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt +++ b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/DeviceRepository.kt @@ -18,18 +18,18 @@ import net.mullvad.mullvadvpn.lib.model.GetDeviceListError class DeviceRepository( private val managementService: ManagementService, - dispatcher: CoroutineDispatcher = Dispatchers.IO + dispatcher: CoroutineDispatcher = Dispatchers.IO, ) { val deviceState: StateFlow<DeviceState?> = managementService.deviceState.stateIn( CoroutineScope(dispatcher), SharingStarted.Eagerly, - null + null, ) suspend fun removeDevice( accountNumber: AccountNumber, - deviceId: DeviceId + deviceId: DeviceId, ): Either<DeleteDeviceError, Unit> = managementService.removeDevice(accountNumber, deviceId) suspend fun deviceList(accountNumber: AccountNumber): Either<GetDeviceListError, List<Device>> = diff --git a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/RelayLocationTranslationRepository.kt b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/RelayLocationTranslationRepository.kt index edaa0c1ebc..b2685abaf2 100644 --- a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/RelayLocationTranslationRepository.kt +++ b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/RelayLocationTranslationRepository.kt @@ -23,7 +23,7 @@ class RelayLocationTranslationRepository( val context: Context, val localeRepository: LocaleRepository, externalScope: CoroutineScope = MainScope(), - val dispatcher: CoroutineDispatcher = Dispatchers.IO + val dispatcher: CoroutineDispatcher = Dispatchers.IO, ) { val translations: StateFlow<Translations> = localeRepository.currentLocale diff --git a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/VoucherRepository.kt b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/VoucherRepository.kt index 3ea55ccd9d..9b08181ee3 100644 --- a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/VoucherRepository.kt +++ b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/VoucherRepository.kt @@ -5,7 +5,7 @@ import net.mullvad.mullvadvpn.lib.model.VoucherCode class VoucherRepository( private val managementService: ManagementService, - private val accountRepository: AccountRepository + private val accountRepository: AccountRepository, ) { suspend fun submitVoucher(voucher: VoucherCode) = managementService.submitVoucher(voucher).onRight { diff --git a/android/lib/shared/src/test/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt b/android/lib/shared/src/test/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt index 138d0f5a41..0652867105 100644 --- a/android/lib/shared/src/test/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt +++ b/android/lib/shared/src/test/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt @@ -20,7 +20,7 @@ class ConnectionProxyTest { ConnectionProxy( managementService = mockManagementService, vpnPermissionRepository = mockVpnPermissionRepository, - translationRepository = mockTranslationRepository + translationRepository = mockTranslationRepository, ) @Test diff --git a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/model/TunConfig.kt b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/model/TunConfig.kt index 955a6f4454..77ea112043 100644 --- a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/model/TunConfig.kt +++ b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/model/TunConfig.kt @@ -7,5 +7,5 @@ data class TunConfig( val dnsServers: ArrayList<InetAddress>, val routes: ArrayList<InetNetwork>, val excludedPackages: ArrayList<String>, - val mtu: Int + val mtu: Int, ) diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt index 88ed41e6ab..1aa70f5fc2 100644 --- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt +++ b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Theme.kt @@ -47,8 +47,8 @@ private val MullvadTypography = TextStyle( fontWeight = FontWeight.Normal, letterSpacing = TextUnit.Unspecified, - fontSize = TypeScale.TextMedium - ) + fontSize = TypeScale.TextMedium, + ), ) private val lightColorScheme = @@ -136,7 +136,7 @@ val Shapes = small = RoundedCornerShape(4.dp), medium = RoundedCornerShape(4.dp), large = RoundedCornerShape(0.dp), - extraLarge = RoundedCornerShape(11.dp) + extraLarge = RoundedCornerShape(11.dp), ) val Dimens: Dimensions @@ -154,7 +154,7 @@ private val rippleAlpha = pressedAlpha = StateTokens.PressedStateLayerOpacity, focusedAlpha = StateTokens.FocusStateLayerOpacity, draggedAlpha = StateTokens.DraggedStateLayerOpacity, - hoveredAlpha = StateTokens.HoverStateLayerOpacity + hoveredAlpha = StateTokens.HoverStateLayerOpacity, ) @Composable @@ -183,7 +183,7 @@ fun AppTheme(content: @Composable () -> Unit) { ) { content() } - } + }, ) } } diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt index 55997a8f71..848e375e1c 100644 --- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt +++ b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/Type.kt @@ -25,9 +25,9 @@ internal val MullvadMaterial3Typography = fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.SemiBold, fontSize = 18.sp, - lineHeight = 23.sp + lineHeight = 23.sp, ), labelMedium = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.SemiBold), - labelSmall = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.SemiBold) + labelSmall = TextStyle(fontFamily = FontFamily.SansSerif, fontWeight = FontWeight.SemiBold), ) diff --git a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt index 5b79b1df15..9ea368382d 100644 --- a/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt +++ b/android/lib/theme/src/main/kotlin/net/mullvad/mullvadvpn/lib/theme/typeface/Typeface.kt @@ -13,7 +13,7 @@ val Typography.listItemText: TextStyle return TextStyle( fontWeight = FontWeight.Normal, letterSpacing = TextUnit.Unspecified, - fontSize = TypeScale.TextMediumPlus + fontSize = TypeScale.TextMediumPlus, ) } @@ -23,7 +23,7 @@ val Typography.listItemSubText: TextStyle return TextStyle( fontWeight = FontWeight.SemiBold, letterSpacing = TextUnit.Unspecified, - fontSize = TypeScale.TextSmall + fontSize = TypeScale.TextSmall, ) } @@ -33,6 +33,6 @@ val Typography.connectionStatus: TextStyle return TextStyle( fontWeight = FontWeight.Bold, letterSpacing = TextUnit.Unspecified, - fontSize = TypeScale.TextMedium + fontSize = TypeScale.TextMedium, ) } |
