Trigger postwake when leaving crust cause of USB-C power

Atm, only the button wake up reason was trigerring postwake. This make
the usb charger to uncrust the phone and leave it in lock or off mode.

Now postwake take an argument which is the wake up reason.

The modem reason should not manage so phone state so we make it explicit
in the default hook.

"usb power" and "button" now make the phone to blink 5 seconds and put
the phone back to crust.
master
Stacy Harper 3 years ago
parent 44dcd8ced9
commit dbca3ddd80
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 6
      configs/default_hooks/postwake
  2. 4
      scripts/core/sxmo_screenlock.sh

@ -2,6 +2,12 @@
. "$(which sxmo_common.sh)" . "$(which sxmo_common.sh)"
if [ "$1" = "modem" ]; then
# Modem wakeup will be handled by the modemmonitor loops
# We should not manage the phone lock state here
exit 0
fi
REDLED_PATH="/sys/class/leds/red:indicator/brightness" REDLED_PATH="/sys/class/leds/red:indicator/brightness"
BLUELED_PATH="/sys/class/leds/blue:indicator/brightness" BLUELED_PATH="/sys/class/leds/blue:indicator/brightness"

@ -155,10 +155,10 @@ elif [ "$1" = "crust" ] ; then
xset dpms force on xset dpms force on
fi fi
if [ "$UNSUSPENDREASON" = "button" ]; then if [ "$UNSUSPENDREASON" != "modem" ]; then
echo 1200 > "$NETWORKRTCSCAN" echo 1200 > "$NETWORKRTCSCAN"
sxmo_hooks.sh postwake
fi fi
sxmo_hooks.sh postwake "$UNSUSPENDREASON"
exit 0 exit 0
elif [ "$1" = "getCurState" ] ; then elif [ "$1" = "getCurState" ] ; then
getCurState getCurState

Loading…
Cancel
Save