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

Commit b148021c authored by Sven Dawitz's avatar Sven Dawitz
Browse files

Fix: CmBatteryMiniIcon slower animation after fixing issue 3144

The animation was way too fast, after we switched from full 10%->100%
animation to battery-level -> 100% animation. This looked especially
anoying at high battery levels. 750ms for the duration seems to be a
good value. It takes a while when battery is totally empty now, but at
least you dont get seizures if its at high values.

Change-Id: I3d971633cc75e5d59d7718369717e2f7ff3dfc42
parent 4103f8e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -49,10 +49,10 @@ public class CmBatteryMiniIcon extends ImageView {
    static final int BATTERY_MINI_ICON_MARGIN_RIGHT_DIP = 6;

    // duration of each frame in charging animation in millis
    static final int ANIM_FRAME_DURATION = (1000 / 3);
    static final int ANIM_FRAME_DURATION = 750;

    // duration of each fake-timer call to update animation in millis
    static final int ANIM_TIMER_DURATION = (1000 / 6);
    static final int ANIM_TIMER_DURATION = 333;

    // contains the current bat level, values: 0-100
    private int mBatteryLevel = 0;