View Single Post
Old 12-06-2015, 08:49 AM   #2537
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@Alan_S:

If the sensor hasn't changed behavior since whomever wrote that piece of code tested it, the intended behavior is:

Sleep Cover is closed -> PRESS event -> SUSPEND
Sleep Cover is opened -> RELEASE event -> RESUME

The general power handling code has guards against double-suspend/double-wakeup attempts, so closing the cover after flicking the power button shouldn't have any impact.

Opening the cover should, however, wake the device up, no matter how it was put to sleep.


TL;DR: Unless you see spurious RELEASE events coming from the sensor, the device shouldn't wake-up from the sleep cover.


EDIT: On the other hand, doing it the other way around, i.e., closing the sleep cover and *THEN* flicking the power switch, that *WILL* cancel the suspend, if you do that in the ~10s window before the device is actually put to sleep.

EDITē: With debug logging enabled, any of these events will be logged ("Suspending..." or "Resuming...").

Last edited by NiLuJe; 12-06-2015 at 08:54 AM.
NiLuJe is offline   Reply With Quote