modem: prevent duplicate SIM PIN entry dialog in dual-SIM mode
This commit is contained in:
1 parent
2e2adcc7f2
commit
4aa087f372
6 files changed
+174
-65
No files matched your search
@@ -43,6 +43,11 @@ mainloop() {
|
||||
uim_st="$(doas -n /usr/libexec/msm-modem-uim-selection status 2>/dev/null || /usr/libexec/msm-modem-uim-selection status 2>/dev/null || true)"
|
||||
if printf "%s\n" "$uim_st" | grep -qE "SLOT[12]_PIN1_STATE=(enabled-not-verified|blocked)|SLOT[12]_APP_STATE=(pin1|puk1)"; then
|
||||
newstate="locked"
|
||||
elif [ "$newstate" = "locked" ] && printf "%s\n" "$uim_st" | grep -q "^MODEM_AVAILABLE=1$"; then
|
||||
newstate="$(mmcli -m any -K 2>/dev/null | grep "^modem.generic.state " | cut -d':' -f2 | sed 's/^ //')"
|
||||
if [ "$newstate" = "locked" ]; then
|
||||
newstate="disabled"
|
||||
fi
|
||||
elif printf "%s\n" "$uim_st" | grep -qE "SLOT[12]_STATE=present" && printf "%s\n" "$uim_st" | grep -q "^PRIMARY_GW_SLOT=0$"; then
|
||||
doas -n /usr/libexec/msm-modem-uim-selection boot >/dev/null 2>&1 || true
|
||||
newstate="$(mmcli -m any -K 2>/dev/null | grep "^modem.generic.state " | cut -d':' -f2 | sed 's/^ //')"
|
||||
|
||||
Reference in new issue
Block a user