diff options
author | Daniel Erat <derat@chromium.org> | 2018-09-21 01:36:42 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-09-21 01:36:42 -0700 |
commit | 38ad4e5bf04fdb49519bf6ae6bc94be9a4993d43 (patch) | |
tree | 66c5a847965560091a1fc7cb9d47dbe03b48e975 | |
parent | c5b7be4a2b048ac676374b7734feb7c212fcf8af (diff) | |
parent | dc44d954be26a0d7ea2602b6bd66c7278af85a79 (diff) | |
download | system_api-38ad4e5bf04fdb49519bf6ae6bc94be9a4993d43.tar.gz |
system_api: Add SetBacklightBrightnessRequest powerd proto. am: 9aded9e58d am: 1ab16e3964 am: 4ddc854ba3
am: dc44d954be
Change-Id: Icf1825c5de23eddbb189bcc47aed41152a1be135
-rw-r--r-- | dbus/power_manager/backlight.proto | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/dbus/power_manager/backlight.proto b/dbus/power_manager/backlight.proto index 6a54a39..03bde65 100644 --- a/dbus/power_manager/backlight.proto +++ b/dbus/power_manager/backlight.proto @@ -8,13 +8,42 @@ option optimize_for = LITE_RUNTIME; package power_manager; +// See +// https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/docs/screen_brightness.md +// for information about the mapping between brightness percents and backlight +// hardware levels. + +// Request to change the backlight brightness sent from Chrome to powerd in a +// SetScreenBrightnessPercent D-Bus method call. +message SetBacklightBrightnessRequest { + // Desired backlight brightness as a percent in the range [0.0, 100.0]. + optional double percent = 1; + + // The speed at which the brightness should go to the requested percent. + enum Transition { + // The brightness should animate to the new percent. + GRADUAL = 0; + // The brightness should instantaneously go to the new percent. + INSTANT = 1; + } + optional Transition transition = 2; + + // The reason the request was sent. + enum Cause { + // Explicit user request (typically using the onscreen brightness slider). + USER_REQUEST = 0; + // Automated request based on a prediction of the desired brightness. + MODEL = 1; + } + optional Cause cause = 3; + + // Next value to use: 4 +} + // Announcement of a backlight brightness change emitted by powerd via a // ScreenBrightnessChanged or KeyboardBrightnessChanged D-Bus signal. message BacklightBrightnessChange { - // Backlight brightness as a percent in the range [0.0, 100.0]. See - // https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/docs/screen_brightness.md - // for more information about the mapping between percents and hardware - // levels. + // Current backlight brightness as a percent in the range [0.0, 100.0]. optional double percent = 1; // The reason the brightness was changed. @@ -24,9 +53,9 @@ message BacklightBrightnessChange { // Automated change in response to user activity (input event, video // activity, etc.). USER_ACTIVITY = 1; - // Automated change triggered by idle timeout due to user inactivity. + // Automated powerd change triggered by idle timeout due to user inactivity. USER_INACTIVITY = 2; - // Automated change caused by a change to the ambient light level. + // Automated powerd change due by a change to the ambient light level. AMBIENT_LIGHT_CHANGED = 3; // An external power source was connected. EXTERNAL_POWER_CONNECTED = 4; @@ -39,7 +68,9 @@ message BacklightBrightnessChange { NO_LONGER_FORCED_OFF = 7; // Unspecified automated change (suspend/resume, shutdown, etc.). OTHER = 8; - // Next value to use: 9 + // Automated request based on a prediction of the desired brightness. + MODEL = 9; + // Next value to use: 10 } optional Cause cause = 2; |