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

Commit 1dd88daf authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Add the ability to autoStart AID from xml

Bug: 73529437
Test: Ic818bbf1091d12631aedd6475d225fa4a708b29c
Change-Id: I4807409895a057e775bfee5dea407e8dc1af94be
parent 1d2bf2b8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5965,6 +5965,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();
        }
    }

    /**