Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Issue 2521103002: Ignore OnKeyEvent for VKEY_POWER because it is handled by PowerButtonEvent (Closed)

Created:
4 years, 1 month ago by Qiang(Joe) Xu
Modified:
4 years, 1 month ago
Reviewers:
Daniel Erat
CC:
chromium-reviews, kalyank, sadrul, oshima+watch_chromium.org, derat+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ignore OnKeyEvent for VKEY_POWER because it is handled by PowerButtonEvent Before this change, today I meet the issue (it doesn't happen frequently) that pressing-and-releasing power button should SetBacklightsForcedOff(true). However, screen is turned off and then turned on. Checking powerd log that, there is Stop SetBacklightsForcedOff request. It is coming from VKEY_POWER keyevent timing issue. The right design should also avoid this key event. BUG=633304 TEST=cannot see the bug for many taps; add unittest. Committed: https://crrev.com/93aefeb6fd6780215aa647dfb16e840d22ef0388 Cr-Commit-Position: refs/heads/master@{#433954}

Patch Set 1 #

Patch Set 2 : add tests #

Total comments: 9

Patch Set 3 : based on comments #

Patch Set 4 : tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -2 lines) Patch
M ash/system/chromeos/power/tablet_power_button_controller.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M ash/system/chromeos/power/tablet_power_button_controller_unittest.cc View 1 2 3 2 chunks +24 lines, -0 lines 0 comments Download
M chromeos/dbus/fake_power_manager_client.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M chromeos/dbus/fake_power_manager_client.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (12 generated)
Qiang(Joe) Xu
Hi Daniel, ptal, thanks!
4 years, 1 month ago (2016-11-21 23:37:14 UTC) #6
Daniel Erat
can you add a test for this as well?
4 years, 1 month ago (2016-11-21 23:44:15 UTC) #7
Qiang(Joe) Xu
Hi Daniel, test added, ptal. https://codereview.chromium.org/2521103002/diff/20001/chromeos/dbus/fake_power_manager_client.cc File chromeos/dbus/fake_power_manager_client.cc (left): https://codereview.chromium.org/2521103002/diff/20001/chromeos/dbus/fake_power_manager_client.cc#oldcode29 chromeos/dbus/fake_power_manager_client.cc:29: } changed by git ...
4 years, 1 month ago (2016-11-22 00:35:47 UTC) #8
Daniel Erat
https://codereview.chromium.org/2521103002/diff/20001/ash/system/chromeos/power/tablet_power_button_controller.cc File ash/system/chromeos/power/tablet_power_button_controller.cc (right): https://codereview.chromium.org/2521103002/diff/20001/ash/system/chromeos/power/tablet_power_button_controller.cc#newcode141 ash/system/chromeos/power/tablet_power_button_controller.cc:141: if (event->key_code() == ui::VKEY_POWER) please also document why these ...
4 years, 1 month ago (2016-11-22 00:48:19 UTC) #10
Qiang(Joe) Xu
Hi Daniel, ptal, thanks! https://codereview.chromium.org/2521103002/diff/20001/ash/system/chromeos/power/tablet_power_button_controller.cc File ash/system/chromeos/power/tablet_power_button_controller.cc (right): https://codereview.chromium.org/2521103002/diff/20001/ash/system/chromeos/power/tablet_power_button_controller.cc#newcode141 ash/system/chromeos/power/tablet_power_button_controller.cc:141: if (event->key_code() == ui::VKEY_POWER) On ...
4 years, 1 month ago (2016-11-22 01:02:51 UTC) #12
Daniel Erat
lgtm thanks! re duplicate key events, that's really strange. just out of curiosity, if it's ...
4 years, 1 month ago (2016-11-22 16:00:09 UTC) #13
Qiang(Joe) Xu
On 2016/11/22 16:00:09, Daniel Erat wrote: > lgtm > > thanks! re duplicate key events, ...
4 years, 1 month ago (2016-11-22 18:58:38 UTC) #14
Daniel Erat
lgtm thanks! if this only happens for the power button, it's probably not a big ...
4 years, 1 month ago (2016-11-22 19:02:51 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2521103002/60001
4 years, 1 month ago (2016-11-22 19:07:35 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-22 20:09:04 UTC) #21
commit-bot: I haz the power
4 years, 1 month ago (2016-11-22 20:11:58 UTC) #23
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/93aefeb6fd6780215aa647dfb16e840d22ef0388
Cr-Commit-Position: refs/heads/master@{#433954}

Powered by Google App Engine
This is Rietveld 408576698