Add the ability to autoStart AID from xml

Bug: 73529437
Test: Ic818bbf1091d12631aedd6475d225fa4a708b29c
Change-Id: I4807409895a057e775bfee5dea407e8dc1af94be
This commit is contained in:
Leon Scroggins III
2018-03-21 14:42:09 -04:00
parent 1d2bf2b846
commit 1dd88daf92
2 changed files with 9 additions and 0 deletions

View File

@@ -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();
}
}
/**