Merge "Fixed ProgressBar logic for AnimationDrawables"
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index e033d2d..df88fec 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -937,7 +937,8 @@
         int left = 0;
 
         if (mIndeterminateDrawable != null) {
-            if (mOnlyIndeterminate) {
+            // Aspect ratio logic does not apply to AnimationDrawables
+            if (mOnlyIndeterminate && !(mIndeterminateDrawable instanceof AnimationDrawable)) {
                 // Maintain aspect ratio. Certain kinds of animated drawables
                 // get very confused otherwise.
                 final int intrinsicWidth = mIndeterminateDrawable.getIntrinsicWidth();