package androidx.leanback.widget;

import defpackage.ol5;

/* JADX INFO: loaded from: classes.dex */
final class t0 {
    public int a;
    public int b;
    public ol5 c;

    public final void a() {
        int i = this.a;
        if (i == 2) {
            if (this.b <= 0) {
                throw new IllegalArgumentException();
            }
            ol5 ol5Var = this.c;
            if (ol5Var == null || ol5Var.maxSize() != this.b) {
                this.c = new ol5(this.b);
                return;
            }
            return;
        }
        if (i != 3 && i != 1) {
            this.c = null;
            return;
        }
        ol5 ol5Var2 = this.c;
        if (ol5Var2 == null || ol5Var2.maxSize() != Integer.MAX_VALUE) {
            this.c = new ol5(Integer.MAX_VALUE);
        }
    }
}
