package ῲ.ᓆ;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.view.View;
import android.view.ViewGroup;
import ῲ.ᨨ.ᨨ.C1729;

/* renamed from: ῲ.ᓆ.㸾  reason: contains not printable characters */
/* compiled from: Fade */
public class C1674 extends AbstractC1639 {

    /* renamed from: ῲ.ᓆ.㸾$ῲ  reason: contains not printable characters */
    /* compiled from: Fade */
    public static class C1675 extends AnimatorListenerAdapter {

        /* renamed from: ῲ  reason: contains not printable characters */
        public boolean f5919 = false;

        /* renamed from: K  reason: contains not printable characters */
        public final View f5920;

        public C1675(View view) {
            this.f5920 = view;
        }

        public void onAnimationEnd(Animator animator) {
            C1669.f5917.m4244(this.f5920, 1.0f);
            if (this.f5919) {
                this.f5920.setLayerType(0, null);
            }
        }

        public void onAnimationStart(Animator animator) {
            if (C1729.m4493(this.f5920) && this.f5920.getLayerType() == 0) {
                this.f5919 = true;
                this.f5920.setLayerType(2, null);
            }
        }
    }

    /* renamed from: ῲ.ᓆ.㸾$K  reason: contains not printable characters */
    /* compiled from: Fade */
    public class C1676 extends C1662 {

        /* renamed from: K  reason: contains not printable characters */
        public final /* synthetic */ View f5921;

        public C1676(C1674 r1, View view) {
            this.f5921 = view;
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionEnd(AbstractC1647 r4) {
            C1669.f5917.m4244(this.f5921, 1.0f);
            C1669.f5917.m4243(this.f5921);
            r4.removeListener(this);
        }
    }

    public C1674(int i) {
        setMode(i);
    }

    @Override // ῲ.ᓆ.AbstractC1647, ῲ.ᓆ.AbstractC1639
    public void captureStartValues(C1646 r3) {
        super.captureStartValues(r3);
        r3.f5883.put("android:fade:transitionAlpha", Float.valueOf(C1669.m4258(r3.f5882)));
    }

    @Override // ῲ.ᓆ.AbstractC1639
    public Animator onAppear(ViewGroup viewGroup, View view, C1646 r4, C1646 r5) {
        Float f;
        float f2 = 0.0f;
        float floatValue = (r4 == null || (f = (Float) r4.f5883.get("android:fade:transitionAlpha")) == null) ? 0.0f : f.floatValue();
        if (floatValue != 1.0f) {
            f2 = floatValue;
        }
        return m4261(view, f2, 1.0f);
    }

    @Override // ῲ.ᓆ.AbstractC1639
    public Animator onDisappear(ViewGroup viewGroup, View view, C1646 r3, C1646 r4) {
        Float f;
        C1669.f5917.m4240(view);
        return m4261(view, (r3 == null || (f = (Float) r3.f5883.get("android:fade:transitionAlpha")) == null) ? 1.0f : f.floatValue(), 0.0f);
    }

    /* renamed from: K  reason: contains not printable characters */
    public final Animator m4261(View view, float f, float f2) {
        if (f == f2) {
            return null;
        }
        C1669.f5917.m4244(view, f);
        ObjectAnimator ofFloat = ObjectAnimator.ofFloat(view, C1669.f5916, f2);
        ofFloat.addListener(new C1675(view));
        addListener(new C1676(this, view));
        return ofFloat;
    }
}
