Skip to content

Commit a9144ff

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Disable automatic screen dimming." into jb-dev
2 parents 4ca17df + a4e96d5 commit a9144ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

services/java/com/android/server/PowerManagerService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ public class PowerManagerService extends IPowerManager.Stub
178178
static final int ANIM_STEPS = 60; // nominal # of frames at 60Hz
179179
// Slower animation for autobrightness changes
180180
static final int AUTOBRIGHTNESS_ANIM_STEPS = 2 * ANIM_STEPS;
181-
// Even slower animation for autodimness changes
182-
static final int AUTODIMNESS_ANIM_STEPS = 15 * ANIM_STEPS;
181+
// Even slower animation for autodimness changes. Set to max to effectively disable dimming.
182+
// Note 100 is used to keep the mWindowScaleAnimation scaling below from overflowing an int.
183+
static final int AUTODIMNESS_ANIM_STEPS = Integer.MAX_VALUE / (NOMINAL_FRAME_TIME_MS * 100);
183184
// Number of steps when performing a more immediate brightness change.
184185
static final int IMMEDIATE_ANIM_STEPS = 4;
185186

0 commit comments

Comments
 (0)