Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[tklock] Reimplement lid sensor based blanking policy. Fixes JB#32278
While the original logic was developed it was not possible to gain access
to als data while display is off. Additionally the filtering logic uses
level based triggering which made it evolve into requiring numerous flag
variables to deal with situations where order of events matters.

Rewrite the state machines in a way that order of lid / als changes is
always considered and appropriate actions are taken if expected events
do not follow the initial triggers in time.

Use the ALS sensor poll feature to filter false positive lid open events.

Known caveat: It is still possible to reach a state where display is
blanked and double tap disabled without actually having the cover on
screen (Variations of: Put finger on top of the ambient light sensor and
then flip the cover behind the device). Avoiding these altogether is
difficult without losing all the pm benefits from having the double tap
detection disabled while it should not be physically possible to use.
  • Loading branch information
spiiroin committed Oct 15, 2015
1 parent fda52bc commit 08a4330
Showing 1 changed file with 627 additions and 179 deletions.

0 comments on commit 08a4330

Please sign in to comment.