Compare commits

...

1 commit

2 changed files with 7 additions and 28 deletions

View file

@ -8,30 +8,6 @@
<SelectionState runConfigName="app"> <SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" /> <option name="selectionMode" value="DROPDOWN" />
</SelectionState> </SelectionState>
<SelectionState runConfigName="app-unpriv.androidTest">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="app-unpriv.main">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="app-unpriv.unitTest">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="app.unitTest">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="app.androidTest">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="app.main">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="workspace.OpenEUICC.app-unpriv">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
<SelectionState runConfigName="workspace.OpenEUICC.app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates> </selectionStates>
</component> </component>
</project> </project>

View file

@ -127,8 +127,9 @@ open class QuickCompatibilityFragment : Fragment(), UnprivilegedEuiccContextMark
if (!service.isConnected) { if (!service.isConnected) {
return CompatibilityResult(Compatibility.NOT_COMPATIBLE) return CompatibilityResult(Compatibility.NOT_COMPATIBLE)
} }
val omapiSlots = service.readers.filter { it.isSIM }.map { it.slotIndex } val readers = service.readers.filter(Reader::isSIM)
val slots = service.readers.filter { it.isSIM }.mapNotNull { reader -> val omapiSlots = readers.mapNotNull(Reader::slotIndex)
val slots = readers.mapNotNull { reader ->
try { try {
// Note: we ONLY check the default ISD-R AID, because this test is for the _device_, // Note: we ONLY check the default ISD-R AID, because this test is for the _device_,
// NOT the eUICC. We don't care what AID a potential eUICC might use, all we need to // NOT the eUICC. We don't care what AID a potential eUICC might use, all we need to
@ -147,10 +148,12 @@ open class QuickCompatibilityFragment : Fragment(), UnprivilegedEuiccContextMark
if (omapiSlots.isEmpty()) { if (omapiSlots.isEmpty()) {
return CompatibilityResult(Compatibility.NOT_COMPATIBLE) return CompatibilityResult(Compatibility.NOT_COMPATIBLE)
} }
val formatChannelName = appContainer.customizableTextProvider::formatInternalChannelName
return CompatibilityResult( return CompatibilityResult(
Compatibility.COMPATIBLE, Compatibility.COMPATIBLE,
slotsOmapi = omapiSlots.map { "SIM$it" }, slotsOmapi = omapiSlots.map(formatChannelName),
slotsIsdr = slots.map { "SIM$it" }) slotsIsdr = slots.map(formatChannelName),
)
} }
open fun formatConclusion(result: CompatibilityResult): String { open fun formatConclusion(result: CompatibilityResult): String {