summaryrefslogtreecommitdiff
path: root/core/java/android/os/PowerManager.java
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-23 14:23:16 +0000
committerSemavi Ulusoy <doc.divxm@gmail.com>2022-11-07 08:54:28 +0300
commitb89070cc60571d1ded0f05ff2be4e6601fea2144 (patch)
treef6887a8474ff73eb6311947d9a341243473831ef /core/java/android/os/PowerManager.java
parent856980d947e95b6d1120ab8350b525a2cbd10263 (diff)
fw/b: Button backlight brightness
Squash of: Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org> Date: Fri Nov 23 14:23:16 2012 +0000 Reintroduce button-backlight (and respective inactivity timeout) The power manager rewrite from Change I1d7a52e98f0449f76d70bf421f6a7f245957d1d7 completely removed support for control of the button backlights, which makes all capacitive buttons out there stay dark. The commit message in that change mentions it hasn't been implemented _yet_, so this fix should be temporary until upstream does their own implementation Change-Id: I6094c446e0b8c23f57d30652a3cbd35dee5e821a Author: Danny Baumann <dannybaumann@web.de> Date: Thu Aug 22 08:53:24 2013 +0200 Add PowerManager integration for button and keyboard backlight. Allows setting button and keyboard backlight brightness as well as button timeout. Change-Id: I550cccafc0a8f90d6347de9261adb26b75955cc4 Author: Steve Kondik <steve@cyngn.com> Date: Sat Jan 3 05:13:26 2015 -0800 power: Disable keyboard/button lights while dozing/dreaming * With hardkeys and doze mode enabled, entering suspend results in an epic battle over the lights. It's a bad situation. Disable them when we're sleepy. Change-Id: I7f1fc35a1573717d1ea101a07c4171d6f66d1553 Author: nadlabak <pavel@doshaska.net> Date: Sun Jun 7 02:01:05 2015 +0200 PowerManagerService: Fix updating of mUserActivitySummary I7f1fc35a1573717d1ea101a07c4171d6f66d1553 missed the fact that the primary purpose of the affected condition block was to update mUserActivitySummary and the button/keyboard light handling was just appended to it later. This fixes the waking from dream/screensaver by user activity. I30c5c8c9c09e3d57ace18cac72b783510b9b3bf3 is removed here as well as it was just a band aid. jira: NIGHTLIES-1285 Change-Id: I6b2f6c58e73110787d62e86d4d2ef538638cf491 Author: Bruno Martins <bgcngm@gmail.com> Date: Tue Dec 26 17:15:05 2017 +0000 Forward-port button brightness implementation to O * Reworked for the new handler interface, restoring also removed methods (partial revert of commit 86c39f9edee88baa912c694061010483c7da9daf). * Keyboard backlight brightness support left out for now. Change-Id: I53f031fa2da394e95a2b29a01eb3c6a8f8132507 Change-Id: I5176a2028c18408c17bac7f25e62b5612fd6c227
Diffstat (limited to 'core/java/android/os/PowerManager.java')
-rw-r--r--core/java/android/os/PowerManager.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index ea81afa1cf22..55d071ce8020 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -500,7 +500,8 @@ public final class PowerManager {
BRIGHTNESS_CONSTRAINT_TYPE_DOZE,
BRIGHTNESS_CONSTRAINT_TYPE_MINIMUM_VR,
BRIGHTNESS_CONSTRAINT_TYPE_MAXIMUM_VR,
- BRIGHTNESS_CONSTRAINT_TYPE_DEFAULT_VR
+ BRIGHTNESS_CONSTRAINT_TYPE_DEFAULT_VR,
+ BRIGHTNESS_CONSTRAINT_TYPE_DEFAULT_BUTTON
})
@Retention(RetentionPolicy.SOURCE)
public @interface BrightnessConstraint{}
@@ -553,6 +554,12 @@ public final class PowerManager {
public static final int BRIGHTNESS_CONSTRAINT_TYPE_DEFAULT_VR = 7;
/**
+ * Brightness constraint type: minimum allowed value.
+ * @hide
+ */
+ public static final int BRIGHTNESS_CONSTRAINT_TYPE_DEFAULT_BUTTON = 8;
+
+ /**
* @hide
*/
@IntDef(prefix = { "WAKE_REASON_" }, value = {