docs: private FrameNeededResult isFrameNeededForRendering(int index) {
      AnimatedDrawableFrameInfo frameInfo = mAnimatedDrawableBackend.getFrameInfo(index);
      DisposalMethod disposalMethod = frameInfo.disposalMethod;
      if (disposalMethod == DisposalMethod.DISPOSE_DO_NOT) {
        // Need this frame so keep going.
        return FrameNeededResult.REQUIRED;
      } else if (disposalMethod == DisposalMethod.DISPOSE_TO_BACKGROUND) {
        if (isFullFrame(frameInfo)) {
          // The frame covered the whole image and we're disposing to background,
          // so we don't even need to draw this frame.
          return FrameNeededResult.NOT_REQUIRED;
        } else {
          // We need to draw the image. Then erase the part the previous frame covered.
          // So keep going.
          return FrameNeededResult.REQUIRED;
        }
      } else if (disposalMethod == DisposalMethod.DISPOSE_TO_PREVIOUS) {
        return FrameNeededResult.SKIP;
      } else {
        return FrameNeededResult.ABORT;
      }
    }