package com.revenuecat.purchases.google.history;

import J4.c;
import com.google.android.recaptcha.internal.a;
import com.revenuecat.purchases.LogHandler;
import com.revenuecat.purchases.LogLevel;
import com.revenuecat.purchases.common.Config;
import com.revenuecat.purchases.common.LogWrapperKt;
import kotlin.jvm.internal.p;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
public final class PurchaseHistoryManager$connect$4$1$1 extends p implements c {
    final /* synthetic */ PurchaseHistoryManager this$0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public PurchaseHistoryManager$connect$4$1$1(PurchaseHistoryManager purchaseHistoryManager) {
        super(1);
        this.this$0 = purchaseHistoryManager;
    }

    @Override // J4.c
    public /* bridge */ /* synthetic */ Object invoke(Object obj) {
        invoke((Throwable) obj);
        return C3137A.f25453a;
    }

    public final void invoke(Throwable th) {
        LogLevel logLevel = LogLevel.DEBUG;
        LogHandler currentLogHandler = LogWrapperKt.getCurrentLogHandler();
        if (Config.INSTANCE.getLogLevel().compareTo(logLevel) <= 0) {
            a.u(logLevel, new StringBuilder("[Purchases] - "), currentLogHandler, "Connection cancelled, cleaning up service if needed");
        }
        this.this$0.cleanup();
    }
}
