得物.apk(点击下载) / DuImageLoaderView.java


package com.shizhuang.duapp.libs.duimageloaderview;

import a.f;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.widget.ImageView;
import androidx.core.content.ContextCompat;
import co.c;
import com.facebook.drawee.backends.pipeline.PipelineDraweeController;
import com.facebook.drawee.controller.AbstractDraweeController;
import com.facebook.drawee.drawable.MatrixDrawable;
import com.facebook.drawee.drawable.ScalingUtils;
import com.facebook.drawee.generic.GenericDraweeHierarchy;
import com.facebook.drawee.generic.PoizonImageHierarchyBuilder;
import com.facebook.drawee.interfaces.DraweeController;
import com.facebook.drawee.view.SimpleDraweeView;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.libs.duimageloaderview.loader.fresco.ScaleTypeFactory;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.libs.duimageloaderview.ui.IDelegate;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import kotlin.Deprecated;
import kotlin.Metadata;
import kotlin.ReplaceWith;
import kotlin.jvm.internal.Intrinsics;
import o5.i;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import p006do.b;
import pn.e;
import yn.n;

@Metadata(bv = {}, d1 = {"\u0000\\\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0016\u0018\u00002\u00020\u0001B\u0011\b\u0016\u0012\u0006\u0010\u001c\u001a\u00020\u001b¢\u0006\u0004\b\u001d\u0010\u001eB\u001b\b\u0016\u0012\u0006\u0010\u001c\u001a\u00020\u001b\u0012\b\u0010 \u001a\u0004\u0018\u00010\u001f¢\u0006\u0004\b\u001d\u0010!B#\b\u0016\u0012\u0006\u0010\u001c\u001a\u00020\u001b\u0012\b\u0010 \u001a\u0004\u0018\u00010\u001f\u0012\u0006\u0010\"\u001a\u00020\u000f¢\u0006\u0004\b\u001d\u0010#J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0007J\b\u0010\u0007\u001a\u00020\u0006H\u0007J\u000e\u0010\n\u001a\u00020\u00042\u0006\u0010\t\u001a\u00020\bJ\u0012\u0010\r\u001a\u00020\u00042\b\u0010\f\u001a\u0004\u0018\u00010\u000bH\u0017J\u0012\u0010\r\u001a\u00020\u00042\b\u0010\f\u001a\u0004\u0018\u00010\u000eH\u0017J\u0010\u0010\u0011\u001a\u00020\u00042\u0006\u0010\u0010\u001a\u00020\u000fH\u0017J\u0012\u0010\u0014\u001a\u00020\u00042\b\u0010\u0013\u001a\u0004\u0018\u00010\u0012H\u0017J\u000e\u0010\u0016\u001a\u00020\u00042\u0006\u0010\u0013\u001a\u00020\u0015J\u0012\u0010\u0019\u001a\u00020\u00042\b\u0010\u0018\u001a\u0004\u0018\u00010\u0017H\u0016J\b\u0010\u001a\u001a\u00020\u0017H\u0016¨\u0006$"}, d2 = {"Lcom/shizhuang/duapp/libs/duimageloaderview/DuImageLoaderView;", "Lcom/facebook/drawee/view/SimpleDraweeView;", "Lyn/n;", "wrapper", "", "setImageWrapper", "Lco/c;", "getUi", "", "autoPauseAnimation", "setAutoPauseAnimation", "Landroid/net/Uri;", "uri", "setImageURI", "", "", "resourceId", "setActualImageResource", "Landroid/widget/ImageView$ScaleType;", "scaleType", "setScaleType", "Lcom/shizhuang/duapp/libs/duimageloaderview/options/DuScaleType;", "setDrawableScaleType", "Landroid/graphics/Matrix;", "matrix", "setImageMatrix", "getImageMatrix", "Landroid/content/Context;", "context", "<init>", "(Landroid/content/Context;)V", "Landroid/util/AttributeSet;", "attrs", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "defStyle", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "poizon-image_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: DuImageLoaderView.kt */
public class DuImageLoaderView extends SimpleDraweeView {
    public static ChangeQuickRedirect changeQuickRedirect;
    public c b;

    /* renamed from: c  reason: collision with root package name */
    public boolean f9295c;

    /* compiled from: DuImageLoaderView.kt */
    public static final class a extends e {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ DuImageLoaderView f9296a;

        public a(DuImageLoaderView duImageLoaderView) {
            this.f9296a = duImageLoaderView;
        }

        @Override // pn.e, pn.a
        public void a(@Nullable Drawable drawable) {
            co.a E;
            if (!PatchProxy.proxy(new Object[]{drawable}, this, changeQuickRedirect, false, 32012, new Class[]{Drawable.class}, Void.TYPE).isSupported && (E = this.f9296a.getUi().E()) != null) {
                E.c(drawable);
            }
        }

        @Override // pn.e, pn.a
        public void b(@Nullable Drawable drawable) {
            co.a E;
            if (!PatchProxy.proxy(new Object[]{drawable}, this, changeQuickRedirect, false, 32010, new Class[]{Drawable.class}, Void.TYPE).isSupported && (E = this.f9296a.getUi().E()) != null) {
                E.d(drawable);
            }
        }

        @Override // pn.e, pn.a
        public void c(@Nullable Drawable drawable) {
            co.a E;
            if (!PatchProxy.proxy(new Object[]{drawable}, this, changeQuickRedirect, false, 32011, new Class[]{Drawable.class}, Void.TYPE).isSupported && (E = this.f9296a.getUi().E()) != null) {
                E.a(drawable);
            }
        }
    }

    public DuImageLoaderView(@NotNull Context context) {
        super(context);
        init(context, null);
    }

    private final void init(Context context, AttributeSet attributeSet) {
        float f;
        DuScaleType duScaleType;
        float f12;
        DisplayMetrics displayMetrics;
        if (!PatchProxy.proxy(new Object[]{context, attributeSet}, this, changeQuickRedirect, false, 31968, new Class[]{Context.class, AttributeSet.class}, Void.TYPE).isSupported) {
            if (attributeSet != null) {
                if (!PatchProxy.proxy(new Object[]{context, attributeSet}, this, changeQuickRedirect, false, 31982, new Class[]{Context.class, AttributeSet.class}, Void.TYPE).isSupported) {
                    TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, new int[]{R.attr.duAsRound, R.attr.duBackgroundImage, R.attr.duBorderColor, R.attr.duBorderWidth, R.attr.duCornerRadius, R.attr.duErrorImage, R.attr.duImageResource, R.attr.duOverlayImage, R.attr.duOverlayScaleType, R.attr.duPlaceHolder, R.attr.duRatio, R.attr.duRetryImage, R.attr.duScaleType});
                    float dimension = obtainStyledAttributes.getDimension(3, i.f36333a);
                    float dimension2 = obtainStyledAttributes.getDimension(4, i.f36333a);
                    int attributeResourceValue = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "src", 0);
                    if (attributeResourceValue > 0) {
                        try {
                            Drawable drawable = ContextCompat.getDrawable(context, attributeResourceValue);
                            if (drawable != null) {
                                f(drawable);
                            }
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                    Integer valueOf = Integer.valueOf(obtainStyledAttributes.getResourceId(1, 0));
                    Integer num = null;
                    if (!(valueOf.intValue() > 0)) {
                        valueOf = null;
                    }
                    if (valueOf != null) {
                        getUi().W(ContextCompat.getDrawable(context, valueOf.intValue()));
                    }
                    float f13 = (float) 0;
                    if (dimension2 > f13) {
                        getUi().R(dimension2);
                    }
                    Integer valueOf2 = Integer.valueOf(obtainStyledAttributes.getResourceId(5, 17170445));
                    if (!(valueOf2.intValue() > 0)) {
                        valueOf2 = null;
                    }
                    if (valueOf2 != null) {
                        getUi().c0(ContextCompat.getDrawable(context, valueOf2.intValue()));
                    }
                    Integer valueOf3 = Integer.valueOf(obtainStyledAttributes.getResourceId(6, 0));
                    if (!(valueOf3.intValue() > 0)) {
                        valueOf3 = null;
                    }
                    if (valueOf3 != null) {
                        int intValue = valueOf3.intValue();
                        c j = getUi();
                        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(intValue)}, j, c.changeQuickRedirect, false, 32964, new Class[]{Integer.TYPE}, c.class);
                        if (proxy.isSupported) {
                            c cVar = (c) proxy.result;
                        } else {
                            j.M.setImageResource(intValue);
                        }
                    }
                    Integer valueOf4 = Integer.valueOf(obtainStyledAttributes.getResourceId(7, 0));
                    if (!(valueOf4.intValue() > 0)) {
                        valueOf4 = null;
                    }
                    if (valueOf4 != null) {
                        getUi().h0(ContextCompat.getDrawable(context, valueOf4.intValue()));
                    }
                    Integer valueOf5 = Integer.valueOf(obtainStyledAttributes.getResourceId(9, 0));
                    if (!(valueOf5.intValue() > 0)) {
                        valueOf5 = null;
                    }
                    if (valueOf5 != null) {
                        getUi().l0(ContextCompat.getDrawable(context, valueOf5.intValue()));
                    }
                    Integer valueOf6 = Integer.valueOf(obtainStyledAttributes.getResourceId(11, 0));
                    if (!(valueOf6.intValue() > 0)) {
                        valueOf6 = null;
                    }
                    if (valueOf6 != null) {
                        int intValue2 = valueOf6.intValue();
                        c j12 = getUi();
                        Drawable drawable2 = ContextCompat.getDrawable(context, intValue2);
                        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{drawable2}, j12, c.changeQuickRedirect, false, 32948, new Class[]{Drawable.class}, c.class);
                        if (proxy2.isSupported) {
                            c cVar2 = (c) proxy2.result;
                        } else {
                            j12.w = drawable2;
                            j12.M.setErrorImage(drawable2);
                        }
                    }
                    Float valueOf7 = Float.valueOf(obtainStyledAttributes.getFloat(10, i.f36333a));
                    if (!(valueOf7.floatValue() > f13)) {
                        valueOf7 = null;
                    }
                    if (valueOf7 != null) {
                        getUi().m0(valueOf7.floatValue());
                    }
                    if (obtainStyledAttributes.getBoolean(0, false)) {
                        getUi().o0(true);
                    }
                    c j13 = getUi();
                    Integer valueOf8 = Integer.valueOf(obtainStyledAttributes.getInt(12, DuScaleType.FIT_CENTER.getValue()));
                    PatchProxyResult proxy3 = PatchProxy.proxy(new Object[]{valueOf8}, this, changeQuickRedirect, false, 31984, new Class[]{Integer.class}, DuScaleType.class);
                    if (!proxy3.isSupported) {
                        DuScaleType[] values = DuScaleType.values();
                        int length = values.length;
                        int i = 0;
                        while (true) {
                            if (i >= length) {
                                duScaleType = DuScaleType.FIT_CENTER;
                                break;
                            }
                            DuScaleType duScaleType2 = values[i];
                            int value = duScaleType2.getValue();
                            if (valueOf8 != null && value == valueOf8.intValue()) {
                                duScaleType = duScaleType2;
                                break;
                            }
                            i++;
                        }
                    } else {
                        duScaleType = (DuScaleType) proxy3.result;
                    }
                    j13.p0(duScaleType);
                    Integer valueOf9 = Integer.valueOf(obtainStyledAttributes.getColor(2, 0));
                    if (valueOf9.intValue() != 0) {
                        num = valueOf9;
                    }
                    if (num != null) {
                        getUi().X(num.intValue());
                    }
                    if (dimension > f13) {
                        c j14 = getUi();
                        Object[] objArr = {context, new Float(dimension)};
                        ChangeQuickRedirect changeQuickRedirect2 = eo.a.changeQuickRedirect;
                        Class cls = Float.TYPE;
                        PatchProxyResult proxy4 = PatchProxy.proxy(objArr, null, changeQuickRedirect2, true, 33075, new Class[]{Context.class, cls}, cls);
                        if (proxy4.isSupported) {
                            f12 = ((Float) proxy4.result).floatValue();
                        } else {
                            Resources resources = context.getResources();
                            f12 = dimension / ((resources == null || (displayMetrics = resources.getDisplayMetrics()) == null) ? i.f36333a : displayMetrics.density);
                        }
                        j14.Y(f12);
                    }
                    obtainStyledAttributes.recycle();
                }
            }
            c j15 = getUi();
            PatchProxyResult proxy5 = PatchProxy.proxy(new Object[0], j15, c.changeQuickRedirect, false, 32953, new Class[0], Float.TYPE);
            if (proxy5.isSupported) {
                f = ((Float) proxy5.result).floatValue();
            } else {
                f = j15.z;
            }
            setAspectRatio(f);
        }
    }

    public static /* synthetic */ void n(DuImageLoaderView duImageLoaderView, Drawable drawable, float f, Integer num, int i, Object obj) {
        if ((i & 2) != 0) {
            f = 1.0f;
        }
        duImageLoaderView.m(drawable, f, null);
    }

    public final GenericDraweeHierarchy a() {
        DuScaleType duScaleType;
        int i;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 31969, new Class[0], GenericDraweeHierarchy.class);
        if (proxy.isSupported) {
            return (GenericDraweeHierarchy) proxy.result;
        }
        ScaleTypeFactory a5 = ScaleTypeFactory.b.a();
        c j = getUi();
        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], j, c.changeQuickRedirect, false, 32947, new Class[0], DuScaleType.class);
        if (proxy2.isSupported) {
            duScaleType = (DuScaleType) proxy2.result;
        } else {
            duScaleType = j.y;
        }
        ScalingUtils.ScaleType a12 = a5.a(duScaleType);
        PoizonImageHierarchyBuilder poizonImageHierarchyBuilder = new PoizonImageHierarchyBuilder(getResources());
        c j12 = getUi();
        PatchProxyResult proxy3 = PatchProxy.proxy(new Object[0], j12, c.changeQuickRedirect, false, 32931, new Class[0], Integer.TYPE);
        if (proxy3.isSupported) {
            i = ((Integer) proxy3.result).intValue();
        } else {
            i = j12.D;
        }
        return poizonImageHierarchyBuilder.setFadeDuration(i).setPlaceholderImageScaleType(a12).setFailureImageScaleType(a12).setRetryImageScaleType(a12).setActualImageScaleType(a12).setProgressBarImageScaleType(a12).build();
    }

    public final c b(Context context) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context}, this, changeQuickRedirect, false, 31971, new Class[]{Context.class}, c.class);
        if (proxy.isSupported) {
            return (c) proxy.result;
        }
        c cVar = new c();
        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{this}, cVar, c.changeQuickRedirect, false, 32934, new Class[]{DuImageLoaderView.class}, c.class);
        if (proxy2.isSupported) {
            cVar = (c) proxy2.result;
        } else {
            cVar.f2827u = new WeakReference<>(this);
        }
        c b0 = cVar.j0(context, R.drawable.bg_def_color_shape).b0(context, Integer.valueOf((int) R.drawable.bg_def_color_shape));
        b bVar = new b(this);
        PatchProxyResult proxy3 = PatchProxy.proxy(new Object[]{bVar}, b0, c.changeQuickRedirect, false, 32921, new Class[]{IDelegate.class}, c.class);
        if (proxy3.isSupported) {
            return (c) proxy3.result;
        }
        b0.M = bVar;
        return b0;
    }

    @NotNull
    public final String c() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 31980, new Class[0], String.class);
        return proxy.isSupported ? (String) proxy.result : getUi().N();
    }

    public final boolean d() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 32003, new Class[0], Boolean.TYPE);
        return proxy.isSupported ? ((Boolean) proxy.result).booleanValue() : this.f9295c;
    }

    @Override // com.facebook.drawee.view.DraweeView
    public void doAttach() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 31974, new Class[0], Void.TYPE).isSupported) {
            super.doAttach();
            this.f9295c = true;
        }
    }

    @Override // com.facebook.drawee.view.DraweeView
    public void doDetach() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 31975, new Class[0], Void.TYPE).isSupported) {
            if (getUi().P()) {
                getUi().B(false);
            }
            super.doDetach();
            this.f9295c = false;
        }
    }

    public final void e(@Nullable Bitmap bitmap) {
        if (!PatchProxy.proxy(new Object[]{bitmap}, this, changeQuickRedirect, false, 31985, new Class[]{Bitmap.class}, Void.TYPE).isSupported) {
            if (bitmap != null) {
                super.setImageBitmap(bitmap);
            } else {
                setImageResource(R.drawable.shape_placeholder);
            }
        }
    }

    public final void f(@Nullable Drawable drawable) {
        if (!PatchProxy.proxy(new Object[]{drawable}, this, changeQuickRedirect, false, 31986, new Class[]{Drawable.class}, Void.TYPE).isSupported) {
            if (drawable != null) {
                super.setImageDrawable(drawable);
            } else {
                setImageResource(R.drawable.shape_placeholder);
            }
        }
    }

    @Deprecated(message = "", replaceWith = @ReplaceWith(expression = "loadWith(url ?: \"\").apply()", imports = {}))
    public void g(@Nullable String str) {
        c j = getUi();
        if (str == null) {
            str = "";
        }
        j.s0(str).x();
    }

    @NotNull
    public Matrix getImageMatrix() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 32006, new Class[0], Matrix.class);
        if (proxy.isSupported) {
            return (Matrix) proxy.result;
        }
        if (getController() instanceof PipelineDraweeController) {
            Field declaredField = AbstractDraweeController.class.getDeclaredField("mDrawable");
            declaredField.setAccessible(true);
            Object obj = declaredField.get(getController());
            if (obj instanceof MatrixDrawable) {
                return ((MatrixDrawable) obj).getMatrix();
            }
        }
        return super.getImageMatrix();
    }

    @NotNull
    public final c h(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 31987, new Class[]{Integer.TYPE}, c.class);
        if (proxy.isSupported) {
            return (c) proxy.result;
        }
        c j = getUi();
        StringBuilder h12 = f.h("res://");
        h12.append(getContext().getPackageName());
        h12.append('/');
        h12.append(i);
        j.s0(h12.toString());
        return getUi();
    }

    @NotNull
    public c i(@Nullable String str) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 31988, new Class[]{String.class}, c.class);
        if (proxy.isSupported) {
            return (c) proxy.result;
        }
        c j = getUi();
        if (str == null) {
            str = "";
        }
        j.s0(str);
        return getUi();
    }

    @Override // com.facebook.drawee.view.GenericDraweeView
    public void inflateHierarchy(@NotNull Context context, @Nullable AttributeSet attributeSet) {
        if (!PatchProxy.proxy(new Object[]{context, attributeSet}, this, changeQuickRedirect, false, 31970, new Class[]{Context.class, AttributeSet.class}, Void.TYPE).isSupported) {
            this.b = b(context);
            setHierarchy(a());
        }
    }

    @NotNull
    /* renamed from: j */
    public final c getUi() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 31979, new Class[0], c.class);
        if (proxy.isSupported) {
            return (c) proxy.result;
        }
        c cVar = this.b;
        if (cVar == null) {
            Intrinsics.throwUninitializedPropertyAccessException("mDuImageOptions");
        }
        return cVar;
    }

    public final void k() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 32002, new Class[0], Void.TYPE).isSupported) {
            setHierarchy(a());
            setController(null);
        }
    }

    public final void l() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 31972, new Class[0], Void.TYPE).isSupported) {
            this.b = b(getContext());
        }
    }

    public final void m(@NotNull Drawable drawable, float f, @Nullable Integer num) {
        int i = 0;
        if (!PatchProxy.proxy(new Object[]{drawable, new Float(f), num}, this, changeQuickRedirect, false, 32001, new Class[]{Drawable.class, Float.TYPE, Integer.class}, Void.TYPE).isSupported) {
            c j = getUi();
            if (num != null) {
                i = num.intValue();
            }
            j.i0(drawable, f, i);
        }
    }

    public void o() {
        Animatable animatable;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 31976, new Class[0], Void.TYPE).isSupported) {
            getUi().U(true);
            DraweeController controller = getController();
            if (controller != null && (animatable = controller.getAnimatable()) != null) {
                a aVar = new a(this);
                if (animatable instanceof com.shizhuang.duapp.libs.duimageloaderview.animation.du.a) {
                    com.shizhuang.duapp.libs.duimageloaderview.animation.du.a aVar2 = (com.shizhuang.duapp.libs.duimageloaderview.animation.du.a) animatable;
                    aVar2.setAnimationListener(aVar);
                    if (!PatchProxy.proxy(new Object[0], aVar2, com.shizhuang.duapp.libs.duimageloaderview.animation.du.a.changeQuickRedirect, false, 32171, new Class[0], Void.TYPE).isSupported) {
                        aVar2.d = false;
                        aVar2.f = 0;
                    }
                }
                if (animatable instanceof on.a) {
                    ((on.a) animatable).b(aVar);
                }
                animatable.start();
            }
        }
    }

    public void onDraw(@Nullable Canvas canvas) {
        if (!PatchProxy.proxy(new Object[]{canvas}, this, changeQuickRedirect, false, 31973, new Class[]{Canvas.class}, Void.TYPE).isSupported) {
            super.onDraw(canvas);
            if (!this.f9295c) {
                this.f9295c = true;
            }
        }
    }

    public void p() {
        Animatable animatable;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 31978, new Class[0], Void.TYPE).isSupported) {
            getUi().U(false);
            DraweeController controller = getController();
            if (controller != null && (animatable = controller.getAnimatable()) != null) {
                animatable.stop();
            }
        }
    }

    @Override // com.facebook.drawee.view.SimpleDraweeView
    @Deprecated(message = "Deprecated. This function would never working properly. use function load(String url) instant", replaceWith = @ReplaceWith(expression = "load(url)", imports = {}))
    public void setActualImageResource(int i) {
        super.setActualImageResource(i);
    }

    public final void setAutoPauseAnimation(boolean z) {
        if (!PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 31998, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
            getUi().U(z);
        }
    }

    public final void setDrawableScaleType(@NotNull DuScaleType duScaleType) {
        if (!PatchProxy.proxy(new Object[]{duScaleType}, this, changeQuickRedirect, false, 32000, new Class[]{DuScaleType.class}, Void.TYPE).isSupported) {
            getUi().p0(duScaleType);
        }
    }

    public void setImageMatrix(@Nullable Matrix matrix) {
        if (!PatchProxy.proxy(new Object[]{matrix}, this, changeQuickRedirect, false, 32005, new Class[]{Matrix.class}, Void.TYPE).isSupported) {
            if (getController() instanceof PipelineDraweeController) {
                Field declaredField = AbstractDraweeController.class.getDeclaredField("mDrawable");
                declaredField.setAccessible(true);
                Object obj = declaredField.get(getController());
                if (obj instanceof MatrixDrawable) {
                    ((MatrixDrawable) obj).setMatrix(matrix);
                    return;
                }
            }
            super.setImageMatrix(matrix);
        }
    }

    @Override // com.facebook.drawee.view.DraweeView, com.facebook.drawee.view.SimpleDraweeView
    @Deprecated(message = "Deprecated. This function would never working properly. use function load(String url) instant", replaceWith = @ReplaceWith(expression = "load(url)", imports = {}))
    public void setImageURI(@Nullable Uri uri) {
        super.setImageURI(uri);
    }

    @Override // com.facebook.drawee.view.SimpleDraweeView
    @Deprecated(message = "Deprecated. This function would never working properly. use function load(String url) instant", replaceWith = @ReplaceWith(expression = "load(url)", imports = {}))
    public void setImageURI(@Nullable Uri uri, @Nullable Object obj) {
    }

    @Override // com.facebook.drawee.view.SimpleDraweeView
    @Deprecated(message = "Deprecated. This function would never working properly. use function load(String url) instant", replaceWith = @ReplaceWith(expression = "load(url)", imports = {}))
    public void setImageURI(@Nullable String str) {
    }

    @Override // com.facebook.drawee.view.SimpleDraweeView
    @Deprecated(message = "Deprecated. This function would never working properly. use function load(String url) instant", replaceWith = @ReplaceWith(expression = "load(url)", imports = {}))
    public void setImageURI(@Nullable String str, @Nullable Object obj) {
    }

    @Deprecated(message = "")
    public final void setImageWrapper(@NotNull n nVar) {
        throw null;
    }

    @Deprecated(message = "Deprecated. This function would never working properly. use function load(String url) instant", replaceWith = @ReplaceWith(expression = "setDrawableScaleType", imports = {}))
    public void setScaleType(@Nullable ImageView.ScaleType scaleType) {
        super.setScaleType(scaleType);
    }

    @Override // com.facebook.drawee.view.SimpleDraweeView
    @Deprecated(message = "Deprecated. This function would never working properly. use function load(String url) instant", replaceWith = @ReplaceWith(expression = "load(url)", imports = {}))
    public void setActualImageResource(int i, @Nullable Object obj) {
        super.setActualImageResource(i, obj);
    }

    public DuImageLoaderView(@NotNull Context context, @Nullable AttributeSet attributeSet) {
        super(context, attributeSet);
        init(context, attributeSet);
    }

    public DuImageLoaderView(@NotNull Context context, @Nullable AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        init(context, attributeSet);
    }
}