Update hardware layer when setComposition is set
When the `LottieDrawable` composition is set, it may autoplay the
animation so we need to update the layer type.
Fixes
@@ -368,6 +368,7 @@ public class LottieAnimationView extends AppCompatImageView {
lottieDrawable.setCallback(this);
boolean isNewComposition = lottieDrawable.setComposition(composition);
+ enableOrDisableHardwareLayer();
if (!isNewComposition) {
// We can avoid re-setting the drawable, and invalidating the view, since the composition
// hasn't changed.
