sxmo_hook_screenoff.sh respect idle inhibitors
Previously, this hook was just removing the wake lock that prevent the device to suspend. This was only up to sxmo_hook_block_suspend.sh to prevent the device to suspend if some applications are active. With this change, we glue the idle inhibitors just before unlocking the wake lock. It means that the user now can move the device to screenoff, with an idle inhibitor programs running, without needing to add a dedicated rule to the block_suspends hook. This also remove the need of this sxmo_hold_a_bit 3s wakelock.
This commit is contained in:
@@ -36,5 +36,6 @@ esac
|
||||
|
||||
wait
|
||||
|
||||
sxmo_wakelock.sh lock sxmo_hold_a_bit 3s # avoid immediate suspension
|
||||
sxmo_wakelock.sh unlock sxmo_not_screenoff
|
||||
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
|
||||
timeout 3 'sxmo_wakelock.sh unlock sxmo_not_screenoff' \
|
||||
resume 'sxmo_wakelock.sh lock sxmo_not_screenoff infinite'
|
||||
|
Reference in New Issue
Block a user