package X6FRs_4.IMuAHx_6.EuDEkJe_12;

import X6FRs_4.IMuAHx_6.EuDEkJe_12.KQgRr5e_0;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.res.ColorStateList;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.util.SparseArray;
import android.view.Display;
import android.view.KeyEvent;
import android.view.PointerIcon;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import androidx.recyclerview.widget.RecyclerView;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.atomic.AtomicInteger;
/* compiled from: ViewCompat.java */
/* loaded from: classes.dex */
public class ZzDuCHW_20 {
    public static ThreadLocal<Rect> KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public static Field f386KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public static WeakHashMap<View, String> f387KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public static boolean f388KQgRr5e_0;
    public static Field PGPF6hQ_2;

    /* renamed from: PGPF6hQ_2  reason: collision with other field name */
    public static boolean f389PGPF6hQ_2;
    public static Field QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public static WeakHashMap<View, G83uNX_24> f390QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public static boolean f391QxJ9d_1;

    /* compiled from: ViewCompat.java */
    /* loaded from: classes.dex */
    public static abstract class IFxWkV_5<T> {
        public final int KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final Class<T> f395KQgRr5e_0;
        public final int QxJ9d_1;

        public IFxWkV_5(int i, Class<T> cls, int i2) {
            this(i, cls, 0, i2);
        }

        public abstract T KQgRr5e_0(View view);

        public final boolean KQgRr5e_0() {
            return Build.VERSION.SDK_INT >= 19;
        }

        public T QxJ9d_1(View view) {
            if (QxJ9d_1()) {
                return KQgRr5e_0(view);
            }
            if (KQgRr5e_0()) {
                T t = (T) view.getTag(this.KQgRr5e_0);
                if (this.f395KQgRr5e_0.isInstance(t)) {
                    return t;
                }
                return null;
            }
            return null;
        }

        public IFxWkV_5(int i, Class<T> cls, int i2, int i3) {
            this.KQgRr5e_0 = i;
            this.f395KQgRr5e_0 = cls;
            this.QxJ9d_1 = i3;
        }

        public final boolean QxJ9d_1() {
            return Build.VERSION.SDK_INT >= this.QxJ9d_1;
        }
    }

    /* compiled from: ViewCompat.java */
    /* loaded from: classes.dex */
    public interface IMuAHx_6 {
        boolean KQgRr5e_0(View view, KeyEvent keyEvent);
    }

    /* compiled from: ViewCompat.java */
    /* loaded from: classes.dex */
    public static class KQgRr5e_0 implements View.OnApplyWindowInsetsListener {
        public final /* synthetic */ JZJr_16 KQgRr5e_0;

        public KQgRr5e_0(JZJr_16 jZJr_16) {
            this.KQgRr5e_0 = jZJr_16;
        }

        @Override // android.view.View.OnApplyWindowInsetsListener
        public WindowInsets onApplyWindowInsets(View view, WindowInsets windowInsets) {
            return (WindowInsets) XuVgy_28.KQgRr5e_0(this.KQgRr5e_0.onApplyWindowInsets(view, XuVgy_28.KQgRr5e_0(windowInsets)));
        }
    }

    /* compiled from: ViewCompat.java */
    /* loaded from: classes.dex */
    public static class Mqv2r_3 extends IFxWkV_5<Boolean> {
        public Mqv2r_3(int i, Class cls, int i2) {
            super(i, cls, i2);
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IFxWkV_5
        public Boolean KQgRr5e_0(View view) {
            return Boolean.valueOf(view.isAccessibilityHeading());
        }
    }

    /* compiled from: ViewCompat.java */
    /* loaded from: classes.dex */
    public static class PGPF6hQ_2 extends IFxWkV_5<CharSequence> {
        public PGPF6hQ_2(int i, Class cls, int i2, int i3) {
            super(i, cls, i2, i3);
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IFxWkV_5
        public CharSequence KQgRr5e_0(View view) {
            return view.getAccessibilityPaneTitle();
        }
    }

    /* compiled from: ViewCompat.java */
    /* loaded from: classes.dex */
    public static class QxJ9d_1 extends IFxWkV_5<Boolean> {
        public QxJ9d_1(int i, Class cls, int i2) {
            super(i, cls, i2);
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IFxWkV_5
        public Boolean KQgRr5e_0(View view) {
            return Boolean.valueOf(view.isScreenReaderFocusable());
        }
    }

    static {
        new AtomicInteger(1);
        f390QxJ9d_1 = null;
        f389PGPF6hQ_2 = false;
        new X6FRs_4();
    }

    public static void FSaI4_7(View view, int i) {
        if (Build.VERSION.SDK_INT >= 26) {
            view.setImportantForAutofill(i);
        }
    }

    public static void IFxWkV_5(View view, int i) {
        if (Build.VERSION.SDK_INT >= 19) {
            view.setAccessibilityLiveRegion(i);
        }
    }

    public static void IMuAHx_6(View view, int i) {
        int i2 = Build.VERSION.SDK_INT;
        if (i2 >= 19) {
            view.setImportantForAccessibility(i);
        } else if (i2 >= 16) {
            if (i == 4) {
                i = 2;
            }
            view.setImportantForAccessibility(i);
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static Rect m255KQgRr5e_0() {
        if (KQgRr5e_0 == null) {
            KQgRr5e_0 = new ThreadLocal<>();
        }
        Rect rect = KQgRr5e_0.get();
        if (rect == null) {
            rect = new Rect();
            KQgRr5e_0.set(rect);
        }
        rect.setEmpty();
        return rect;
    }

    public static int Mqv2r_3(View view) {
        if (Build.VERSION.SDK_INT >= 17) {
            return view.getLayoutDirection();
        }
        return 0;
    }

    public static boolean Nm6q_10(View view) {
        Boolean QxJ9d_12 = PGPF6hQ_2().QxJ9d_1(view);
        if (QxJ9d_12 == null) {
            return false;
        }
        return QxJ9d_12.booleanValue();
    }

    @SuppressLint({"InlinedApi"})
    /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
    public static int m266PGPF6hQ_2(View view) {
        if (Build.VERSION.SDK_INT >= 26) {
            return view.getImportantForAutofill();
        }
        return 0;
    }

    /* renamed from: QxJ9d_1  reason: collision with other method in class */
    public static boolean m271QxJ9d_1(View view) {
        return m258KQgRr5e_0(view) != null;
    }

    /* renamed from: X6FRs_4  reason: collision with other method in class */
    public static boolean m272X6FRs_4(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.hasTransientState();
        }
        return false;
    }

    public static int Xgtqvk_8(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.getWindowSystemUiVisibility();
        }
        return 0;
    }

    public static boolean XnFJ5_9(View view) {
        if (Build.VERSION.SDK_INT >= 17) {
            return view.isPaddingRelative();
        }
        return false;
    }

    public static void QxJ9d_1(View view, boolean z) {
        if (Build.VERSION.SDK_INT >= 16) {
            view.setHasTransientState(z);
        }
    }

    /* compiled from: ViewCompat.java */
    /* loaded from: classes.dex */
    public static class FSaI4_7 {
        public static final ArrayList<WeakReference<View>> KQgRr5e_0 = new ArrayList<>();

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public WeakHashMap<View, Boolean> f394KQgRr5e_0 = null;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public SparseArray<WeakReference<View>> f392KQgRr5e_0 = null;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public WeakReference<KeyEvent> f393KQgRr5e_0 = null;

        public final SparseArray<WeakReference<View>> KQgRr5e_0() {
            if (this.f392KQgRr5e_0 == null) {
                this.f392KQgRr5e_0 = new SparseArray<>();
            }
            return this.f392KQgRr5e_0;
        }

        public final boolean QxJ9d_1(View view, KeyEvent keyEvent) {
            ArrayList arrayList = (ArrayList) view.getTag(X6FRs_4.IMuAHx_6.QxJ9d_1.tag_unhandled_key_listeners);
            if (arrayList != null) {
                for (int size = arrayList.size() - 1; size >= 0; size--) {
                    if (((IMuAHx_6) arrayList.get(size)).KQgRr5e_0(view, keyEvent)) {
                        return true;
                    }
                }
                return false;
            }
            return false;
        }

        public static FSaI4_7 KQgRr5e_0(View view) {
            FSaI4_7 fSaI4_7 = (FSaI4_7) view.getTag(X6FRs_4.IMuAHx_6.QxJ9d_1.tag_unhandled_key_event_manager);
            if (fSaI4_7 == null) {
                FSaI4_7 fSaI4_72 = new FSaI4_7();
                view.setTag(X6FRs_4.IMuAHx_6.QxJ9d_1.tag_unhandled_key_event_manager, fSaI4_72);
                return fSaI4_72;
            }
            return fSaI4_7;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m275KQgRr5e_0(View view, KeyEvent keyEvent) {
            if (keyEvent.getAction() == 0) {
                m274KQgRr5e_0();
            }
            View KQgRr5e_02 = KQgRr5e_0(view, keyEvent);
            if (keyEvent.getAction() == 0) {
                int keyCode = keyEvent.getKeyCode();
                if (KQgRr5e_02 != null && !KeyEvent.isModifierKey(keyCode)) {
                    KQgRr5e_0().put(keyCode, new WeakReference<>(KQgRr5e_02));
                }
            }
            return KQgRr5e_02 != null;
        }

        public final View KQgRr5e_0(View view, KeyEvent keyEvent) {
            WeakHashMap<View, Boolean> weakHashMap = this.f394KQgRr5e_0;
            if (weakHashMap != null && weakHashMap.containsKey(view)) {
                if (view instanceof ViewGroup) {
                    ViewGroup viewGroup = (ViewGroup) view;
                    for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) {
                        View KQgRr5e_02 = KQgRr5e_0(viewGroup.getChildAt(childCount), keyEvent);
                        if (KQgRr5e_02 != null) {
                            return KQgRr5e_02;
                        }
                    }
                }
                if (QxJ9d_1(view, keyEvent)) {
                    return view;
                }
            }
            return null;
        }

        public boolean KQgRr5e_0(KeyEvent keyEvent) {
            int indexOfKey;
            WeakReference<KeyEvent> weakReference = this.f393KQgRr5e_0;
            if (weakReference == null || weakReference.get() != keyEvent) {
                this.f393KQgRr5e_0 = new WeakReference<>(keyEvent);
                WeakReference<View> weakReference2 = null;
                SparseArray<WeakReference<View>> KQgRr5e_02 = KQgRr5e_0();
                if (keyEvent.getAction() == 1 && (indexOfKey = KQgRr5e_02.indexOfKey(keyEvent.getKeyCode())) >= 0) {
                    weakReference2 = KQgRr5e_02.valueAt(indexOfKey);
                    KQgRr5e_02.removeAt(indexOfKey);
                }
                if (weakReference2 == null) {
                    weakReference2 = KQgRr5e_02.get(keyEvent.getKeyCode());
                }
                if (weakReference2 != null) {
                    View view = weakReference2.get();
                    if (view != null && ZzDuCHW_20.m250IMuAHx_6(view)) {
                        QxJ9d_1(view, keyEvent);
                    }
                    return true;
                }
                return false;
            }
            return false;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public final void m274KQgRr5e_0() {
            WeakHashMap<View, Boolean> weakHashMap = this.f394KQgRr5e_0;
            if (weakHashMap != null) {
                weakHashMap.clear();
            }
            if (KQgRr5e_0.isEmpty()) {
                return;
            }
            synchronized (KQgRr5e_0) {
                if (this.f394KQgRr5e_0 == null) {
                    this.f394KQgRr5e_0 = new WeakHashMap<>();
                }
                for (int size = KQgRr5e_0.size() - 1; size >= 0; size--) {
                    View view = KQgRr5e_0.get(size).get();
                    if (view == null) {
                        KQgRr5e_0.remove(size);
                    } else {
                        this.f394KQgRr5e_0.put(view, Boolean.TRUE);
                        for (ViewParent parent = view.getParent(); parent instanceof View; parent = parent.getParent()) {
                            this.f394KQgRr5e_0.put((View) parent, Boolean.TRUE);
                        }
                    }
                }
            }
        }
    }

    /* compiled from: ViewCompat.java */
    /* loaded from: classes.dex */
    public static class X6FRs_4 implements ViewTreeObserver.OnGlobalLayoutListener, View.OnAttachStateChangeListener {
        public WeakHashMap<View, Boolean> KQgRr5e_0 = new WeakHashMap<>();

        public final void KQgRr5e_0(View view, boolean z) {
            boolean z2 = view.getVisibility() == 0;
            if (z != z2) {
                if (z2) {
                    ZzDuCHW_20.PGPF6hQ_2(view, 16);
                }
                this.KQgRr5e_0.put(view, Boolean.valueOf(z2));
            }
        }

        @Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
        public void onGlobalLayout() {
            for (Map.Entry<View, Boolean> entry : this.KQgRr5e_0.entrySet()) {
                KQgRr5e_0(entry.getKey(), entry.getValue().booleanValue());
            }
        }

        @Override // android.view.View.OnAttachStateChangeListener
        public void onViewAttachedToWindow(View view) {
            KQgRr5e_0(view);
        }

        @Override // android.view.View.OnAttachStateChangeListener
        public void onViewDetachedFromWindow(View view) {
        }

        public final void KQgRr5e_0(View view) {
            view.getViewTreeObserver().addOnGlobalLayoutListener(this);
        }
    }

    public static int FSaI4_7(View view) {
        if (Build.VERSION.SDK_INT >= 17) {
            return view.getPaddingStart();
        }
        return view.getPaddingLeft();
    }

    public static int IFxWkV_5(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.getMinimumWidth();
        }
        if (!f388KQgRr5e_0) {
            try {
                Field declaredField = View.class.getDeclaredField("mMinWidth");
                f386KQgRr5e_0 = declaredField;
                declaredField.setAccessible(true);
            } catch (NoSuchFieldException unused) {
            }
            f388KQgRr5e_0 = true;
        }
        Field field = f386KQgRr5e_0;
        if (field != null) {
            try {
                return ((Integer) field.get(view)).intValue();
            } catch (Exception unused2) {
                return 0;
            }
        }
        return 0;
    }

    /* renamed from: Mqv2r_3  reason: collision with other method in class */
    public static boolean m265Mqv2r_3(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.hasOverlappingRendering();
        }
        return true;
    }

    /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
    public static void m267PGPF6hQ_2(View view) {
        if (Build.VERSION.SDK_INT >= 21) {
            view.stopNestedScroll();
        } else if (view instanceof Nm6q_10) {
            ((Nm6q_10) view).stopNestedScroll();
        }
    }

    public static int X6FRs_4(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.getMinimumHeight();
        }
        if (!f391QxJ9d_1) {
            try {
                Field declaredField = View.class.getDeclaredField("mMinHeight");
                QxJ9d_1 = declaredField;
                declaredField.setAccessible(true);
            } catch (NoSuchFieldException unused) {
            }
            f391QxJ9d_1 = true;
        }
        Field field = QxJ9d_1;
        if (field != null) {
            try {
                return ((Integer) field.get(view)).intValue();
            } catch (Exception unused2) {
                return 0;
            }
        }
        return 0;
    }

    /* renamed from: Xgtqvk_8  reason: collision with other method in class */
    public static boolean m273Xgtqvk_8(View view) {
        if (Build.VERSION.SDK_INT >= 21) {
            return view.isNestedScrollingEnabled();
        }
        if (view instanceof Nm6q_10) {
            return ((Nm6q_10) view).isNestedScrollingEnabled();
        }
        return false;
    }

    public static int IMuAHx_6(View view) {
        if (Build.VERSION.SDK_INT >= 17) {
            return view.getPaddingEnd();
        }
        return view.getPaddingRight();
    }

    /* renamed from: QxJ9d_1  reason: collision with other method in class */
    public static int m269QxJ9d_1(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.getImportantForAccessibility();
        }
        return 0;
    }

    public static void Mqv2r_3(View view, int i) {
        int i2 = Build.VERSION.SDK_INT;
        if (i2 >= 23) {
            view.offsetLeftAndRight(i);
        } else if (i2 >= 21) {
            Rect m255KQgRr5e_0 = m255KQgRr5e_0();
            boolean z = false;
            ViewParent parent = view.getParent();
            if (parent instanceof View) {
                View view2 = (View) parent;
                m255KQgRr5e_0.set(view2.getLeft(), view2.getTop(), view2.getRight(), view2.getBottom());
                z = !m255KQgRr5e_0.intersects(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
            }
            KQgRr5e_0(view, i);
            if (z && m255KQgRr5e_0.intersect(view.getLeft(), view.getTop(), view.getRight(), view.getBottom())) {
                ((View) parent).invalidate(m255KQgRr5e_0);
            }
        } else {
            KQgRr5e_0(view, i);
        }
    }

    /* renamed from: FSaI4_7  reason: collision with other method in class */
    public static boolean m248FSaI4_7(View view) {
        if (Build.VERSION.SDK_INT >= 19) {
            return view.isLaidOut();
        }
        return view.getWidth() > 0 && view.getHeight() > 0;
    }

    public static void QxJ9d_1(View view, int i, int i2, int i3, int i4) {
        if (Build.VERSION.SDK_INT >= 17) {
            view.setPaddingRelative(i, i2, i3, i4);
        } else {
            view.setPadding(i, i2, i3, i4);
        }
    }

    /* renamed from: IMuAHx_6  reason: collision with other method in class */
    public static boolean m250IMuAHx_6(View view) {
        if (Build.VERSION.SDK_INT >= 19) {
            return view.isAttachedToWindow();
        }
        return view.getWindowToken() != null;
    }

    public static void KQgRr5e_0(View view, X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 mqv2r_3) {
        view.onInitializeAccessibilityNodeInfo(mqv2r_3.m225KQgRr5e_0());
    }

    public static float PGPF6hQ_2(View view) {
        if (Build.VERSION.SDK_INT >= 21) {
            return view.getZ();
        }
        return 0.0f;
    }

    public static void Xgtqvk_8(View view, int i) {
        if (view instanceof Xgtqvk_8) {
            ((Xgtqvk_8) view).stopNestedScroll(i);
        } else if (i == 0) {
            m267PGPF6hQ_2(view);
        }
    }

    public static void KQgRr5e_0(View view, X6FRs_4.IMuAHx_6.EuDEkJe_12.KQgRr5e_0 kQgRr5e_0) {
        if (kQgRr5e_0 == null && (m258KQgRr5e_0(view) instanceof KQgRr5e_0.C0035KQgRr5e_0)) {
            kQgRr5e_0 = new X6FRs_4.IMuAHx_6.EuDEkJe_12.KQgRr5e_0();
        }
        view.setAccessibilityDelegate(kQgRr5e_0 == null ? null : kQgRr5e_0.getBridge());
    }

    /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
    public static boolean m268PGPF6hQ_2(View view) {
        if (Build.VERSION.SDK_INT >= 15) {
            return view.hasOnClickListeners();
        }
        return false;
    }

    public static void QxJ9d_1(View view, float f) {
        if (Build.VERSION.SDK_INT >= 21) {
            view.setTranslationZ(f);
        }
    }

    /* renamed from: IFxWkV_5  reason: collision with other method in class */
    public static boolean m249IFxWkV_5(View view) {
        Boolean QxJ9d_12 = KQgRr5e_0().QxJ9d_1(view);
        if (QxJ9d_12 == null) {
            return false;
        }
        return QxJ9d_12.booleanValue();
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static View.AccessibilityDelegate m258KQgRr5e_0(View view) {
        if (f389PGPF6hQ_2) {
            return null;
        }
        if (PGPF6hQ_2 == null) {
            try {
                Field declaredField = View.class.getDeclaredField("mAccessibilityDelegate");
                PGPF6hQ_2 = declaredField;
                declaredField.setAccessible(true);
            } catch (Throwable unused) {
                f389PGPF6hQ_2 = true;
                return null;
            }
        }
        try {
            Object obj = PGPF6hQ_2.get(view);
            if (obj instanceof View.AccessibilityDelegate) {
                return (View.AccessibilityDelegate) obj;
            }
            return null;
        } catch (Throwable unused2) {
            f389PGPF6hQ_2 = true;
            return null;
        }
    }

    public static IFxWkV_5<Boolean> PGPF6hQ_2() {
        return new QxJ9d_1(X6FRs_4.IMuAHx_6.QxJ9d_1.tag_screen_reader_focusable, Boolean.class, 28);
    }

    public static float QxJ9d_1(View view) {
        if (Build.VERSION.SDK_INT >= 21) {
            return view.getTranslationZ();
        }
        return 0.0f;
    }

    public static void X6FRs_4(View view, int i) {
        int i2 = Build.VERSION.SDK_INT;
        if (i2 >= 23) {
            view.offsetTopAndBottom(i);
        } else if (i2 >= 21) {
            Rect m255KQgRr5e_0 = m255KQgRr5e_0();
            boolean z = false;
            ViewParent parent = view.getParent();
            if (parent instanceof View) {
                View view2 = (View) parent;
                m255KQgRr5e_0.set(view2.getLeft(), view2.getTop(), view2.getRight(), view2.getBottom());
                z = !m255KQgRr5e_0.intersects(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
            }
            QxJ9d_1(view, i);
            if (z && m255KQgRr5e_0.intersect(view.getLeft(), view.getTop(), view.getRight(), view.getBottom())) {
                ((View) parent).invalidate(m255KQgRr5e_0);
            }
        } else {
            QxJ9d_1(view, i);
        }
    }

    public static void PGPF6hQ_2(View view, int i) {
        if (((AccessibilityManager) view.getContext().getSystemService("accessibility")).isEnabled()) {
            boolean z = m260KQgRr5e_0(view) != null;
            if (m251KQgRr5e_0(view) == 0 && (!z || view.getVisibility() != 0)) {
                if (view.getParent() != null) {
                    try {
                        view.getParent().notifySubtreeAccessibilityStateChanged(view, view, i);
                        return;
                    } catch (AbstractMethodError e) {
                        Log.e("ViewCompat", view.getParent().getClass().getSimpleName() + " does not fully implement ViewParent", e);
                        return;
                    }
                }
                return;
            }
            AccessibilityEvent obtain = AccessibilityEvent.obtain();
            obtain.setEventType(z ? 32 : RecyclerView.WGk6X_27.FLAG_MOVED);
            obtain.setContentChangeTypes(i);
            view.sendAccessibilityEventUnchecked(obtain);
        }
    }

    /* renamed from: QxJ9d_1  reason: collision with other method in class */
    public static void m270QxJ9d_1(View view) {
        int i = Build.VERSION.SDK_INT;
        if (i >= 20) {
            view.requestApplyInsets();
        } else if (i >= 16) {
            view.requestFitSystemWindows();
        }
    }

    public static XuVgy_28 QxJ9d_1(View view, XuVgy_28 xuVgy_28) {
        if (Build.VERSION.SDK_INT >= 21) {
            WindowInsets windowInsets = (WindowInsets) XuVgy_28.KQgRr5e_0(xuVgy_28);
            WindowInsets onApplyWindowInsets = view.onApplyWindowInsets(windowInsets);
            if (!onApplyWindowInsets.equals(windowInsets)) {
                windowInsets = new WindowInsets(onApplyWindowInsets);
            }
            return XuVgy_28.KQgRr5e_0(windowInsets);
        }
        return xuVgy_28;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static void m262KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            view.postInvalidateOnAnimation();
        } else {
            view.postInvalidate();
        }
    }

    /* renamed from: Mqv2r_3  reason: collision with other method in class */
    public static void m264Mqv2r_3(View view) {
        float translationY = view.getTranslationY();
        view.setTranslationY(1.0f + translationY);
        view.setTranslationY(translationY);
    }

    public static void QxJ9d_1(View view, int i) {
        view.offsetTopAndBottom(i);
        if (view.getVisibility() == 0) {
            m264Mqv2r_3(view);
            ViewParent parent = view.getParent();
            if (parent instanceof View) {
                m264Mqv2r_3((View) parent);
            }
        }
    }

    public static void KQgRr5e_0(View view, int i, int i2, int i3, int i4) {
        if (Build.VERSION.SDK_INT >= 16) {
            view.postInvalidateOnAnimation(i, i2, i3, i4);
        } else {
            view.postInvalidate(i, i2, i3, i4);
        }
    }

    public static void KQgRr5e_0(View view, Runnable runnable) {
        if (Build.VERSION.SDK_INT >= 16) {
            view.postOnAnimation(runnable);
        } else {
            view.postDelayed(runnable, ValueAnimator.getFrameDelay());
        }
    }

    public static boolean QxJ9d_1(View view, KeyEvent keyEvent) {
        if (Build.VERSION.SDK_INT >= 28) {
            return false;
        }
        return FSaI4_7.KQgRr5e_0(view).KQgRr5e_0(keyEvent);
    }

    public static void KQgRr5e_0(View view, Runnable runnable, long j) {
        if (Build.VERSION.SDK_INT >= 16) {
            view.postOnAnimationDelayed(runnable, j);
        } else {
            view.postDelayed(runnable, ValueAnimator.getFrameDelay() + j);
        }
    }

    public static IFxWkV_5<CharSequence> QxJ9d_1() {
        return new PGPF6hQ_2(X6FRs_4.IMuAHx_6.QxJ9d_1.tag_accessibility_pane_title, CharSequence.class, 8, 28);
    }

    public static boolean KQgRr5e_0(View view, int i, Bundle bundle) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.performAccessibilityAction(i, bundle);
        }
        return false;
    }

    public static void KQgRr5e_0(View view, Paint paint) {
        if (Build.VERSION.SDK_INT >= 17) {
            view.setLayerPaint(paint);
            return;
        }
        view.setLayerType(view.getLayerType(), paint);
        view.invalidate();
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static ViewParent m259KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.getParentForAccessibility();
        }
        return view.getParent();
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static int m251KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 19) {
            return view.getAccessibilityLiveRegion();
        }
        return 0;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static G83uNX_24 m252KQgRr5e_0(View view) {
        if (f390QxJ9d_1 == null) {
            f390QxJ9d_1 = new WeakHashMap<>();
        }
        G83uNX_24 g83uNX_24 = f390QxJ9d_1.get(view);
        if (g83uNX_24 == null) {
            G83uNX_24 g83uNX_242 = new G83uNX_24(view);
            f390QxJ9d_1.put(view, g83uNX_242);
            return g83uNX_242;
        }
        return g83uNX_24;
    }

    public static void KQgRr5e_0(View view, float f) {
        if (Build.VERSION.SDK_INT >= 21) {
            view.setElevation(f);
        }
    }

    public static float KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 21) {
            return view.getElevation();
        }
        return 0.0f;
    }

    public static void KQgRr5e_0(View view, String str) {
        if (Build.VERSION.SDK_INT >= 21) {
            view.setTransitionName(str);
            return;
        }
        if (f387KQgRr5e_0 == null) {
            f387KQgRr5e_0 = new WeakHashMap<>();
        }
        f387KQgRr5e_0.put(view, str);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static String m261KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 21) {
            return view.getTransitionName();
        }
        WeakHashMap<View, String> weakHashMap = f387KQgRr5e_0;
        if (weakHashMap == null) {
            return null;
        }
        return weakHashMap.get(view);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static boolean m263KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            return view.getFitsSystemWindows();
        }
        return false;
    }

    @Deprecated
    public static void KQgRr5e_0(View view, boolean z) {
        view.setFitsSystemWindows(z);
    }

    public static void KQgRr5e_0(View view, JZJr_16 jZJr_16) {
        if (Build.VERSION.SDK_INT >= 21) {
            if (jZJr_16 == null) {
                view.setOnApplyWindowInsetsListener(null);
            } else {
                view.setOnApplyWindowInsetsListener(new KQgRr5e_0(jZJr_16));
            }
        }
    }

    public static XuVgy_28 KQgRr5e_0(View view, XuVgy_28 xuVgy_28) {
        if (Build.VERSION.SDK_INT >= 21) {
            WindowInsets windowInsets = (WindowInsets) XuVgy_28.KQgRr5e_0(xuVgy_28);
            WindowInsets dispatchApplyWindowInsets = view.dispatchApplyWindowInsets(windowInsets);
            if (!dispatchApplyWindowInsets.equals(windowInsets)) {
                windowInsets = new WindowInsets(dispatchApplyWindowInsets);
            }
            return XuVgy_28.KQgRr5e_0(windowInsets);
        }
        return xuVgy_28;
    }

    public static void KQgRr5e_0(View view, Drawable drawable) {
        if (Build.VERSION.SDK_INT >= 16) {
            view.setBackground(drawable);
        } else {
            view.setBackgroundDrawable(drawable);
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static ColorStateList m253KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 21) {
            return view.getBackgroundTintList();
        }
        if (view instanceof BVpCZyH_19) {
            return ((BVpCZyH_19) view).getSupportBackgroundTintList();
        }
        return null;
    }

    public static void KQgRr5e_0(View view, ColorStateList colorStateList) {
        if (Build.VERSION.SDK_INT >= 21) {
            view.setBackgroundTintList(colorStateList);
            if (Build.VERSION.SDK_INT == 21) {
                Drawable background = view.getBackground();
                boolean z = (view.getBackgroundTintList() == null && view.getBackgroundTintMode() == null) ? false : true;
                if (background == null || !z) {
                    return;
                }
                if (background.isStateful()) {
                    background.setState(view.getDrawableState());
                }
                view.setBackground(background);
            }
        } else if (view instanceof BVpCZyH_19) {
            ((BVpCZyH_19) view).setSupportBackgroundTintList(colorStateList);
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static PorterDuff.Mode m254KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 21) {
            return view.getBackgroundTintMode();
        }
        if (view instanceof BVpCZyH_19) {
            return ((BVpCZyH_19) view).getSupportBackgroundTintMode();
        }
        return null;
    }

    public static void KQgRr5e_0(View view, PorterDuff.Mode mode) {
        if (Build.VERSION.SDK_INT >= 21) {
            view.setBackgroundTintMode(mode);
            if (Build.VERSION.SDK_INT == 21) {
                Drawable background = view.getBackground();
                boolean z = (view.getBackgroundTintList() == null && view.getBackgroundTintMode() == null) ? false : true;
                if (background == null || !z) {
                    return;
                }
                if (background.isStateful()) {
                    background.setState(view.getDrawableState());
                }
                view.setBackground(background);
            }
        } else if (view instanceof BVpCZyH_19) {
            ((BVpCZyH_19) view).setSupportBackgroundTintMode(mode);
        }
    }

    public static void KQgRr5e_0(View view, int i) {
        view.offsetLeftAndRight(i);
        if (view.getVisibility() == 0) {
            m264Mqv2r_3(view);
            ViewParent parent = view.getParent();
            if (parent instanceof View) {
                m264Mqv2r_3((View) parent);
            }
        }
    }

    public static void KQgRr5e_0(View view, Rect rect) {
        if (Build.VERSION.SDK_INT >= 18) {
            view.setClipBounds(rect);
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static Rect m256KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 18) {
            return view.getClipBounds();
        }
        return null;
    }

    public static void KQgRr5e_0(View view, int i, int i2) {
        if (Build.VERSION.SDK_INT >= 23) {
            view.setScrollIndicators(i, i2);
        }
    }

    public static void KQgRr5e_0(View view, NQvZgp_17 nQvZgp_17) {
        if (Build.VERSION.SDK_INT >= 24) {
            view.setPointerIcon((PointerIcon) (nQvZgp_17 != null ? nQvZgp_17.KQgRr5e_0() : null));
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static Display m257KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 17) {
            return view.getDisplay();
        }
        if (m250IMuAHx_6(view)) {
            return ((WindowManager) view.getContext().getSystemService("window")).getDefaultDisplay();
        }
        return null;
    }

    public static boolean KQgRr5e_0(View view, KeyEvent keyEvent) {
        if (Build.VERSION.SDK_INT >= 28) {
            return false;
        }
        return FSaI4_7.KQgRr5e_0(view).m275KQgRr5e_0(view, keyEvent);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static CharSequence m260KQgRr5e_0(View view) {
        return QxJ9d_1().QxJ9d_1(view);
    }

    public static IFxWkV_5<Boolean> KQgRr5e_0() {
        return new Mqv2r_3(X6FRs_4.IMuAHx_6.QxJ9d_1.tag_accessibility_heading, Boolean.class, 28);
    }
}
