diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/wizard/DownloadWizardDetailsFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/wizard/DownloadWizardDetailsFragment.kt
index 007e4c0..4f66307 100644
--- a/app-common/src/main/java/im/angry/openeuicc/ui/wizard/DownloadWizardDetailsFragment.kt
+++ b/app-common/src/main/java/im/angry/openeuicc/ui/wizard/DownloadWizardDetailsFragment.kt
@@ -79,19 +79,13 @@ class DownloadWizardDetailsFragment : DownloadWizardActivity.DownloadWizardStepF
private fun validate() {
smdp.error = smdp.editText!!.text?.let {
- when {
- it.isEmpty() -> getString(R.string.download_wizard_error_address_required)
- it.contains("://") -> getString(R.string.download_wizard_error_cannot_url)
- Patterns.DOMAIN_NAME.matcher(it).matches() -> null
- else -> getString(R.string.download_wizard_error_address_invalid_format)
- }
+ if (Patterns.DOMAIN_NAME.matcher(smdp.editText!!.text).matches()) return@let null
+ getString(R.string.download_wizard_error_invalid_address_format)
}
imei.error = imei.editText!!.text?.let {
- when {
- it.isEmpty() -> null
- it.length == 15 && luhnValid(it) -> null
- else -> getString(R.string.download_wizard_error_imei_invalid_format)
- }
+ if (it.isEmpty()) return@let null
+ if (it.length == 15 && luhnValid(it)) return@let null
+ getString(R.string.download_wizard_error_invalid_imei_format)
}
}
}
diff --git a/app-common/src/main/res/values/strings.xml b/app-common/src/main/res/values/strings.xml
index 13d765f..94f7f7a 100644
--- a/app-common/src/main/res/values/strings.xml
+++ b/app-common/src/main/res/values/strings.xml
@@ -98,10 +98,8 @@
Last APDU exception:
Save
Diagnostics at %s
- Server address is required
- Server address not is URL
- Invalid Server address
- Invalid IMEI format
+ Invalid SM-DP+ address
+ Invalid IMEI format
Logs have been saved to the selected path. Would you like to share the log through another app?