package u0;

import android.util.Log;
import android.view.animation.BaseInterpolator;
import androidx.recyclerview.widget.RecyclerView;

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

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

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

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

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

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

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

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

    public final void a(RecyclerView recyclerView) {
        int i = this.f10095d;
        if (i >= 0) {
            this.f10095d = -1;
            recyclerView.L(i);
            this.f10097f = false;
            return;
        }
        if (!this.f10097f) {
            this.f10098g = 0;
            return;
        }
        BaseInterpolator baseInterpolator = this.f10096e;
        if (baseInterpolator != null && this.f10094c < 1) {
            throw new IllegalStateException("If you provide an interpolator, you must set a positive duration");
        }
        int i5 = this.f10094c;
        if (i5 < 1) {
            throw new IllegalStateException("Scroll duration must be a positive number");
        }
        recyclerView.f4568j0.b(this.f10092a, this.f10093b, i5, baseInterpolator);
        int i6 = this.f10098g + 1;
        this.f10098g = i6;
        if (i6 > 10) {
            Log.e("RecyclerView", "Smooth Scroll action is being updated too frequently. Make sure you are not changing it unless necessary");
        }
        this.f10097f = false;
    }
}
