@Override public void invalidateDrawable(@NonNull Drawable dr) {
    if (getDrawable() == lottieDrawable) {
      // We always want to invalidate the root drawable so it redraws the whole drawable.
      // Eventually it would be great to be able to invalidate just the changed region.
      super.invalidateDrawable(lottieDrawable);
    } else {
      // Otherwise work as regular ImageView
      super.invalidateDrawable(dr);
    }
  }
Keeps track of explicit user actions taken and prevents onRestoreInstanceState from overwriting already set values.
lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java