private static void notifyTaskCacheIdleListeners(boolean idle) {
    List<LottieTaskIdleListener> listeners = new ArrayList<>(taskIdleListeners);
    for (int i = 0; i < listeners.size(); i++) {
      listeners.get(i).onIdleChanged(idle);
    }
  }
First, check to see if there are any in-progress tasks associated with the cache key and return it if there is.
If not, create a new task for the callable.
Then, add the new task to the task cache and set up listeners so it gets cleared when done.
lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java