package com.ironsource.environment;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.net.Uri;
import com.ironsource.mediationsdk.testSuite.sSLg.APGaqyXfpV;
import com.ironsource.v9;
/* loaded from: classes8.dex */
public class CrashProvider extends ContentProvider {

    /* renamed from: a  reason: collision with root package name */
    Context f2308a;
    v9 b;
    String c;
    Uri e;
    String h;
    String i;
    UriMatcher d = new UriMatcher(-1);
    final int f = 1;
    final int g = 2;
    final String j = "REPORTS";

    @Override // android.content.ContentProvider
    public int delete(Uri uri, String str, String[] strArr) {
        return 0;
    }

    @Override // android.content.ContentProvider
    public String getType(Uri uri) {
        int match = this.d.match(uri);
        if (match != 1) {
            if (match == 2) {
                return this.i;
            }
            throw new IllegalArgumentException("Invalid URI: " + uri);
        }
        return this.h;
    }

    @Override // android.content.ContentProvider
    public Uri insert(Uri uri, ContentValues contentValues) {
        return null;
    }

    @Override // android.content.ContentProvider
    public boolean onCreate() {
        this.f2308a = getContext();
        this.b = new v9(this.f2308a);
        this.c = this.f2308a.getPackageName();
        this.e = Uri.parse("content://" + this.c + APGaqyXfpV.AhFzg);
        this.h = "vnd.android.cursor.dir/CrashReporter.Reports";
        this.i = "vnd.android.cursor.item/CrashReporter/Reports";
        return true;
    }

    @Override // android.content.ContentProvider
    public Cursor query(Uri uri, String[] strArr, String str, String[] strArr2, String str2) {
        int match = this.d.match(uri);
        if (match != 1) {
            if (match == 2) {
                return v9.a(Integer.parseInt(uri.getLastPathSegment()));
            }
            throw new IllegalArgumentException("Invalid URI: " + uri);
        }
        return v9.c();
    }

    @Override // android.content.ContentProvider
    public int update(Uri uri, ContentValues contentValues, String str, String[] strArr) {
        return 0;
    }
}
