New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 850807 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature

Blocked on:
issue 828151



Sign in to add a comment

Add GetKeyboardBrightnessPercent D-Bus method to powerd

Project Member Reported by derat@chromium.org, Jun 8 2018

Issue description

powerd doesn't currently export a GetKeyboardBrightnessPercent D-Bus method. It'd be straightforward to add this, and it'd be useful for proposed work to improve chrome://power. I'm refactoring this code in powerd but will add it in a followup change.
 

Comment 1 by derat@chromium.org, Jun 23 2018

Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/99669d7f1774875c2446e445681dc69754c5a847

commit 99669d7f1774875c2446e445681dc69754c5a847
Author: Daniel Erat <derat@chromium.org>
Date: Thu Jun 28 05:07:03 2018

system_api: Add GetKeyboardBrightnessPercent constant.

Add a constant for a new GetKeyboardBrightnessPercent method
that will be exported by powerd.

BUG= chromium:850807 
TEST=built it

Change-Id: I4ad360e01c9d433b75e7c28260f8a139ec47933c
Reviewed-on: https://chromium-review.googlesource.com/1112820
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Abhishek Bhardwaj <abhishekbh@chromium.org>

[modify] https://crrev.com/99669d7f1774875c2446e445681dc69754c5a847/dbus/power_manager/dbus-constants.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/c250b195399fe1a29ff37592c30400438932160b

commit c250b195399fe1a29ff37592c30400438932160b
Author: Daniel Erat <derat@chromium.org>
Date: Thu Jun 28 05:07:04 2018

power: Export GetKeyboardBrightnessPercent D-Bus method.

Make powerd export a GetKeyboardBrightnessPercent D-Bus
method that returns a single double arg containing the
keyboard backlight brightness as a percentage in [0.0,
100.0]. This is similar to the existing
GetScreenBrightnessPercent method.

BUG= chromium:850807 
TEST=added unit tests; also manually verified by running:
     dbus-send --type=method_call --system --print-reply \
       --dest=org.chromium.PowerManager \
       /org/chromium/PowerManager \
       org.chromium.PowerManager.GetKeyboardBrightnessPercent
CQ-DEPEND=I4ad360e01c9d433b75e7c28260f8a139ec47933c

Change-Id: I9ef38d1aacf634a4c81b01be5d65745527728176
Reviewed-on: https://chromium-review.googlesource.com/1112854
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Abhishek Bhardwaj <abhishekbh@chromium.org>

[modify] https://crrev.com/c250b195399fe1a29ff37592c30400438932160b/power_manager/powerd/policy/keyboard_backlight_controller_unittest.cc
[modify] https://crrev.com/c250b195399fe1a29ff37592c30400438932160b/power_manager/powerd/policy/keyboard_backlight_controller.cc
[modify] https://crrev.com/c250b195399fe1a29ff37592c30400438932160b/power_manager/powerd/policy/keyboard_backlight_controller.h

Comment 4 by derat@chromium.org, Jun 28 2018

Cc: derat@chromium.org
Owner: abhishekbh@chromium.org
Nikhil is looking into updating Chrome's PowerManagerClient class to support calling this method. I'm unable to assign ownership, though (see http://g/chromeos-chatty-eng/0lv6jt5_sW0 for the fix, I think).

Comment 5 by derat@chromium.org, Jun 29 2018

Owner: nathreya@google.com
Status: Fixed (was: Started)
https://bugs.chromium.org/p/chromium/issues/detail?id=850807 fixes this.

Sign in to add a comment