forked from len0rd/rockbox
pwrmgmt: sleep timer: don't shut down while charging
This mirrors the behavior of idle poweroff, which inhibits shutdown as long as a charger is plugged in, even if a device is capable of powering off while charging. Since usb_inserted() already checks for USB_POWERED, certain devices with the ability to power off while charging, already exhibit this behavior when using the sleep timer anyway. Change-Id: I35ed4b542a8a4df06a34395c85f4d37fc1d2ce53
This commit is contained in:
parent
df7d68a6e2
commit
9d82db1146
1 changed files with 1 additions and 1 deletions
|
@ -1184,7 +1184,7 @@ static void handle_sleep_timer(void)
|
||||||
{
|
{
|
||||||
if (TIME_AFTER(current_tick, sleeptimer_endtick)) {
|
if (TIME_AFTER(current_tick, sleeptimer_endtick)) {
|
||||||
if (usb_inserted()
|
if (usb_inserted()
|
||||||
#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING)
|
#if CONFIG_CHARGING
|
||||||
|| charger_input_state != NO_CHARGER
|
|| charger_input_state != NO_CHARGER
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue