diff --git a/app-unpriv/src/main/java/im/angry/openeuicc/util/CompatibilityCheck.kt b/app-unpriv/src/main/java/im/angry/openeuicc/util/CompatibilityCheck.kt
index 93d49be..3d9c47b 100644
--- a/app-unpriv/src/main/java/im/angry/openeuicc/util/CompatibilityCheck.kt
+++ b/app-unpriv/src/main/java/im/angry/openeuicc/util/CompatibilityCheck.kt
@@ -47,13 +47,11 @@ abstract class CompatibilityCheck(context: Context) {
abstract val title: String
protected abstract val defaultDescription: String
- protected lateinit var successDescription: String
protected lateinit var failureDescription: String
val description: String
get() = when {
(state == State.FAILURE || state == State.FAILURE_UNKNOWN) && this::failureDescription.isInitialized -> failureDescription
- state == State.SUCCESS && this::successDescription.isInitialized -> successDescription
else -> defaultDescription
}
@@ -113,9 +111,9 @@ internal class OmapiConnCheck(private val context: Context): CompatibilityCheck(
failureDescription = context.getString(R.string.compatibility_check_omapi_connectivity_fail)
return State.FAILURE
} else if (simReaders.size < tm.activeModemCountCompat) {
- successDescription = context.getString(R.string.compatibility_check_omapi_connectivity_partial_success_sim_number,
+ failureDescription = context.getString(R.string.compatibility_check_omapi_connectivity_fail_sim_number,
simReaders.map { it.slotIndex }.joinToString(", "))
- return State.SUCCESS
+ return State.FAILURE
}
return State.SUCCESS
@@ -134,13 +132,7 @@ internal class IsdrChannelAccessCheck(private val context: Context): Compatibili
override suspend fun doCheck(): State {
val seService = connectSEService(context)
- val readers = seService.readers.filter { it.isSIM }
- if (readers.isEmpty()) {
- failureDescription = context.getString(R.string.compatibility_check_isdr_channel_desc_unknown)
- return State.FAILURE_UNKNOWN
- }
-
- val (validSlotIds, result) = readers.map {
+ val (validSlotIds, result) = seService.readers.filter { it.isSIM }.map {
try {
it.openSession().openLogicalChannel(ISDR_AID)?.close()
Pair(it.slotIndex, State.SUCCESS)
diff --git a/app-unpriv/src/main/res/values/strings.xml b/app-unpriv/src/main/res/values/strings.xml
index 8845a58..3a20af1 100644
--- a/app-unpriv/src/main/res/values/strings.xml
+++ b/app-unpriv/src/main/res/values/strings.xml
@@ -9,8 +9,8 @@
Your device has no support for accessing SIM cards via OMAPI.
OMAPI Connectivity
Does your device allow access to Secure Elements on SIM cards via OMAPI?
- Unable to detect Secure Element readers for SIM cards via OMAPI. If you have not inserted a SIM in this device, try inserting one and retry this check.
- Successfully detected Secure Element access, but only for the following SIM slots: %s.
+ Unable to detect Secure Element readers for SIM cards via OMAPI.
+ Only the following SIM slots are accessible via OMAPI: %s.
ISD-R Channel Access
Does your device support opening an ISD-R (management) channel to eSIMs via OMAPI?
Cannot determine whether ISD-R access through OMAPI is supported. You might want to retry with SIM cards inserted (any SIM card will do) if not already.