Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4e96d5a authored by Craig Mautner's avatar Craig Mautner
Browse files

Disable automatic screen dimming.

Done by setting the dimming period to Integer.MAX_VALUE. While it
doesn't technically disable dimming it will take 248 days to get to
any target value.

Fixes bug 6616423.

Change-Id: I5b753286b9d93664fbff79021be38adf4d8a007d
parent b215726a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -178,8 +178,9 @@ public class PowerManagerService extends IPowerManager.Stub
    static final int ANIM_STEPS = 60; // nominal # of frames at 60Hz
    // Slower animation for autobrightness changes
    static final int AUTOBRIGHTNESS_ANIM_STEPS = 2 * ANIM_STEPS;
    // Even slower animation for autodimness changes
    static final int AUTODIMNESS_ANIM_STEPS = 15 * ANIM_STEPS;
    // Even slower animation for autodimness changes. Set to max to effectively disable dimming.
    // Note 100 is used to keep the mWindowScaleAnimation scaling below from overflowing an int.
    static final int AUTODIMNESS_ANIM_STEPS = Integer.MAX_VALUE / (NOMINAL_FRAME_TIME_MS * 100);
    // Number of steps when performing a more immediate brightness change.
    static final int IMMEDIATE_ANIM_STEPS = 4;