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

Commit f0cb46cd authored by mochangming's avatar mochangming
Browse files

Animate backlight quickly when display state request to change or power mode changed



  * mAppliedDimming should be false when power request policy is not dim.
  * mAppliedLowPower should be false when low power mode is disabled.
  * Backlight brightness changes quickly.

Change-Id: I44bf9c216554f8dce5abd0520f198824df5e8dcf
Signed-off-by: default avatarmochangming <mochangming@xiaomi.com>
parent 60d142c5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -673,6 +673,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                slowChange = false;
            }
            mAppliedDimming = true;
        } else if (mAppliedDimming) {
            slowChange = false;
            mAppliedDimming = false;
        }

        // If low power mode is enabled, cut the brightness level by half
@@ -685,6 +688,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                slowChange = false;
            }
            mAppliedLowPower = true;
        } else if (mAppliedLowPower) {
            slowChange = false;
            mAppliedLowPower = false;
        }

        // Animate the screen brightness when the screen is on or dozing.