content: package androidx.transition;
  
  import android.animation.Animator;
  import android.animation.AnimatorListenerAdapter;
  import android.os.Build;
  import java.util.ArrayList;
  
  class AnimatorUtils {
  
      interface AnimatorPauseListenerCompat {
          void onAnimationPause(Animator animator);
  
          void onAnimationResume(Animator animator);
      }
  
      private AnimatorUtils() {
      }
  
      static void addPauseListener(Animator animator, AnimatorListenerAdapter listener) {
          if (Build.VERSION.SDK_INT >= 19) {
              animator.addPauseListener(listener);
          }
      }
  
      static void pause(Animator animator) {
          if (Build.VERSION.SDK_INT >= 19) {
              animator.pause();
              return;
          }
          ArrayList<Animator.AnimatorListener> listeners = animator.getListeners();
          if (listeners != null) {
              int size = listeners.size();
              for (int i = 0; i < size; i++) {
                  Animator.AnimatorListener animatorListener = listeners.get(i);
                  if (animatorListener instanceof AnimatorPauseListenerCompat) {
                      ((AnimatorPauseListenerCompat) animatorListener).onAnimationPause(animator);
                  }
              }
          }
      }
  
      static void resume(Animator animator) {
          if (Build.VERSION.SDK_INT >= 19) {
              animator.resume();
              return;
          }
          ArrayList<Animator.AnimatorListener> listeners = animator.getListeners();
          if (listeners != null) {
              int size = listeners.size();
              for (int i = 0; i < size; i++) {
                  Animator.AnimatorListener animatorListener = listeners.get(i);
                  if (animatorListener instanceof AnimatorPauseListenerCompat) {
                      ((AnimatorPauseListenerCompat) animatorListener).onAnimationResume(animator);
                  }
              }
          }
      }
  }
  