• Sammie Quon's avatar
    tablet: Do not unlock keyboard when going to clamshell with extern mouse. · fada6a15
    Sammie Quon authored
    Internal keyboard and touchpad events are previously locked when entering
    tablet mode and unlocked when leaving. Now, when we attach a mouse, it
    will exit tablet mode, but the keyboard should not stay locked as the
    keyboard will be facing downwards in the case of flip chromebook. The
    lock should instead be controlled by the hinges regardless if change in
    hinge causes tablet mode to change.
    
    Also rename EnterTabletMode to AttemptEnterTabletMode as it does not
    always enter.
    
    Test: ash_unittests TabletModeControllerTest.LeaveTabletModeWhenExternalMouseConnected
    Bug: 870757
    Change-Id: I38a537871aa6a1e7cd94311308d421af3dfc2ad1
    Reviewed-on: https://chromium-review.googlesource.com/1162512
    Commit-Queue: Sammie Quon <sammiequon@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#580657}
    fada6a15
tablet_mode_controller_unittest.cc 30.9 KB