- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
89 lines
3.9 KiB
Java
89 lines
3.9 KiB
Java
package com.facebook.appevents.iap;
|
|
|
|
import android.content.Context;
|
|
import androidx.annotation.RestrictTo;
|
|
import com.facebook.appevents.iap.InAppPurchaseBillingClientWrapper;
|
|
import com.facebook.internal.instrument.crashshield.CrashShieldHandler;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
|
|
/* loaded from: classes2.dex */
|
|
public final class InAppPurchaseAutoLogger {
|
|
private static final String BILLING_CLIENT_PURCHASE_NAME = "com.android.billingclient.api.Purchase";
|
|
public static final InAppPurchaseAutoLogger INSTANCE = new InAppPurchaseAutoLogger();
|
|
|
|
private InAppPurchaseAutoLogger() {
|
|
}
|
|
|
|
public static final void startIapLogging(Context context) {
|
|
InAppPurchaseBillingClientWrapper.Companion companion;
|
|
InAppPurchaseBillingClientWrapper orCreateInstance;
|
|
if (CrashShieldHandler.isObjectCrashing(InAppPurchaseAutoLogger.class)) {
|
|
return;
|
|
}
|
|
try {
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
if (InAppPurchaseUtils.getClass(BILLING_CLIENT_PURCHASE_NAME) == null || (orCreateInstance = (companion = InAppPurchaseBillingClientWrapper.Companion).getOrCreateInstance(context)) == null || !companion.isServiceConnected().get()) {
|
|
return;
|
|
}
|
|
if (InAppPurchaseLoggerManager.eligibleQueryPurchaseHistory()) {
|
|
orCreateInstance.queryPurchaseHistory("inapp", new Runnable() { // from class: com.facebook.appevents.iap.InAppPurchaseAutoLogger$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
InAppPurchaseAutoLogger.m500startIapLogging$lambda0();
|
|
}
|
|
});
|
|
} else {
|
|
orCreateInstance.queryPurchase("inapp", new Runnable() { // from class: com.facebook.appevents.iap.InAppPurchaseAutoLogger$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
InAppPurchaseAutoLogger.m501startIapLogging$lambda1();
|
|
}
|
|
});
|
|
}
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, InAppPurchaseAutoLogger.class);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
/* renamed from: startIapLogging$lambda-0, reason: not valid java name */
|
|
public static final void m500startIapLogging$lambda0() {
|
|
if (CrashShieldHandler.isObjectCrashing(InAppPurchaseAutoLogger.class)) {
|
|
return;
|
|
}
|
|
try {
|
|
INSTANCE.logPurchase();
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, InAppPurchaseAutoLogger.class);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
/* renamed from: startIapLogging$lambda-1, reason: not valid java name */
|
|
public static final void m501startIapLogging$lambda1() {
|
|
if (CrashShieldHandler.isObjectCrashing(InAppPurchaseAutoLogger.class)) {
|
|
return;
|
|
}
|
|
try {
|
|
INSTANCE.logPurchase();
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, InAppPurchaseAutoLogger.class);
|
|
}
|
|
}
|
|
|
|
private final void logPurchase() {
|
|
if (CrashShieldHandler.isObjectCrashing(this)) {
|
|
return;
|
|
}
|
|
try {
|
|
InAppPurchaseLoggerManager inAppPurchaseLoggerManager = InAppPurchaseLoggerManager.INSTANCE;
|
|
InAppPurchaseBillingClientWrapper.Companion companion = InAppPurchaseBillingClientWrapper.Companion;
|
|
InAppPurchaseLoggerManager.filterPurchaseLogging(companion.getPurchaseDetailsMap(), companion.getSkuDetailsMap());
|
|
companion.getPurchaseDetailsMap().clear();
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, this);
|
|
}
|
|
}
|
|
}
|