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

Commit 28d914ab authored by Leon Scroggins III's avatar Leon Scroggins III Committed by android-build-merger
Browse files

Add the ability to autoStart AID from xml am: 1dd88daf

am: 776e4c1e

Change-Id: I2998ff48957a8643f965da6ba308bcfd4bd8fcdc
parents 1564d307 776e4c1e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5968,6 +5968,9 @@
             in the encoded data. Setting this to infinite (-1) will result in the
             animation repeating as long as it is displayed (once start() is called). -->
        <attr name="repeatCount"/>
        <!-- When true, automatically start animating. The default is false, meaning
             that the animation will not start until start() is called. -->
        <attr name="autoStart" />
    </declare-styleable>

    <!-- Drawable used to draw bitmaps. -->
+6 −0
Original line number Diff line number Diff line
@@ -261,6 +261,12 @@ public class AnimatedImageDrawable extends Drawable implements Animatable2 {
        if (repeatCount != REPEAT_UNDEFINED) {
            this.setRepeatCount(repeatCount);
        }

        boolean autoStart = a.getBoolean(
                R.styleable.AnimatedImageDrawable_autoStart, false);
        if (autoStart && mState.mNativePtr != 0) {
            this.start();
        }
    }

    /**