package androidx.recyclerview.widget;

import android.animation.Animator;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.x;

/* JADX INFO: loaded from: classes.dex */
class y extends x.e {
    public final /* synthetic */ int n;
    public final /* synthetic */ RecyclerView.ag o;
    public final /* synthetic */ x p;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public y(x xVar, RecyclerView.ag agVar, int i, float f, float f2, float f3, float f4, int i2, RecyclerView.ag agVar2) {
        super(agVar, i, f, f2, f3, f4);
        this.p = xVar;
        this.n = i2;
        this.o = agVar2;
    }

    @Override // androidx.recyclerview.widget.x.e, android.animation.Animator.AnimatorListener
    public final void onAnimationEnd(Animator animator) {
        super.onAnimationEnd(animator);
        if (this.k) {
            return;
        }
        int i = this.n;
        RecyclerView.ag agVar = this.o;
        x xVar = this.p;
        if (i <= 0) {
            xVar.m.a(xVar.r, agVar);
        } else {
            xVar.a.add(agVar.itemView);
            this.h = true;
            if (i > 0) {
                xVar.r.post(new z(xVar, this, i));
            }
        }
        View view = xVar.w;
        View view2 = agVar.itemView;
        if (view == view2) {
            xVar.o(view2);
        }
    }
}
