package o;

import android.graphics.Canvas;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.st, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2474st extends AbstractC2811wV implements Q10 {
    public final Drawable q;
    public final MV r = AbstractC0752ap.X(0);
    public final MV s;
    public final C1014dc0 t;

    public C2474st(Drawable drawable) {
        this.q = drawable;
        Object obj = AbstractC2569tt.a;
        this.s = AbstractC0752ap.X(new T80((drawable.getIntrinsicWidth() < 0 || drawable.getIntrinsicHeight() < 0) ? 9205357640488583168L : C1884mi0.e(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight())));
        this.t = new C1014dc0(new U4(6, this));
        if (drawable.getIntrinsicWidth() < 0 || drawable.getIntrinsicHeight() < 0) {
            return;
        }
        drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // o.Q10
    public final void a() {
        Drawable.Callback callback = (Drawable.Callback) this.t.getValue();
        Drawable drawable = this.q;
        drawable.setCallback(callback);
        drawable.setVisible(true, true);
        if (drawable instanceof Animatable) {
            ((Animatable) drawable).start();
        }
    }

    @Override // o.AbstractC2811wV
    public final boolean b(float f) {
        this.q.setAlpha(AbstractC0940cn0.k(C2887xC.D(f * 255), 0, 255));
        return true;
    }

    @Override // o.AbstractC2811wV
    public final boolean c(C0444Rd c0444Rd) {
        this.q.setColorFilter(c0444Rd != null ? c0444Rd.a : null);
        return true;
    }

    @Override // o.AbstractC2811wV
    public final void d(EnumC1280gK enumC1280gK) {
        int i;
        int iOrdinal = enumC1280gK.ordinal();
        if (iOrdinal != 0) {
            i = 1;
            if (iOrdinal != 1) {
                throw new C2170pj();
            }
        } else {
            i = 0;
        }
        this.q.setLayoutDirection(i);
    }

    @Override // o.Q10
    public final void e() {
        h();
    }

    @Override // o.AbstractC2811wV
    public final long g() {
        return ((T80) this.s.getValue()).a;
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // o.Q10
    public final void h() {
        Drawable drawable = this.q;
        if (drawable instanceof Animatable) {
            ((Animatable) drawable).stop();
        }
        drawable.setVisible(false, false);
        drawable.setCallback(null);
    }

    @Override // o.AbstractC2811wV
    public final void i(C2610uK c2610uK) {
        C3113zg c3113zg = c2610uK.l;
        InterfaceC2923xg interfaceC2923xgX = c3113zg.m.x();
        ((Number) this.r.getValue()).intValue();
        int iD = C2887xC.D(T80.d(c3113zg.f()));
        int iD2 = C2887xC.D(T80.b(c3113zg.f()));
        Drawable drawable = this.q;
        drawable.setBounds(0, 0, iD, iD2);
        try {
            interfaceC2923xgX.n();
            Canvas canvas = U2.a;
            drawable.draw(((T2) interfaceC2923xgX).a);
        } finally {
            interfaceC2923xgX.k();
        }
    }
}
