From 9b7d9db577d18a0f8e5e91302a46d37d8f319f53 Mon Sep 17 00:00:00 2001 From: Damon To Date: Wed, 24 Jul 2024 17:09:22 +0800 Subject: [PATCH] chore: use QMI commands for checking if the UICC is an eUICC --- internal/pkg/modem/modem.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/pkg/modem/modem.go b/internal/pkg/modem/modem.go index e458f3a..c137055 100644 --- a/internal/pkg/modem/modem.go +++ b/internal/pkg/modem/modem.go @@ -11,7 +11,6 @@ import ( "strings" "syscall" - "github.com/damonto/telegram-sms/internal/pkg/config" "github.com/maltegrosse/go-modemmanager" "golang.org/x/sys/unix" ) @@ -31,10 +30,10 @@ func (m *Modem) Unlock() { } func (m *Modem) isEuicc() bool { - if config.APDUDriverAT == config.C.APDUDriver { - return m.checkByATCommand() + if m.checkByQmicli() { + return true } - return m.checkByQmicli() + return m.checkByATCommand() } func (m *Modem) checkByQmicli() bool {