package androidx.recyclerview.widget;

import android.util.Log;
import android.view.animation.BaseInterpolator;

/* JADX INFO: loaded from: classes.dex */
public final class U {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f12990a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f12991b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f12992c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public int f12993d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public BaseInterpolator f12994e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public boolean f12995f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public int f12996g;

    public final void a(RecyclerView recyclerView) {
        int i6 = this.f12993d;
        if (i6 >= 0) {
            this.f12993d = -1;
            recyclerView.L(i6);
            this.f12995f = false;
            return;
        }
        if (!this.f12995f) {
            this.f12996g = 0;
            return;
        }
        BaseInterpolator baseInterpolator = this.f12994e;
        if (baseInterpolator != null && this.f12992c < 1) {
            throw new IllegalStateException("If you provide an interpolator, you must set a positive duration");
        }
        int i7 = this.f12992c;
        if (i7 < 1) {
            throw new IllegalStateException("Scroll duration must be a positive number");
        }
        recyclerView.g0.c(this.f12990a, this.f12991b, i7, baseInterpolator);
        int i8 = this.f12996g + 1;
        this.f12996g = i8;
        if (i8 > 10) {
            Log.e("RecyclerView", "Smooth Scroll action is being updated too frequently. Make sure you are not changing it unless necessary");
        }
        this.f12995f = false;
    }
}
