powerd should emit D-Bus signal when inactivity delays change |
||
Issue descriptionpowerd should emit a new InactivityDelaysChanged signal that Chrome can listen for to observe changes to the in-effect inactivity delays. Chrome won't act on these delays (that's powerd's job), but they can be logged alongside user activity events. I think I can repurpose the existing PowerManagementPolicy::Delays protobuf submessage for this, assuming that we don't need to also report the lid-closed and idle actions.
,
Jan 12 2018
Sent https://crrev.com/c/862985 and https://crrev.com/c/862991 for the OS part of this.
,
Jan 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/15e2d0b8f139d2a8fc51d528425eae26f1e7338a commit 15e2d0b8f139d2a8fc51d528425eae26f1e7338a Author: Daniel Erat <derat@chromium.org> Date: Fri Jan 12 11:27:13 2018 power: Emit InactivityDelaysChanged D-Bus signals. Make powerd emit an InactivityDelaysChanged D-Bus signal containing a serialized PowerManagementPolicy::Delays protocol buffer whenever the current inactivity delays change, and add a GetInactivityDelays method that can be called to get the current delays. Also add the existing ScreenIdleStateChanged signal to org.chromium.PowerManager.xml (although its only consumer is Chrome, which doesn't use generated D-Bus bindings). BUG= chromium:801177 TEST=added unit tests; also manually observed with: dbus-monitor --system "member='InactivityDelaysChanged'" and queried with: dbus-send --system --dest=org.chromium.PowerManager \ --print-reply --type=method_call \ /org/chromium/PowerManager \ org.chromium.PowerManager.GetInactivityDelays CQ-DEPEND=I5f39d47f42b504c5c18238182a093f0abf072d98 Change-Id: Ie8e536de37694b6c096e073e570a1ad1634b139f Reviewed-on: https://chromium-review.googlesource.com/862991 Commit-Ready: Dan Erat <derat@chromium.org> Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org> [modify] https://crrev.com/15e2d0b8f139d2a8fc51d528425eae26f1e7338a/wimax_manager/power_manager_dbus_proxy.h [modify] https://crrev.com/15e2d0b8f139d2a8fc51d528425eae26f1e7338a/power_manager/powerd/policy/state_controller_unittest.cc [modify] https://crrev.com/15e2d0b8f139d2a8fc51d528425eae26f1e7338a/power_manager/powerd/daemon.cc [modify] https://crrev.com/15e2d0b8f139d2a8fc51d528425eae26f1e7338a/power_manager/powerd/policy/state_controller.h [modify] https://crrev.com/15e2d0b8f139d2a8fc51d528425eae26f1e7338a/power_manager/powerd/daemon.h [modify] https://crrev.com/15e2d0b8f139d2a8fc51d528425eae26f1e7338a/power_manager/dbus_bindings/org.chromium.PowerManager.xml [modify] https://crrev.com/15e2d0b8f139d2a8fc51d528425eae26f1e7338a/power_manager/powerd/policy/state_controller.cc
,
Jan 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/system_api/+/9f0f93fcd84696cb278ef79538bb346345cab648 commit 9f0f93fcd84696cb278ef79538bb346345cab648 Author: Daniel Erat <derat@chromium.org> Date: Fri Jan 12 11:27:12 2018 system_api: Add powerd inactivity delays signal and method. Add a constant for a new InactivityDelaysChanged D-Bus signal containing a serialized PowerManagementPolicy::Delays protocol buffer that powerd will emit when its delays change. Also add a GetInactivityDelays method that can be called to get the current delays (again, as a Delays protobuf). BUG= chromium:801177 TEST=emerged system-api Change-Id: I5f39d47f42b504c5c18238182a093f0abf072d98 Reviewed-on: https://chromium-review.googlesource.com/862985 Commit-Ready: Dan Erat <derat@chromium.org> Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Eric Caruso <ejcaruso@chromium.org> [modify] https://crrev.com/9f0f93fcd84696cb278ef79538bb346345cab648/dbus/power_manager/dbus-constants.h
,
Jan 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5b3be9c08b5a6af4990f52c01b64f8b9c8febfd8 commit 5b3be9c08b5a6af4990f52c01b64f8b9c8febfd8 Author: Daniel Erat <derat@chromium.org> Date: Wed Jan 17 03:15:36 2018 Roll src/third_party/cros_system_api/ 9efc03a3d..15e1a4681 (4 commits) https://chromium.googlesource.com/chromiumos/platform/system_api.git/+log/9efc03a3dca4..15e1a468124f $ git log 9efc03a3d..15e1a4681 --date=short --no-merges --format='%ad %ae %s' 2018-01-02 maybelle shill: Add EAP.UseLoginPassword constant. 2018-01-02 khmel arc: Extend StartArcInstanceRequest for skip_packages_cache_setup 2018-01-11 derat system_api: Add powerd inactivity delays signal and method. 2018-01-08 ejcaruso shill: add Cellular.EquipmentID property Created with: roll-dep src/third_party/cros_system_api Bug: 801177 Change-Id: I508a8b6fd19c7a38464ebba98a9b93bcecf866d0 Reviewed-on: https://chromium-review.googlesource.com/867093 Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Commit-Queue: Dan Erat <derat@chromium.org> Cr-Commit-Position: refs/heads/master@{#529564} [modify] https://crrev.com/5b3be9c08b5a6af4990f52c01b64f8b9c8febfd8/DEPS
,
Jan 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/62b3c19c350daa306b32d77235d77ac3bab4889d commit 62b3c19c350daa306b32d77235d77ac3bab4889d Author: Daniel Erat <derat@chromium.org> Date: Wed Jan 17 06:17:41 2018 chromeos: Handle inactivity delays in PowerManagerClient. Update chromeos::PowerManagerClient to listen for InactivityDelaysChanged D-Bus signals from powerd and support calling powerd's GetInactivityDelays method. Bug: 801177 Change-Id: Ib9ea85ef33c9483185040a749864dc7b88c76933 Reviewed-on: https://chromium-review.googlesource.com/867390 Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Commit-Queue: Dan Erat <derat@chromium.org> Cr-Commit-Position: refs/heads/master@{#529651} [modify] https://crrev.com/62b3c19c350daa306b32d77235d77ac3bab4889d/chromeos/dbus/fake_power_manager_client.cc [modify] https://crrev.com/62b3c19c350daa306b32d77235d77ac3bab4889d/chromeos/dbus/fake_power_manager_client.h [modify] https://crrev.com/62b3c19c350daa306b32d77235d77ac3bab4889d/chromeos/dbus/power_manager_client.cc [modify] https://crrev.com/62b3c19c350daa306b32d77235d77ac3bab4889d/chromeos/dbus/power_manager_client.h
,
Jan 17 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by derat@chromium.org
, Jan 12 2018