package defpackage;

import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteTransactionListener;
import android.os.CancellationSignal;
import io.flutter.plugins.sharedpreferences.f;
import java.lang.reflect.Method;
import sd.a;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class c implements a {

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

    @Override // sd.a
    public final Object invoke() {
        Class<?> returnType;
        switch (this.f4856a) {
            case 0:
                return new h(0);
            case 1:
                return Boolean.TRUE;
            case 2:
                String[] strArr = m3.c.f30348b;
                try {
                    Method declaredMethod = SQLiteDatabase.class.getDeclaredMethod("getThreadSession", new Class[0]);
                    declaredMethod.setAccessible(true);
                    return declaredMethod;
                } catch (Throwable unused) {
                    return null;
                }
            case 3:
                try {
                    Method method = (Method) m3.c.f30349c.getValue();
                    if (method == null || (returnType = method.getReturnType()) == null) {
                        return null;
                    }
                    Class<?> cls = Integer.TYPE;
                    return returnType.getDeclaredMethod("beginTransaction", cls, SQLiteTransactionListener.class, cls, CancellationSignal.class);
                } catch (Throwable unused2) {
                    return null;
                }
            default:
                f fVar = f.f28286a;
                return new h(1);
        }
    }
}
