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.
This commit is contained in:
Stacy Harper 2021-07-05 09:58:54 +02:00
parent 44dcd8ced9
commit dbca3ddd80
No known key found for this signature in database
GPG key ID: 5BAC92328B7C5D65
2 changed files with 8 additions and 2 deletions

View file

@ -2,6 +2,12 @@
. "$(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"
BLUELED_PATH="/sys/class/leds/blue:indicator/brightness"