[Cast] Abstract screen power off logic to an interface.
* Extract original implementation from display_settings_manager_impl.cc to screen_power_controller_aura.cc * This allows the display to be enabled/disabled when allow_screen_power_off_ is set to be false/true after screen is off. * This handles multiple power requests at the same time (e.g. SetScreenOn() and SetScreenOff() at the same time). * Add logs when screen is successfully powered on/off. * Add unittest to ScreenPowerControllerAura. Bug: b/162546246 Bug: b/173504008 Test: cast_display_settings_unittests --single-process-tests --gtest_filter=ScreenPowerControllerAuraTest.* Test: logcat | grep "screen_power_controller", mute the mic, in low light: display off mode, and toggle the display timeout on and off. Logs should show that "Screen is powered on/off". Change-Id: If470d72eeb11c53e6dea8eefbd63f71e0f6c4dd2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391333 Commit-Queue: Mingyu Kang <kenkangxgwe@google.com> Reviewed-by:Daniel Nicoara <dnicoara@chromium.org> Reviewed-by:
Sean Topping <seantopping@chromium.org> Cr-Commit-Position: refs/heads/master@{#835044}
Showing
Please register or sign in to comment