package androidx.core.graphics.drawable;

import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;

/* JADX INFO: compiled from: WrappedDrawableState.java */
/* JADX INFO: loaded from: classes.dex */
final class f extends Drawable.ConstantState {
    int a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    Drawable.ConstantState f633b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    ColorStateList f634c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    PorterDuff.Mode f635d;

    f(f fVar) {
        this.f634c = null;
        this.f635d = d.f626k;
        if (fVar != null) {
            this.a = fVar.a;
            this.f633b = fVar.f633b;
            this.f634c = fVar.f634c;
            this.f635d = fVar.f635d;
        }
    }

    boolean a() {
        return this.f633b != null;
    }

    @Override // android.graphics.drawable.Drawable.ConstantState
    public int getChangingConfigurations() {
        int i2 = this.a;
        Drawable.ConstantState constantState = this.f633b;
        return i2 | (constantState != null ? constantState.getChangingConfigurations() : 0);
    }

    @Override // android.graphics.drawable.Drawable.ConstantState
    public Drawable newDrawable() {
        return newDrawable(null);
    }

    @Override // android.graphics.drawable.Drawable.ConstantState
    public Drawable newDrawable(Resources resources) {
        return Build.VERSION.SDK_INT >= 21 ? new e(this, resources) : new d(this, resources);
    }
}
