modem, callscreen, ring: fix DSDS incoming ring hangup/volume and add Primary/Secondary GW SIM swap UI

This commit is contained in:
Luxferre committed 2026-10-27 13:02:14 +02:00
1 parent 9a079e1068
commit 7927bacb67
18 files changed
+280 -84

No files matched your search

+12 -1
View File
@@ -115,6 +115,10 @@ checkforfinishedcalls() {
if ! sxmo_modemcall.sh list_active_calls | grep -q .; then
# Cleanup
sxmo_jobs.sh stop ringing
pkill -TERM -f sxmo_hook_ring.sh 2>/dev/null || true
pkill -TERM -f "pw-play.*ring" 2>/dev/null || true
pkill -TERM -f "mpv.*ring" 2>/dev/null || true
pkill -TERM -x sxmo_vibrate 2>/dev/null || true
rm -f "$XDG_RUNTIME_DIR/sxmo_calls/"* 2>/dev/null || true
if [ "$STATE" != muted ] && [ ! -f "$XDG_CONFIG_HOME/sxmo/.novibrate" ]; then
sxmo_vibrate 600 &
@@ -133,6 +137,13 @@ checkforfinishedcalls() {
sxmo_hook_after_call.sh
else
# Or refresh the menu
if ! sxmo_modemcall.sh list_active_calls | grep -q "ringing-in"; then
sxmo_jobs.sh stop ringing
pkill -TERM -f sxmo_hook_ring.sh 2>/dev/null || true
pkill -TERM -f "pw-play.*ring" 2>/dev/null || true
pkill -TERM -f "mpv.*ring" 2>/dev/null || true
pkill -TERM -x sxmo_vibrate 2>/dev/null || true
fi
sxmo_jobs.sh start incall_menu sxmo_modemcall.sh incall_menu
fi
done
@@ -165,7 +176,7 @@ checkforincomingcalls() {
else
stderr "Invoking ring hook (async)"
CONTACTNAME=$(sxmo_contacts.sh --name-or-number "$INCOMINGNUMBER")
sxmo_jobs.sh start ringing sxmo_hook_ring.sh "$CONTACTNAME"
sxmo_jobs.sh start --group ringing sxmo_hook_ring.sh "$CONTACTNAME"
mkdir -p "$SXMO_LOGDIR"
printf %b "$TIME\tcall_ring\t$INCOMINGNUMBER\n" >> "$SXMO_LOGDIR/modemlog.tsv"
+4 -2
View File
@@ -93,7 +93,8 @@ pickup() {
return 1
fi
if ! mmcli -m any -o "$CALLID" --accept; then
if ! mmcli -m any -o "$CALLID" --accept 2>/dev/null && \
! doas -n /usr/libexec/msm-modem-uim-selection call-accept "$CALLID" >/dev/null 2>&1; then
sxmo_notify_user.sh --urgency=critical "We failed to accept the call"
return 1
fi
@@ -152,7 +153,8 @@ hangup() {
sxmo_hook_discard.sh
fi
if ! mmcli -m any -o "$CALLID" --hangup; then
if ! mmcli -m any -o "$CALLID" --hangup 2>/dev/null && \
! doas -n /usr/libexec/msm-modem-uim-selection call-hangup "$CALLID" >/dev/null 2>&1; then
# we ignore already closed calls
if list_active_calls | grep -q "/$CALLID "; then
sxmo_notify_user.sh --urgency=critical "We failed to hangup the call"