package pl.droidsonroids.gif;

import android.util.AttributeSet;
import android.widget.ImageView;

/* JADX INFO: loaded from: classes3.dex */
public final class j extends androidx.browser.trusted.f {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f32044c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f32045d;

    public j(ImageView imageView, AttributeSet attributeSet, int i10) {
        super(imageView, attributeSet, i10);
        this.f32044c = a(imageView, attributeSet, true);
        this.f32045d = a(imageView, attributeSet, false);
    }

    public static int a(ImageView imageView, AttributeSet attributeSet, boolean z10) {
        int attributeResourceValue = attributeSet.getAttributeResourceValue("http://schemas.android.com/apk/res/android", z10 ? "src" : "background", 0);
        if (attributeResourceValue > 0) {
            if (k.f32046a.contains(imageView.getResources().getResourceTypeName(attributeResourceValue)) && !k.d(imageView, z10, attributeResourceValue)) {
                return attributeResourceValue;
            }
        }
        return 0;
    }

    public j() {
        super(3);
        this.f32044c = 0;
        this.f32045d = 0;
    }
}
