fix going back to crust after sms or missed call

RTC loops was storing the good wake up reason but not the classic crust.

We fix it to notify the modemmonitor with the reason of the wake. This
should solve the issue and put the phone back to crust after sms.
This commit is contained in:
Stacy Harper 2021-06-21 08:50:13 +02:00
parent 574509115c
commit 4e36154aef
No known key found for this signature in database
GPG key ID: 5BAC92328B7C5D65

View file

@ -145,15 +145,10 @@ elif [ "$1" = "crust" ] ; then
updateLed
xset dpms force on
# all we know is it's not the rtc. Maybe modem?
# TODO: Check mmcli or something or sxmo's notifs when
# https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/356
# https://gitlab.com/postmarketOS/pmaports/-/merge_requests/2066
# fixed
# TODO: Document UNSUSPENDREASONFILE
echo "nonrtc" > "$UNSUSPENDREASONFILE"
UNSUSPENDREASON=$(whichWake)
echo "$UNSUSPENDREASON" > "$UNSUSPENDREASONFILE"
if [ "$(whichWake)" = "button" ] && [ -x "$XDG_CONFIG_HOME/sxmo/hooks/postwake" ]; then
if [ "$UNSUSPENDREASON" = "button" ] && [ -x "$XDG_CONFIG_HOME/sxmo/hooks/postwake" ]; then
"$XDG_CONFIG_HOME/sxmo/hooks/postwake"
fi