package androidx.work.impl;

import android.content.Context;
import androidx.room.RoomDatabase;
import androidx.room.r0;
import com.google.android.gms.internal.atv_ads_framework.d1;
import java.util.HashMap;
import n4.t;
import xyz.stream.api.a0;
import xyz.stream.utils.e0;

/* JADX INFO: loaded from: classes.dex */
public final class WorkDatabase_Impl extends WorkDatabase {
    private volatile n4.b _dependencyDao;
    private volatile n4.e _preferenceDao;
    private volatile n4.f _rawWorkInfoDao;
    private volatile n4.h _systemIdInfoDao;
    private volatile n4.j _workNameDao;
    private volatile n4.l _workProgressDao;
    private volatile n4.p _workSpecDao;
    private volatile t _workTagDao;

    @Override // androidx.room.RoomDatabase
    public void clearAllTables() {
        super.assertNotMainThread();
        l3.b bVarC = super.getOpenHelper().c();
        try {
            super.beginTransaction();
            bVarC.j("PRAGMA defer_foreign_keys = TRUE");
            bVarC.j("DELETE FROM `Dependency`");
            bVarC.j("DELETE FROM `WorkSpec`");
            bVarC.j("DELETE FROM `WorkTag`");
            bVarC.j("DELETE FROM `SystemIdInfo`");
            bVarC.j("DELETE FROM `WorkName`");
            bVarC.j("DELETE FROM `WorkProgress`");
            bVarC.j("DELETE FROM `Preference`");
            super.setTransactionSuccessful();
        } finally {
            super.endTransaction();
            bVarC.y("PRAGMA wal_checkpoint(FULL)").close();
            if (!bVarC.B()) {
                bVarC.j("VACUUM");
            }
        }
    }

    @Override // androidx.room.RoomDatabase
    public androidx.room.q createInvalidationTracker() {
        return new androidx.room.q(this, new HashMap(0), new HashMap(0), "Dependency", "WorkSpec", "WorkTag", "SystemIdInfo", "WorkName", "WorkProgress", "Preference");
    }

    @Override // androidx.room.RoomDatabase
    public l3.g createOpenHelper(androidx.room.e eVar) {
        r0 r0Var = new r0(eVar, new n(this));
        Context context = eVar.f4060a;
        nb.g.i(context, "context");
        l3.d dVar = new l3.d(context);
        dVar.f30104b = eVar.f4061b;
        dVar.f30105c = r0Var;
        return eVar.f4062c.b(dVar.a());
    }

    @Override // androidx.work.impl.WorkDatabase
    public n4.b dependencyDao() {
        n4.b bVar;
        if (this._dependencyDao != null) {
            return this._dependencyDao;
        }
        synchronized (this) {
            try {
                if (this._dependencyDao == null) {
                    this._dependencyDao = new e0(this, 4);
                }
                bVar = this._dependencyDao;
            } catch (Throwable th) {
                throw th;
            }
        }
        return bVar;
    }

    @Override // androidx.work.impl.WorkDatabase
    public n4.e preferenceDao() {
        n4.e eVar;
        if (this._preferenceDao != null) {
            return this._preferenceDao;
        }
        synchronized (this) {
            try {
                if (this._preferenceDao == null) {
                    this._preferenceDao = new d1(this, 5);
                }
                eVar = this._preferenceDao;
            } catch (Throwable th) {
                throw th;
            }
        }
        return eVar;
    }

    @Override // androidx.work.impl.WorkDatabase
    public n4.f rawWorkInfoDao() {
        n4.f fVar;
        if (this._rawWorkInfoDao != null) {
            return this._rawWorkInfoDao;
        }
        synchronized (this) {
            try {
                if (this._rawWorkInfoDao == null) {
                    this._rawWorkInfoDao = new a0(this, 11);
                }
                fVar = this._rawWorkInfoDao;
            } catch (Throwable th) {
                throw th;
            }
        }
        return fVar;
    }

    @Override // androidx.work.impl.WorkDatabase
    public n4.h systemIdInfoDao() {
        n4.h hVar;
        if (this._systemIdInfoDao != null) {
            return this._systemIdInfoDao;
        }
        synchronized (this) {
            try {
                if (this._systemIdInfoDao == null) {
                    this._systemIdInfoDao = new xyz.stream.utils.t((RoomDatabase) this);
                }
                hVar = this._systemIdInfoDao;
            } catch (Throwable th) {
                throw th;
            }
        }
        return hVar;
    }

    @Override // androidx.work.impl.WorkDatabase
    public n4.j workNameDao() {
        n4.j jVar;
        if (this._workNameDao != null) {
            return this._workNameDao;
        }
        synchronized (this) {
            try {
                if (this._workNameDao == null) {
                    this._workNameDao = new fe.h(this);
                }
                jVar = this._workNameDao;
            } catch (Throwable th) {
                throw th;
            }
        }
        return jVar;
    }

    @Override // androidx.work.impl.WorkDatabase
    public n4.l workProgressDao() {
        n4.l lVar;
        if (this._workProgressDao != null) {
            return this._workProgressDao;
        }
        synchronized (this) {
            try {
                if (this._workProgressDao == null) {
                    u.e eVar = new u.e();
                    eVar.f33125a = this;
                    eVar.f33126b = new n4.c(eVar, this, 4);
                    eVar.f33127c = new n4.m(eVar, this, 0);
                    eVar.f33128d = new n4.m(eVar, this, 1);
                    this._workProgressDao = eVar;
                }
                lVar = this._workProgressDao;
            } catch (Throwable th) {
                throw th;
            }
        }
        return lVar;
    }

    @Override // androidx.work.impl.WorkDatabase
    public n4.p workSpecDao() {
        n4.p pVar;
        if (this._workSpecDao != null) {
            return this._workSpecDao;
        }
        synchronized (this) {
            try {
                if (this._workSpecDao == null) {
                    this._workSpecDao = new n4.r(this);
                }
                pVar = this._workSpecDao;
            } catch (Throwable th) {
                throw th;
            }
        }
        return pVar;
    }

    @Override // androidx.work.impl.WorkDatabase
    public t workTagDao() {
        t tVar;
        if (this._workTagDao != null) {
            return this._workTagDao;
        }
        synchronized (this) {
            try {
                if (this._workTagDao == null) {
                    this._workTagDao = new xyz.stream.utils.f(this);
                }
                tVar = this._workTagDao;
            } catch (Throwable th) {
                throw th;
            }
        }
        return tVar;
    }
}
