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 {

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

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

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

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

    f(f fVar) {
        this.f1719c = null;
        this.f1720d = d.f1709k;
        if (fVar != null) {
            this.f1717a = fVar.f1717a;
            this.f1718b = fVar.f1718b;
            this.f1719c = fVar.f1719c;
            this.f1720d = fVar.f1720d;
        }
    }

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

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

    @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);
    }
}
