Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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