package g5;

import android.content.Context;
import android.net.Uri;

/* JADX INFO: loaded from: classes.dex */
public final class w implements b0 {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Context f26234b;

    public w(Context context, int i10) {
        this.f26233a = i10;
        if (i10 != 1) {
            this.f26234b = context;
        } else {
            this.f26234b = context.getApplicationContext();
        }
    }

    @Override // g5.b0
    public final boolean a(Object obj) {
        int i10 = this.f26233a;
        switch (i10) {
            case 0:
                Uri uri = (Uri) obj;
                switch (i10) {
                    case 0:
                        return nb.g.H(uri);
                    default:
                        return nb.g.H(uri) && !uri.getPathSegments().contains("video");
                }
            default:
                Uri uri2 = (Uri) obj;
                switch (i10) {
                    case 0:
                        return nb.g.H(uri2);
                    default:
                        return nb.g.H(uri2) && !uri2.getPathSegments().contains("video");
                }
        }
    }

    public final a0 b(Uri uri, int i10, int i11, a5.l lVar) {
        int i12 = this.f26233a;
        Context context = this.f26234b;
        switch (i12) {
            case 0:
                return new a0(new s5.d(uri), new v(context, uri));
            default:
                if (i10 == Integer.MIN_VALUE || i11 == Integer.MIN_VALUE || i10 > 512 || i11 > 384) {
                    return null;
                }
                return new a0(new s5.d(uri), new b5.c(uri, new b5.e(com.bumptech.glide.c.a(context).f5555d.e(), new b5.a(context.getContentResolver()), com.bumptech.glide.c.a(context).f5556e, context.getContentResolver())));
        }
    }

    @Override // g5.b0
    public final /* bridge */ /* synthetic */ a0 buildLoadData(Object obj, int i10, int i11, a5.l lVar) {
        switch (this.f26233a) {
        }
        return b((Uri) obj, i10, i11, lVar);
    }
}
