package androidx.transition; import android.graphics.Matrix; import android.graphics.Rect; import android.os.Build; import android.util.Log; import android.util.Property; import android.view.View; import androidx.core.view.ViewCompat; import java.lang.reflect.Field; /* loaded from: classes.dex */ class ViewUtils { private static final ViewUtilsBase a; private static Field b; private static boolean c; static final Property d; static { int i = Build.VERSION.SDK_INT; if (i >= 22) { a = new ViewUtilsApi22(); } else if (i >= 21) { a = new ViewUtilsApi21(); } else if (i >= 19) { a = new ViewUtilsApi19(); } else { a = new ViewUtilsBase(); } d = new Property(Float.class, "translationAlpha") { // from class: androidx.transition.ViewUtils.1 @Override // android.util.Property /* renamed from: a, reason: merged with bridge method [inline-methods] */ public Float get(View view) { return Float.valueOf(ViewUtils.c(view)); } @Override // android.util.Property /* renamed from: a, reason: merged with bridge method [inline-methods] */ public void set(View view, Float f) { ViewUtils.a(view, f.floatValue()); } }; new Property(Rect.class, "clipBounds") { // from class: androidx.transition.ViewUtils.2 @Override // android.util.Property /* renamed from: a, reason: merged with bridge method [inline-methods] */ public Rect get(View view) { return ViewCompat.e(view); } @Override // android.util.Property /* renamed from: a, reason: merged with bridge method [inline-methods] */ public void set(View view, Rect rect) { ViewCompat.a(view, rect); } }; } static void a(View view, float f) { a.a(view, f); } static ViewOverlayImpl b(View view) { return Build.VERSION.SDK_INT >= 18 ? new ViewOverlayApi18(view) : ViewOverlayApi14.c(view); } static float c(View view) { return a.b(view); } static WindowIdImpl d(View view) { return Build.VERSION.SDK_INT >= 18 ? new WindowIdApi18(view) : new WindowIdApi14(view.getWindowToken()); } static void e(View view) { a.c(view); } static void a(View view) { a.a(view); } static void a(View view, int i) { a(); Field field = b; if (field != null) { try { b.setInt(view, i | (field.getInt(view) & (-13))); } catch (IllegalAccessException unused) { } } } static void b(View view, Matrix matrix) { a.b(view, matrix); } static void a(View view, Matrix matrix) { a.a(view, matrix); } static void a(View view, int i, int i2, int i3, int i4) { a.a(view, i, i2, i3, i4); } private static void a() { if (c) { return; } try { b = View.class.getDeclaredField("mViewFlags"); b.setAccessible(true); } catch (NoSuchFieldException unused) { Log.i("ViewUtils", "fetchViewFlagsField: "); } c = true; } }