AID: Change loop to repeat and set from xml

Bug: 73529437
Test: I60fbee6d3610070413e8c46f363ec3c19c2e7c52

Allow setting AnimatedImageDrawable's loop count in xml. Use
"repeatCount" to match the existing attr used by other objects, and
change the Java api from "loop" to "repeat".

Cache the repeat count in the State object for the situation where we
inflate but are waiting on a theme, so that when we get a src we can
apply the existing repeat count.

Change-Id: Ie723fe9a40c64dd0e1e8fd7b5d5cf81e5c5ccd0d
diff --git a/api/removed.txt b/api/removed.txt
index 79c54fd..b8e2b98 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -173,6 +173,16 @@
 
 }
 
+package android.graphics.drawable {
+
+  public class AnimatedImageDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Animatable2 {
+    method public deprecated int getLoopCount(int);
+    method public deprecated void setLoopCount(int);
+    field public static final deprecated int LOOP_INFINITE = -1; // 0xffffffff
+  }
+
+}
+
 package android.hardware {
 
   public final class HardwareBuffer implements java.lang.AutoCloseable android.os.Parcelable {