summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2014-11-12 18:45:31 -0800
committerJeff Brown <jeffbrown@google.com>2014-11-12 18:49:36 -0800
commit7b5be5e2a738859d36e1977cdc756cf83361d72f (patch)
tree72f07ec034db4449a08e5342c4b4932dfaabca0a /policy
parentc6bd0155a76842e39ea0bb75eca33e6e3804437c (diff)
downloadframeworks_base-7b5be5e2a738859d36e1977cdc756cf83361d72f.zip
frameworks_base-7b5be5e2a738859d36e1977cdc756cf83361d72f.tar.gz
frameworks_base-7b5be5e2a738859d36e1977cdc756cf83361d72f.tar.bz2
Improve screen brightness boost behavior.
Wake-up when entering brightness boost mode, don't boost in ambient mode since some display device drivers do strange things in that mode and boost doesn't work. Waking up feels more natural as well. Don't flutter the power HAL's interactive mode bit simply due to changes in display ready state since that may result in visible artifacts such as display flashes. Don't stop the auto-brightness sensor while temporarily boosted. Don't prevent the display from entering the ready state while in brightness boost since that would unnecessarily delay the transition from DOZING to AWAKE until boost is finished. Restart the user activity timeout when brightness boost ends and prevent the display from dimming while boosted. The pixel fairies basked in the sunlight. Bug: 18262044 Bug: 18261782 Change-Id: I8c42a1e6091b0fe1253e90265ac248087ebc24e1
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index ddefb1f..627d1d5 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -995,6 +995,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
break;
case MULTI_PRESS_POWER_BRIGHTNESS_BOOST:
+ Slog.i(TAG, "Starting brightness boost.");
+ if (!interactive) {
+ wakeUpFromPowerKey(eventTime);
+ }
mPowerManager.boostScreenBrightness(eventTime);
break;
}