aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2023-04-07 15:22:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2023-04-07 15:22:00 +0200
commit3c834ac8e3828d3ac731e1568ddecd8f0c144b99 (patch)
tree916296f27dc82ff13380369443f8a8a91e6dbaba /ui
parentui: set app list button text on main thread (diff)
downloadwireguard-android-3c834ac8e3828d3ac731e1568ddecd8f0c144b99.tar.xz
wireguard-android-3c834ac8e3828d3ac731e1568ddecd8f0c144b99.zip
ui: always show visible localized error messages
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/src/main/java/com/wireguard/android/util/ErrorMessages.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/src/main/java/com/wireguard/android/util/ErrorMessages.kt b/ui/src/main/java/com/wireguard/android/util/ErrorMessages.kt
index 27495b60..66027d95 100644
--- a/ui/src/main/java/com/wireguard/android/util/ErrorMessages.kt
+++ b/ui/src/main/java/com/wireguard/android/util/ErrorMessages.kt
@@ -92,8 +92,8 @@ object ErrorMessages {
rootCause is ChecksumException -> {
resources.getString(R.string.error_qr_checksum)
}
- rootCause.message != null -> {
- rootCause.message!!
+ rootCause.localizedMessage != null -> {
+ rootCause.localizedMessage!!
}
else -> {
val errorType = rootCause.javaClass.simpleName
@@ -109,7 +109,7 @@ object ErrorMessages {
if (kfe!!.type == KeyFormatException.Type.LENGTH) return resources.getString(KFE_FORMAT_MAP.getValue(kfe.format))
} else if (bce.cause is ParseException) {
val pe = bce.cause as ParseException?
- if (pe!!.message != null) return ": ${pe.message}"
+ if (pe!!.localizedMessage != null) return ": ${pe.localizedMessage}"
} else if (bce.location == BadConfigException.Location.LISTEN_PORT) {
return resources.getString(R.string.bad_config_explanation_udp_port)
} else if (bce.location == BadConfigException.Location.MTU) {