package androidx.transition; import android.util.Log; import android.view.View; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; /* loaded from: classes.dex */ class ViewUtilsApi19 extends ViewUtilsBase { private static Method a; private static boolean b; private static Method c; private static boolean d; ViewUtilsApi19() { } @Override // androidx.transition.ViewUtilsBase public void a(View view) { } @Override // androidx.transition.ViewUtilsBase public void a(View view, float f) { b(); Method method = a; if (method == null) { view.setAlpha(f); return; } try { method.invoke(view, Float.valueOf(f)); } catch (IllegalAccessException unused) { } catch (InvocationTargetException e) { throw new RuntimeException(e.getCause()); } } @Override // androidx.transition.ViewUtilsBase public float b(View view) { a(); Method method = c; if (method != null) { try { return ((Float) method.invoke(view, new Object[0])).floatValue(); } catch (IllegalAccessException unused) { } catch (InvocationTargetException e) { throw new RuntimeException(e.getCause()); } } return super.b(view); } @Override // androidx.transition.ViewUtilsBase public void c(View view) { } private void a() { if (d) { return; } try { c = View.class.getDeclaredMethod("getTransitionAlpha", new Class[0]); c.setAccessible(true); } catch (NoSuchMethodException e) { Log.i("ViewUtilsApi19", "Failed to retrieve getTransitionAlpha method", e); } d = true; } private void b() { if (b) { return; } try { a = View.class.getDeclaredMethod("setTransitionAlpha", Float.TYPE); a.setAccessible(true); } catch (NoSuchMethodException e) { Log.i("ViewUtilsApi19", "Failed to retrieve setTransitionAlpha method", e); } b = true; } }