package s5;

import A6.n;
import G6.i;
import O6.p;
import Z6.InterfaceC0382w;
import android.content.Context;
import android.graphics.Bitmap;
import com.google.android.gms.internal.measurement.C1;
import java.io.ByteArrayOutputStream;
import v0.AbstractC1664c;

/* JADX INFO: renamed from: s5.c, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1524c extends i implements p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final /* synthetic */ DialogC1526e f16883u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ int f16884v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C1524c(DialogC1526e dialogC1526e, int i, E6.d dVar) {
        super(2, dVar);
        this.f16883u = dialogC1526e;
        this.f16884v = i;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((C1524c) m((E6.d) obj2, (InterfaceC0382w) obj)).p(n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new C1524c(this.f16883u, this.f16884v, dVar);
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        Object objJ;
        C1.N(obj);
        Context context = this.f16883u.getContext();
        int i = this.f16884v;
        if (context == null) {
            return null;
        }
        try {
            Bitmap bitmapC = AbstractC1664c.C(context, i);
            if (bitmapC == null) {
                objJ = null;
            } else {
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                bitmapC.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
                objJ = byteArrayOutputStream.toByteArray();
            }
        } catch (Throwable th) {
            objJ = C1.j(th);
        }
        return (byte[]) (objJ instanceof A6.i ? null : objJ);
    }
}
