Add Dual-SIM Dual Standby (DSDS), outgoing SIM selection, and instant charging icon update
This commit is contained in:
1 parent
5132deb4d8
commit
46f1255905
28 files changed
+2560
-280
No files matched your search
@@ -46,6 +46,8 @@ mainloop() {
|
||||
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/^ //')"
|
||||
elif printf "%s\n" "$uim_st" | grep -q "^SLOT1_STATE=present$" && printf "%s\n" "$uim_st" | grep -q "^SLOT2_STATE=present$" && printf "%s\n" "$uim_st" | grep -q "^SECONDARY_GW_SLOT=0$"; then
|
||||
doas -n /usr/libexec/msm-modem-uim-selection boot >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
if [ -n "$newstate" ]; then
|
||||
@@ -55,6 +57,18 @@ mainloop() {
|
||||
fi
|
||||
) &
|
||||
|
||||
# Monitor Secondary GW SIM calls and SMS in Dual-SIM Dual Standby (DSDS)
|
||||
(
|
||||
while : ; do
|
||||
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 -q "^DUAL_SIM_ACTIVE=1$"; then
|
||||
doas -n /usr/libexec/msm-modem-uim-selection dsds-daemon 2>/dev/null || \
|
||||
/usr/libexec/msm-modem-uim-selection dsds-daemon 2>/dev/null || true
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
) &
|
||||
|
||||
# Monitor for incoming calls
|
||||
dbus-monitor --system "interface='org.freedesktop.ModemManager1.Modem.Voice',type='signal',member='CallAdded'" |
|
||||
while read -r line; do
|
||||
|
||||
Reference in new issue
Block a user