package o4;

import androidx.work.impl.WorkDatabase;
import java.util.Iterator;

/* JADX INFO: loaded from: classes.dex */
public final class b extends c {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ androidx.work.impl.o f31377b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ String f31378c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ boolean f31379d = false;

    public b(androidx.work.impl.o oVar, String str) {
        this.f31377b = oVar;
        this.f31378c = str;
    }

    @Override // o4.c
    public final void b() {
        androidx.work.impl.o oVar = this.f31377b;
        WorkDatabase workDatabase = oVar.f4625c;
        workDatabase.beginTransaction();
        try {
            Iterator it = ((n4.r) workDatabase.workSpecDao()).m(this.f31378c).iterator();
            while (it.hasNext()) {
                c.a(oVar, (String) it.next());
            }
            workDatabase.setTransactionSuccessful();
            workDatabase.endTransaction();
            if (this.f31379d) {
                androidx.work.impl.f.a(oVar.f4624b, oVar.f4625c, oVar.f4627e);
            }
        } catch (Throwable th) {
            workDatabase.endTransaction();
            throw th;
        }
    }
}
