TabletModeController: Refactor and Cleanup.
- Remove Attempt Enter/Leave TabletMode() which was scattered and used all over the place. - Make a clear distinction between a device physical tablet state (which is affected by device events such as lid angle changes, tablet EC switches, ... etc.) and a UI tablet state (which is whether the UI is currently in tablet or clamshell modes). - Gather all the inconsistent and scattered logic that affects the device and UI states into consolidated, and clear functions that get invoked whenever the state needs to be updated. This CL is a prerequisite work for the auto-rotation work coming up soon. BUG=925087 TEST=No behavior change, all tests must pass. Change-Id: If4c2777f434a09f3c70b32bb60367cfb118102b9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1851286 Commit-Queue: Ahmed Fakhry <afakhry@chromium.org> Reviewed-by:Mitsuru Oshima <oshima@chromium.org> Cr-Commit-Position: refs/heads/master@{#704975}
Showing
This diff is collapsed.
Please register or sign in to comment