package defpackage;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import java.util.concurrent.Callable;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;

/* renamed from: ːᵣᵩ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final /* synthetic */ class C1975 implements InterfaceC2353, InterfaceC1777 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final /* synthetic */ Object f7946;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public final /* synthetic */ Object f7947;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f7948;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final /* synthetic */ Object f7949;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final /* synthetic */ long f7950;

    public /* synthetic */ C1975(C0975 c0975, Iterable iterable, C5456 c5456, long j) {
        this.f7948 = 2;
        this.f7946 = c0975;
        this.f7947 = iterable;
        this.f7949 = c5456;
        this.f7950 = j;
    }

    public /* synthetic */ C1975(ScheduledExecutorServiceC3827 scheduledExecutorServiceC3827, Object obj, long j, TimeUnit timeUnit, int i) {
        this.f7948 = i;
        this.f7946 = scheduledExecutorServiceC3827;
        this.f7947 = obj;
        this.f7950 = j;
        this.f7949 = timeUnit;
    }

    @Override // defpackage.InterfaceC1777
    /* renamed from: ᵥᵯˎ */
    public Object mo1598() {
        C0975 c0975 = (C0975) this.f7946;
        Iterable iterable = (Iterable) this.f7947;
        C5456 c5456 = (C5456) this.f7949;
        C3089 c3089 = (C3089) c0975.f4341;
        c3089.getClass();
        if (iterable.iterator().hasNext()) {
            String strConcat = "UPDATE events SET num_attempts = num_attempts + 1 WHERE _id in ".concat(C3089.m7416(iterable));
            SQLiteDatabase sQLiteDatabaseM7421 = c3089.m7421();
            sQLiteDatabaseM7421.beginTransaction();
            try {
                sQLiteDatabaseM7421.compileStatement(strConcat).execute();
                Cursor cursorRawQuery = sQLiteDatabaseM7421.rawQuery("SELECT COUNT(*), transport_name FROM events WHERE num_attempts >= 16 GROUP BY transport_name", null);
                while (cursorRawQuery.moveToNext()) {
                    try {
                        c3089.m7420(cursorRawQuery.getInt(0), EnumC2677.f10385, cursorRawQuery.getString(1));
                    } catch (Throwable th) {
                        cursorRawQuery.close();
                        throw th;
                    }
                }
                cursorRawQuery.close();
                sQLiteDatabaseM7421.compileStatement("DELETE FROM events WHERE num_attempts >= 16").execute();
                sQLiteDatabaseM7421.setTransactionSuccessful();
            } finally {
                sQLiteDatabaseM7421.endTransaction();
            }
        }
        c3089.m7417(new C1516(((InterfaceC0313) c0975.f4339).m1696() + this.f7950, c5456));
        return null;
    }

    @Override // defpackage.InterfaceC2353
    /* renamed from: ᵴᵳ */
    public ScheduledFuture mo2942(C2931 c2931) {
        int i = this.f7948;
        Object obj = this.f7949;
        long j = this.f7950;
        Object obj2 = this.f7947;
        ScheduledExecutorServiceC3827 scheduledExecutorServiceC3827 = (ScheduledExecutorServiceC3827) this.f7946;
        switch (i) {
            case 0:
                return scheduledExecutorServiceC3827.f14222.schedule(new RunnableC5061(scheduledExecutorServiceC3827, (Runnable) obj2, c2931, 1), j, (TimeUnit) obj);
            default:
                return scheduledExecutorServiceC3827.f14222.schedule(new CallableC1751(scheduledExecutorServiceC3827, (Callable) obj2, c2931, 0), j, (TimeUnit) obj);
        }
    }
}
