diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt index e9c40828..ab2b097a 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt @@ -87,7 +87,7 @@ class ClientsFragment : Fragment() { override fun AlertDialog.Builder.prepare(listener: DialogInterface.OnClickListener) { val context = context val resources = resources - val locale = resources.configuration.locale + val locale = resources.configuration.locales[0] setTitle(getText(R.string.clients_stats_title).format(locale, arg.title)) val format = NumberFormat.getIntegerInstance(locale) setMessage("%s\n%s\n%s".format( diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt b/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt index baee1257..885b796f 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt @@ -1,6 +1,6 @@ package be.mygod.vpnhotspot.client - import android.content.Context +import android.content.Context import android.net.MacAddress import androidx.annotation.MainThread import be.mygod.vpnhotspot.App.Companion.app diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt index bbfcb1f4..fb7fd8ae 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt @@ -231,7 +231,7 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(), app.resources.getQuantityText(R.plurals.tethering_manage_wifi_clients, numClients).format(locale, numClients) } - override val text get() = parent.resources.configuration.locale.let { locale -> + override val text get() = parent.resources.configuration.locales[0].let { locale -> listOfNotNull(failureReason?.let { WifiApManager.failureReasonLookup(it) }, baseError, info.run { if (isEmpty()) null else joinToSpanned("\n") @TargetApi(30) { parcel -> val info = SoftApInfo(parcel) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt index 0b0dedfc..ec9186e9 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt @@ -97,7 +97,7 @@ class WifiApDialogFragment : AlertDialogFragment