- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
112 lines
4.1 KiB
Java
112 lines
4.1 KiB
Java
package com.facebook.appevents.iap;
|
|
|
|
import android.content.Context;
|
|
import com.facebook.internal.instrument.crashshield.CrashShieldHandler;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.Method;
|
|
import java.util.Arrays;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class InAppPurchaseUtils {
|
|
public static final InAppPurchaseUtils INSTANCE = new InAppPurchaseUtils();
|
|
|
|
private InAppPurchaseUtils() {
|
|
}
|
|
|
|
public static final Class<?> getClass(String className) {
|
|
if (CrashShieldHandler.isObjectCrashing(InAppPurchaseUtils.class)) {
|
|
return null;
|
|
}
|
|
try {
|
|
Intrinsics.checkNotNullParameter(className, "className");
|
|
try {
|
|
return Class.forName(className);
|
|
} catch (ClassNotFoundException unused) {
|
|
return null;
|
|
}
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, InAppPurchaseUtils.class);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static final Method getMethod(Class<?> clazz, String methodName, Class<?>... args) {
|
|
if (CrashShieldHandler.isObjectCrashing(InAppPurchaseUtils.class)) {
|
|
return null;
|
|
}
|
|
try {
|
|
Intrinsics.checkNotNullParameter(clazz, "clazz");
|
|
Intrinsics.checkNotNullParameter(methodName, "methodName");
|
|
Intrinsics.checkNotNullParameter(args, "args");
|
|
try {
|
|
return clazz.getMethod(methodName, (Class[]) Arrays.copyOf(args, args.length));
|
|
} catch (NoSuchMethodException unused) {
|
|
return null;
|
|
}
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, InAppPurchaseUtils.class);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static final Method getDeclaredMethod$facebook_core_release(Class<?> clazz, String methodName, Class<?>... args) {
|
|
if (CrashShieldHandler.isObjectCrashing(InAppPurchaseUtils.class)) {
|
|
return null;
|
|
}
|
|
try {
|
|
Intrinsics.checkNotNullParameter(clazz, "clazz");
|
|
Intrinsics.checkNotNullParameter(methodName, "methodName");
|
|
Intrinsics.checkNotNullParameter(args, "args");
|
|
try {
|
|
return clazz.getDeclaredMethod(methodName, (Class[]) Arrays.copyOf(args, args.length));
|
|
} catch (NoSuchMethodException unused) {
|
|
return null;
|
|
}
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, InAppPurchaseUtils.class);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static final Object invokeMethod(Class<?> clazz, Method method, Object obj, Object... args) {
|
|
if (CrashShieldHandler.isObjectCrashing(InAppPurchaseUtils.class)) {
|
|
return null;
|
|
}
|
|
try {
|
|
Intrinsics.checkNotNullParameter(clazz, "clazz");
|
|
Intrinsics.checkNotNullParameter(method, "method");
|
|
Intrinsics.checkNotNullParameter(args, "args");
|
|
if (obj != null) {
|
|
obj = clazz.cast(obj);
|
|
}
|
|
try {
|
|
return method.invoke(obj, Arrays.copyOf(args, args.length));
|
|
} catch (IllegalAccessException | InvocationTargetException unused) {
|
|
return null;
|
|
}
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, InAppPurchaseUtils.class);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static final Class<?> getClassFromContext$facebook_core_release(Context context, String className) {
|
|
if (CrashShieldHandler.isObjectCrashing(InAppPurchaseUtils.class)) {
|
|
return null;
|
|
}
|
|
try {
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
Intrinsics.checkNotNullParameter(className, "className");
|
|
try {
|
|
return context.getClassLoader().loadClass(className);
|
|
} catch (ClassNotFoundException unused) {
|
|
return null;
|
|
}
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, InAppPurchaseUtils.class);
|
|
return null;
|
|
}
|
|
}
|
|
}
|