This is an initial thought about forced clamshell flag convertible power button behavior on sign-in/locked screen.
After issue 758574 , display will be forced off three seconds after screen locking starts when the --force-clamshell-power-button flag is set. One thing not good here is: when locked by the power button and display is off after 3 seconds, then user activity turns the display on, it is not possible to make the display off unless (1) login and then press power button, (2) wait inactivity delays.
Currently in code, with --force-clamshell-power-button, TabletPowerButtonController is not created, propose this:
(1) still creates TabletPowerButtonController with --force-clamshell-power-button flag
(2) in user session, performs the current logic for --force-clamshell-power-button
(3) out user session, performs tablet power button behavior.
The reason we adopted --force-clamshell-power-button is it will set display off when transporting device with hand pressed on power button, which is a bit annoying in user session to get display off. Is it OK when user is not logged in?
Comment 1 by derat@chromium.org
, Oct 9 2017