package com.google.android.gms.internal.common;

import androidx.annotation.Nullable;
import java.lang.reflect.InvocationTargetException;

/* JADX INFO: loaded from: classes2.dex */
public abstract class h {
    @Nullable
    public static Object zza(Class cls, String str, g... gVarArr) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        return zzc(cls, "isIsolated", null, false, gVarArr);
    }

    @Nullable
    public static Object zzb(String str, String str2, ClassLoader classLoader, g... gVarArr) throws IllegalAccessException, NoSuchMethodException, ClassNotFoundException, InvocationTargetException {
        return zzc(classLoader.loadClass("com.google.android.gms.common.security.ProviderInstallerImpl"), "reportRequestStats2", null, false, gVarArr);
    }

    @Nullable
    private static Object zzc(Class cls, String str, @Nullable Object obj, boolean z10, g... gVarArr) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        int length = gVarArr.length;
        Class<?>[] clsArr = new Class[length];
        Object[] objArr = new Object[length];
        for (int i10 = 0; i10 < gVarArr.length; i10++) {
            g gVar = gVarArr[i10];
            gVar.getClass();
            clsArr[i10] = gVar.f20083a;
            objArr[i10] = gVarArr[i10].zzd();
        }
        return cls.getDeclaredMethod(str, clsArr).invoke(null, objArr);
    }
}
