content: package androidx.constraintlayout.motion.utils;
  
  import android.os.Build;
  import android.util.Log;
  import android.view.View;
  import androidx.constraintlayout.core.motion.utils.KeyCycleOscillator;
  import androidx.constraintlayout.motion.widget.Key;
  import androidx.constraintlayout.motion.widget.MotionLayout;
  import androidx.constraintlayout.widget.ConstraintAttribute;
  import java.lang.reflect.InvocationTargetException;
  import java.lang.reflect.Method;
  
  public abstract class ViewOscillator extends KeyCycleOscillator {
      private static final String TAG = "ViewOscillator";
  
      static class AlphaSet extends ViewOscillator {
          AlphaSet() {
          }
  
          public void setProperty(View view, float t) {
              view.setAlpha(get(t));
          }
      }
  
      static class CustomSet extends ViewOscillator {
          protected ConstraintAttribute mCustom;
          float[] value = new float[1];
  
          CustomSet() {
          }
  
          /* access modifiers changed from: protected */
          public void setCustom(Object custom) {
              this.mCustom = (ConstraintAttribute) custom;
          }
  
          public void setProperty(View view, float t) {
              this.value[0] = get(t);
              CustomSupport.setInterpolatedValue(this.mCustom, view, this.value);
          }
      }
  
      static class ElevationSet extends ViewOscillator {
          ElevationSet() {
          }
  
          public void setProperty(View view, float t) {
              if (Build.VERSION.SDK_INT >= 21) {
                  view.setElevation(get(t));
              }
          }
      }
  
      public static class PathRotateSet extends ViewOscillator {
          public void setPathRotate(View view, float t, double dx, double dy) {
              view.setRotation(get(t) + ((float) Math.toDegrees(Math.atan2(dy, dx))));
          }
  
          public void setProperty(View view, float t) {
          }
      }
  
      static class ProgressSet extends ViewOscillator {
          boolean mNoMethod = false;
  
          ProgressSet() {
          }
  
          public void setProperty(View view, float t) {
              if (view instanceof MotionLayout) {
                  ((MotionLayout) view).setProgress(get(t));
              } else if (!this.mNoMethod) {
                  Method method = null;
                  try {
                      method = view.getClass().getMethod("setProgress", new Class[]{Float.TYPE});
                  } catch (NoSuchMethodException e) {
                      this.mNoMethod = true;
                  }
                  if (method != null) {
                      try {
                          method.invoke(view, new Object[]{Float.valueOf(get(t))});
                      } catch (IllegalAccessException e2) {
                          Log.e(ViewOscillator.TAG, "unable to setProgress", e2);
                      } catch (InvocationTargetException e3) {
                          Log.e(ViewOscillator.TAG, "unable to setProgress", e3);
                      }
                  }
              }
          }
      }
  
      static class RotationSet extends ViewOscillator {
          RotationSet() {
          }
  
          public void setProperty(View view, float t) {
              view.setRotation(get(t));
          }
      }
  
      static class RotationXset extends ViewOscillator {
          RotationXset() {
          }
  
          public void setProperty(View view, float t) {
              view.setRotationX(get(t));
          }
      }
  
      static class RotationYset extends ViewOscillator {
          RotationYset() {
          }
  
          public void setProperty(View view, float t) {
              view.setRotationY(get(t));
          }
      }
  
      static class ScaleXset extends ViewOscillator {
          ScaleXset() {
          }
  
          public void setProperty(View view, float t) {
              view.setScaleX(get(t));
          }
      }
  
      static class ScaleYset extends ViewOscillator {
          ScaleYset() {
          }
  
          public void setProperty(View view, float t) {
              view.setScaleY(get(t));
          }
      }
  
      static class TranslationXset extends ViewOscillator {
          TranslationXset() {
          }
  
          public void setProperty(View view, float t) {
              view.setTranslationX(get(t));
          }
      }
  
      static class TranslationYset extends ViewOscillator {
          TranslationYset() {
          }
  
          public void setProperty(View view, float t) {
              view.setTranslationY(get(t));
          }
      }
  
      static class TranslationZset extends ViewOscillator {
          TranslationZset() {
          }
  
          public void setProperty(View view, float t) {
              if (Build.VERSION.SDK_INT >= 21) {
                  view.setTranslationZ(get(t));
              }
          }
      }
  
      public static ViewOscillator makeSpline(String str) {
          if (str.startsWith("CUSTOM")) {
              return new CustomSet();
          }
          char c = 65535;
          switch (str.hashCode()) {
              case -1249320806:
                  if (str.equals("rotationX")) {
                      c = 3;
                      break;
                  }
                  break;
              case -1249320805:
                  if (str.equals("rotationY")) {
                      c = 4;
                      break;
                  }
                  break;
              case -1225497657:
                  if (str.equals("translationX")) {
                      c = 10;
                      break;
                  }
                  break;
              case -1225497656:
                  if (str.equals("translationY")) {
                      c = 11;
                      break;
                  }
                  break;
              case -1225497655:
                  if (str.equals("translationZ")) {
                      c = 12;
                      break;
                  }
                  break;
              case -1001078227:
                  if (str.equals("progress")) {
                      c = 13;
                      break;
                  }
                  break;
              case -908189618:
                  if (str.equals("scaleX")) {
                      c = 6;
                      break;
                  }
                  break;
              case -908189617:
                  if (str.equals("scaleY")) {
                      c = 7;
                      break;
                  }
                  break;
              case -797520672:
                  if (str.equals(Key.WAVE_VARIES_BY)) {
                      c = 9;
                      break;
                  }
                  break;
              case -40300674:
                  if (str.equals(Key.ROTATION)) {
                      c = 2;
                      break;
                  }
                  break;
              case -4379043:
                  if (str.equals("elevation")) {
                      c = 1;
                      break;
                  }
                  break;
              case 37232917:
                  if (str.equals("transitionPathRotate")) {
                      c = 5;
                      break;
                  }
                  break;
              case 92909918:
                  if (str.equals("alpha")) {
                      c = 0;
                      break;
                  }
                  break;
              case 156108012:
                  if (str.equals("waveOffset")) {
                      c = 8;
                      break;
                  }
                  break;
          }
          switch (c) {
              case 0:
                  return new AlphaSet();
              case 1:
                  return new ElevationSet();
              case 2:
                  return new RotationSet();
              case 3:
                  return new RotationXset();
              case 4:
                  return new RotationYset();
              case 5:
                  return new PathRotateSet();
              case 6:
                  return new ScaleXset();
              case 7:
                  return new ScaleYset();
              case 8:
                  return new AlphaSet();
              case 9:
                  return new AlphaSet();
              case 10:
                  return new TranslationXset();
              case 11:
                  return new TranslationYset();
              case 12:
                  return new TranslationZset();
              case 13:
                  return new ProgressSet();
              default:
                  return null;
          }
      }
  
      public abstract void setProperty(View view, float f);
  }
  