public synchronized LottieTask<T> addListener(LottieListener<T> listener) {
    LottieResult<T> result = this.result;
    if (result != null && result.getValue() != null) {
      listener.onResult(result.getValue());
    }

    successListeners.add(listener);
    return this;
  }
Add a task listener. If the task has completed, the listener will be called synchronously.

@return the task for call chaining.
lottie/src/main/java/com/airbnb/lottie/LottieTask.java