Compare commits

..

1 commit

Author SHA1 Message Date
c1faa56e9f
feat: add eastcompeace supports 2025-03-24 19:43:02 +08:00

View file

@ -132,11 +132,9 @@ private class Eastcompeace : EuiccVendor {
override fun tryParseEuiccVendorInfo(channel: EuiccChannel): EuiccVendorInfo? {
if (!channel.lpa.eID.startsWith(EID_PREFIX)) return null
return channel.apduInterface.withLogicalChannel(PRODUCT_AID, ::parseSCID)
}
fun parseSCID(transmit: (ByteArray) -> ByteArray): EuiccVendorInfo? {
val scid = decodeResponse(transmit(COMMAND))?.let(::SCID) ?: return null
return channel.apduInterface.withLogicalChannel(PRODUCT_AID) { transmit ->
val scid = decodeResponse(transmit(COMMAND))?.let(::SCID)
?: return@withLogicalChannel null
Log.i(TAG, "Eastcompeace SCID: $scid")
EuiccVendorInfo(
skuName = "Eastcompeace",
@ -145,4 +143,5 @@ private class Eastcompeace : EuiccVendor {
firmwareVersion = scid.cosVersion.encodeHex(),
)
}
}
}