fix: simlink detect

This commit is contained in:
septs 2025-02-25 14:48:07 +08:00
parent fd40cdd6ad
commit 87f50b5487
Signed by: septs
SSH key fingerprint: SHA256:ElK0p6DNkbsqYUdJ3I9QHDVf21SQD0c2r+hd7s/r5Co

View file

@ -2,11 +2,10 @@ package im.angry.openeuicc.vendored
import net.typeblog.lpac_jni.Version
private val prefix = Regex("^89044045(84|21)67274948\\d+") // SIMLink EID prefix
private val prefix = Regex("^89044045(84|21)67274948") // SIMLink EID prefix
fun getSIMLinkVersion(eid: String, version: Version?): String? {
if (version == null) return null
if (!prefix.matches(eid)) return null
if (version == null || prefix.find(eid, 0) == null) return null
return when {
// @formatter:off
version >= Version(36, 7, 2) -> "v2"