package ῲ.ῲ.ʬ.K;

import android.annotation.SuppressLint;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.util.StateSet;
import ῲ.ῲ.ʬ.K.C1873;

@SuppressLint({"RestrictedAPI"})
/* renamed from: ῲ.ῲ.ʬ.K.㸾  reason: contains not printable characters */
/* compiled from: StateListDrawable */
public class C1885 extends C1873 {

    /* renamed from: Ԕ  reason: contains not printable characters */
    public C1886 f6382;

    /* renamed from: 㗗  reason: contains not printable characters */
    public boolean f6383;

    /* renamed from: ῲ.ῲ.ʬ.K.㸾$K  reason: contains not printable characters */
    /* compiled from: StateListDrawable */
    public static class C1886 extends C1873.AbstractC1874 {

        /* renamed from: 㮝  reason: contains not printable characters */
        public int[][] f6384;

        public C1886(C1886 k, C1885 r2, Resources resources) {
            super(k, r2, resources);
            if (k != null) {
                this.f6384 = k.f6384;
            } else {
                this.f6384 = new int[this.f6348.length][];
            }
        }

        public Drawable newDrawable() {
            return new C1885(this, null);
        }

        /* renamed from: K  reason: contains not printable characters */
        public int m4876(int[] iArr) {
            int[][] iArr2 = this.f6384;
            int i = this.f6362;
            for (int i2 = 0; i2 < i; i2++) {
                if (StateSet.stateSetMatches(iArr2[i2], iArr)) {
                    return i2;
                }
            }
            return -1;
        }

        @Override // ῲ.ῲ.ʬ.K.C1873.AbstractC1874
        /* renamed from: 㸾  reason: contains not printable characters */
        public void m4878() {
            int[][] iArr = this.f6384;
            int[][] iArr2 = new int[iArr.length][];
            for (int length = iArr.length - 1; length >= 0; length--) {
                int[][] iArr3 = this.f6384;
                iArr2[length] = iArr3[length] != null ? (int[]) iArr3[length].clone() : null;
            }
            this.f6384 = iArr2;
        }

        public Drawable newDrawable(Resources resources) {
            return new C1885(this, resources);
        }

        @Override // ῲ.ῲ.ʬ.K.C1873.AbstractC1874
        /* renamed from: K  reason: contains not printable characters */
        public void m4877(int i, int i2) {
            super.m4847(i, i2);
            int[][] iArr = new int[i2][];
            System.arraycopy(this.f6384, 0, iArr, 0, i);
            this.f6384 = iArr;
        }
    }

    public C1885(C1886 k, Resources resources) {
        m4875(new C1886(k, this, resources));
        onStateChange(getState());
    }

    public void applyTheme(Resources.Theme theme) {
        this.f6323.m4848(theme);
        onStateChange(getState());
    }

    public boolean isStateful() {
        return true;
    }

    @Override // ῲ.ῲ.ʬ.K.C1873
    public Drawable mutate() {
        if (!this.f6383) {
            super.mutate();
            if (this == this) {
                this.f6382.m4878();
                this.f6383 = true;
            }
        }
        return this;
    }

    @Override // ῲ.ῲ.ʬ.K.C1873
    public boolean onStateChange(int[] iArr) {
        boolean onStateChange = super.onStateChange(iArr);
        int r3 = this.f6382.m4876(iArr);
        if (r3 < 0) {
            r3 = this.f6382.m4876(StateSet.WILD_CARD);
        }
        return m4842(r3) || onStateChange;
    }

    @Override // ῲ.ῲ.ʬ.K.C1873
    /* renamed from: K  reason: contains not printable characters */
    public C1886 m4873() {
        return new C1886(this.f6382, this, null);
    }

    @Override // ῲ.ῲ.ʬ.K.C1873
    /* renamed from: K  reason: contains not printable characters */
    public void m4875(C1873.AbstractC1874 r2) {
        super.m4840(r2);
        if (r2 instanceof C1886) {
            this.f6382 = (C1886) r2;
        }
    }

    public C1885(C1886 k) {
        if (k != null) {
            m4875(k);
        }
    }
}
