public void setMinAndMaxFrames(float minFrame, float maxFrame) {
    if (minFrame > maxFrame) {
      throw new IllegalArgumentException(String.format("minFrame (%s) must be <= maxFrame (%s)", minFrame, maxFrame));
    }
    float compositionMinFrame = composition == null ? -Float.MAX_VALUE : composition.getStartFrame();
    float compositionMaxFrame = composition == null ? Float.MAX_VALUE : composition.getEndFrame();
    float newMinFrame = MiscUtils.clamp(minFrame, compositionMinFrame, compositionMaxFrame);
    float newMaxFrame = MiscUtils.clamp(maxFrame, compositionMinFrame, compositionMaxFrame);
    if (newMinFrame != this.minFrame || newMaxFrame != this.maxFrame) {
      this.minFrame = newMinFrame;
      this.maxFrame = newMaxFrame;
      setFrame((int) MiscUtils.clamp(frame, newMinFrame, newMaxFrame));
    }
  }
Returns the current value of the currently playing animation taking into
account direction, min and max frames.
lottie/src/main/java/com/airbnb/lottie/utils/LottieValueAnimator.java