Cleanup + comment getValue()
diff --git a/issue-repro/src/main/res/layout/issue_repro_activity.xml b/issue-repro/src/main/res/layout/issue_repro_activity.xml
index 4070d13..05ea4fb 100755
--- a/issue-repro/src/main/res/layout/issue_repro_activity.xml
+++ b/issue-repro/src/main/res/layout/issue_repro_activity.xml
@@ -11,6 +11,5 @@
android:layout_gravity="center"
app:lottie_rawRes="@raw/heart"
app:lottie_autoPlay="true"
- app:lottie_loop="true"
- app:lottie_asyncUpdates="automatic"/>
+ app:lottie_loop="true"/>
</FrameLayout>
\ No newline at end of file
diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java b/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
index 5179d5d..c9756bb 100644
--- a/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
+++ b/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
@@ -17,6 +17,7 @@
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.os.Build;
+import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
@@ -614,6 +615,7 @@
return;
}
boolean asyncUpdatesEnabled = getAsyncUpdatesEnabled();
+ Log.d("Gabe", "draw asyncUpdatesEnabled " + asyncUpdatesEnabled);
try {
if (asyncUpdatesEnabled) {
setProgressDrawLock.acquire();
@@ -670,10 +672,9 @@
try {
if (asyncUpdatesEnabled) {
setProgressDrawLock.acquire();
- }
-
- if (asyncUpdatesEnabled && shouldSetProgressBeforeDrawing()) {
- setProgress(animator.getAnimatedValueAbsolute());
+ if (shouldSetProgressBeforeDrawing()) {
+ setProgress(animator.getAnimatedValueAbsolute());
+ }
}
if (useSoftwareRendering) {
diff --git a/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation.java b/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation.java
index cba17d7..826bbb5 100644
--- a/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation.java
+++ b/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation.java
@@ -64,7 +64,8 @@
this.progress = progress;
if (keyframesWrapper.isValueChanged(progress)) {
// Cache the current value.
- getValue();
+ // Commented out to see if this is causing a variation in snapshot tests.
+ // getValue();
notifyListeners();
}
L.endSection("BaseKeyframeAnimation#setProgress");