package defpackage;

import android.animation.Animator;
import android.animation.AnimatorInflater;
import android.content.Context;
import android.content.res.Resources;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import ar.tvplayer.tv.R;

/* JADX INFO: renamed from: ᵫᵦᵢᵨ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C3994 extends ᵜᵪʾ {

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public boolean f15293;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final boolean f15294;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public C0767 f15295;

    public C3994(C5362 c5362, boolean z) {
        super(c5362);
        this.f15294 = z;
    }

    /* JADX WARN: Removed duplicated region for block: B:18:0x0027  */
    /* JADX WARN: Removed duplicated region for block: B:80:0x00e7 A[Catch: RuntimeException -> 0x00ed, TRY_LEAVE, TryCatch #1 {RuntimeException -> 0x00ed, blocks: (B:78:0x00e1, B:80:0x00e7), top: B:91:0x00e1 }] */
    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final C0767 m8770(Context context) {
        int i;
        Animation animationLoadAnimation;
        C0767 c0767;
        Animator animatorLoadAnimator;
        if (this.f15293) {
            return this.f15295;
        }
        C5362 c5362 = (C5362) ((ᵜᵪʾ) this).ˌᴵ;
        AbstractComponentCallbacksC3393 abstractComponentCallbacksC3393 = c5362.f20287;
        boolean z = c5362.f20291 == 2;
        C4222 c4222 = abstractComponentCallbacksC3393.f13047;
        int i2 = c4222 == null ? 0 : c4222.f16108;
        if (this.f15294) {
            if (z) {
                i = c4222 == null ? 0 : c4222.f16106;
            } else if (c4222 != null) {
                i = c4222.f16098;
            }
        } else if (z) {
            if (c4222 != null) {
                i = c4222.f16092;
            }
        } else if (c4222 != null) {
            i = c4222.f16095;
        }
        abstractComponentCallbacksC3393.m7786(0, 0, 0, 0);
        ViewGroup viewGroup = abstractComponentCallbacksC3393.f13067;
        C0767 c07672 = null;
        if (viewGroup != null && viewGroup.getTag(R.id.h) != null) {
            abstractComponentCallbacksC3393.f13067.setTag(R.id.h, null);
        }
        ViewGroup viewGroup2 = abstractComponentCallbacksC3393.f13067;
        if (viewGroup2 == null || viewGroup2.getLayoutTransition() == null) {
            if (i == 0 && i2 != 0) {
                i = i2 != 4097 ? i2 != 8194 ? i2 != 8197 ? i2 != 4099 ? i2 != 4100 ? -1 : z ? ˋˀᵧ.ˑˊᵲ(context, android.R.attr.activityOpenEnterAnimation) : ˋˀᵧ.ˑˊᵲ(context, android.R.attr.activityOpenExitAnimation) : z ? R.animator.h : R.animator.h : z ? ˋˀᵧ.ˑˊᵲ(context, android.R.attr.activityCloseEnterAnimation) : ˋˀᵧ.ˑˊᵲ(context, android.R.attr.activityCloseExitAnimation) : z ? R.animator.h : R.animator.h : z ? R.animator.h : R.animator.h;
            }
            if (i != 0) {
                boolean zEquals = "anim".equals(context.getResources().getResourceTypeName(i));
                int i3 = 26;
                if (zEquals) {
                    try {
                        animationLoadAnimation = AnimationUtils.loadAnimation(context, i);
                    } catch (Resources.NotFoundException e) {
                        throw e;
                    } catch (RuntimeException unused) {
                        try {
                            animatorLoadAnimator = AnimatorInflater.loadAnimator(context, i);
                            if (animatorLoadAnimator != null) {
                            }
                        } catch (RuntimeException e2) {
                            if (zEquals) {
                                throw e2;
                            }
                            Animation animationLoadAnimation2 = AnimationUtils.loadAnimation(context, i);
                            if (animationLoadAnimation2 != null) {
                                c07672 = new C0767(i3, animationLoadAnimation2);
                            }
                        }
                    }
                    if (animationLoadAnimation != null) {
                        c0767 = new C0767(i3, animationLoadAnimation);
                        c07672 = c0767;
                    }
                } else {
                    animatorLoadAnimator = AnimatorInflater.loadAnimator(context, i);
                    if (animatorLoadAnimator != null) {
                        c0767 = new C0767(animatorLoadAnimator);
                        c07672 = c0767;
                    }
                }
            }
        }
        this.f15295 = c07672;
        this.f15293 = true;
        return c07672;
    }
}
