Issue metadata
Sign in to add a comment
|
Tapping power button turns off screen immediately on samus |
||||||||||||||||||||||
Issue descriptionChrome Version: 63.0.3237.0 CrOS Version: 99973.0.0 If I tap the power button (which is easy to do accidentally_ the screen goes black immediately and the device is locked. Long pressing the power button fades the display then turns the device off insstead of entering the lock screen. This seems like tablet behavior?
,
Oct 11 2017
,
Oct 11 2017
Yes, my fault for this change: https://cs.chromium.org/chromium/src/ash/wm/tablet_mode/tablet_mode_controller.cc?type=cs&q=CanEnterTabletMode&l=159 The code I removed also checks IsEnabled(), which checks tablet mode switch. For samus, i think it has accelerometer data but not tablet mode switch. I think I should restore the code to cover samus case.
,
Oct 11 2017
btw, that cl was landed on 63.0.3235.0. Definitely it is the culprit.
,
Oct 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5004f01e55433edf3f1582d7d0f04c0804f2afad commit 5004f01e55433edf3f1582d7d0f04c0804f2afad Author: Qiang Xu <warx@chromium.org> Date: Thu Oct 12 01:15:59 2017 cros: restore TabletPowerButtonController::ShouldHandlePowerButtonEvents Changes: In CL: https://chromium-review.googlesource.com/c/chromium/src/+/702919, we remove ShouldHandlePowerButtonEvents to use having seen accelerometer data to enable tablet power button behavior. That neglects the kAshEnableTabletMode switch check. On Samus device, it has accelerometer but doesn't have kAshEnableTabletMode switch set since it is not able to covert to tablet mode. Bug: 773853 Test: added test coverage Change-Id: Ie68c112116a338e0a1be04ab14203723e14364cd Reviewed-on: https://chromium-review.googlesource.com/714026 Reviewed-by: Dan Erat <derat@chromium.org> Commit-Queue: Qiang(Joe) Xu <warx@chromium.org> Cr-Commit-Position: refs/heads/master@{#508196} [modify] https://crrev.com/5004f01e55433edf3f1582d7d0f04c0804f2afad/ash/system/power/power_button_test_base.cc [modify] https://crrev.com/5004f01e55433edf3f1582d7d0f04c0804f2afad/ash/system/power/power_button_test_base.h [modify] https://crrev.com/5004f01e55433edf3f1582d7d0f04c0804f2afad/ash/system/power/tablet_power_button_controller.cc [modify] https://crrev.com/5004f01e55433edf3f1582d7d0f04c0804f2afad/ash/system/power/tablet_power_button_controller.h [modify] https://crrev.com/5004f01e55433edf3f1582d7d0f04c0804f2afad/ash/system/power/tablet_power_button_controller_unittest.cc [modify] https://crrev.com/5004f01e55433edf3f1582d7d0f04c0804f2afad/ash/wm/power_button_controller.cc
,
Oct 12 2017
,
Oct 13 2017
I still feel ShouldHandlePowerButtonEvents should be removed. On Samus device, TabletPowerButtonController instance should not be constructed since no tablet mode exists. TabletPowerButtonController should only be constructed when TabletModeController::CanEnterTabletMode() is true. I would add kAshEnableTabletMode switch check in [1], which I think is a better solution. We have added test coverage in #5. [1] https://cs.chromium.org/chromium/src/ash/system/power/power_button_controller.cc?q=power_button_controller&dr=C&l=235
,
Oct 14 2017
Not initializing TabletPowerButtonController when tablet mode isn't possible makes sense to me.
,
Oct 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/517fa8e7a69d22c2fee11a61294f693c169565da commit 517fa8e7a69d22c2fee11a61294f693c169565da Author: Qiang Xu <warx@chromium.org> Date: Fri Oct 20 03:01:30 2017 cros: remove TabletPowerButtonController::ShouldHandlePowerButtonEvents changes: ShouldHandlePowerButtonEvents() is equivalent to TabletModeController::CanEnterTabletMode(), which is equivalent to having tablet mode switch and having seen accelerometer data. We could just not initialize TabletPowerButtonController in the first place. Bug: 773853 Test: test coverage by NoTabletModePowerButtonControllerTest Change-Id: I3d386cf3aaa4f8957fdfb9e5badce33dcef75c97 Reviewed-on: https://chromium-review.googlesource.com/723605 Commit-Queue: Qiang(Joe) Xu <warx@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Cr-Commit-Position: refs/heads/master@{#510310} [modify] https://crrev.com/517fa8e7a69d22c2fee11a61294f693c169565da/ash/system/power/power_button_controller.cc [modify] https://crrev.com/517fa8e7a69d22c2fee11a61294f693c169565da/ash/system/power/power_button_controller.h [modify] https://crrev.com/517fa8e7a69d22c2fee11a61294f693c169565da/ash/system/power/tablet_power_button_controller.cc [modify] https://crrev.com/517fa8e7a69d22c2fee11a61294f693c169565da/ash/system/power/tablet_power_button_controller.h [modify] https://crrev.com/517fa8e7a69d22c2fee11a61294f693c169565da/ash/system/power/tablet_power_button_controller_unittest.cc |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by derat@chromium.org
, Oct 11 2017