package o; import android.content.Context; import android.content.UriMatcher; import android.net.Uri; import android.provider.ContactsContract; /* loaded from: classes.dex */ public final class fNG extends AbstractC12987fNZ { private static final UriMatcher e; private final Context b; static { UriMatcher uriMatcher = new UriMatcher(-1); e = uriMatcher; uriMatcher.addURI("com.android.contacts", "contacts/lookup/*/#", 1); uriMatcher.addURI("com.android.contacts", "contacts/lookup/*", 1); uriMatcher.addURI("com.android.contacts", "contacts/#/photo", 2); uriMatcher.addURI("com.android.contacts", "contacts/#", 3); uriMatcher.addURI("com.android.contacts", "display_photo/#", 4); } public fNG(Context context) { this.b = context; } @Override // o.AbstractC12987fNZ public final boolean d(fNW fnw) { Uri uri = fnw.r; return "content".equals(uri.getScheme()) && ContactsContract.Contacts.CONTENT_URI.getHost().equals(uri.getHost()) && e.match(fnw.r) != -1; } /* JADX WARN: Removed duplicated region for block: B:14:0x003f A[RETURN] */ /* JADX WARN: Removed duplicated region for block: B:15:0x0040 */ @Override // o.AbstractC12987fNZ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final o.AbstractC12987fNZ.Sts c(o.fNW r5, int r6) throws java.io.IOException { /* r4 = this; android.content.Context r6 = r4.b android.content.ContentResolver r6 = r6.getContentResolver() android.net.Uri r5 = r5.r android.content.UriMatcher r0 = o.fNG.e int r0 = r0.match(r5) r1 = 0 r2 = 1 if (r0 == r2) goto L31 r3 = 2 if (r0 == r3) goto L2c r3 = 3 if (r0 == r3) goto L39 r2 = 4 if (r0 != r2) goto L1c goto L2c L1c: java.lang.IllegalStateException r6 = new java.lang.IllegalStateException java.lang.String r0 = "Invalid uri: " java.lang.String r5 = java.lang.String.valueOf(r5) java.lang.String r5 = r0.concat(r5) r6.(r5) throw r6 L2c: java.io.InputStream r5 = r6.openInputStream(r5) goto L3d L31: android.net.Uri r5 = android.provider.ContactsContract.Contacts.lookupContact(r6, r5) if (r5 != 0) goto L39 r5 = r1 goto L3d L39: java.io.InputStream r5 = android.provider.ContactsContract.Contacts.openContactPhotoInputStream(r6, r5, r2) L3d: if (r5 != 0) goto L40 return r1 L40: o.fNZ$Sts r6 = new o.fNZ$Sts o.giD r5 = o.C15160gio.e(r5) com.squareup.picasso.Picasso$HBt r0 = com.squareup.picasso.Picasso.HBt.DISK r6.(r5, r0) return r6 */ throw new UnsupportedOperationException("Method not decompiled: o.fNG.c(o.fNW, int):o.fNZ$Sts"); } }