package androidx.work;

import android.content.Context;
import java.util.Collections;
import java.util.List;
import o.AbstractC2841wm0;
import o.C0669Zu;
import o.C1414hl;
import o.C2651um0;
import o.InterfaceC1848mH;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class WorkManagerInitializer implements InterfaceC1848mH {
    static {
        C0669Zu.l("WrkMgrInitializer");
    }

    @Override // o.InterfaceC1848mH
    public final List a() {
        return Collections.EMPTY_LIST;
    }

    @Override // o.InterfaceC1848mH
    public final Object b(Context context) {
        C0669Zu.e().getClass();
        C1414hl c1414hl = new C1414hl();
        synchronized (C2651um0.w) {
            try {
                C2651um0 c2651um0 = C2651um0.u;
                if (c2651um0 != null && C2651um0.v != null) {
                    throw new IllegalStateException("WorkManager is already initialized.  Did you try to initialize it manually without disabling WorkManagerInitializer? See WorkManager#initialize(Context, Configuration) or the class level Javadoc for more information.");
                }
                if (c2651um0 == null) {
                    Context applicationContext = context.getApplicationContext();
                    if (C2651um0.v == null) {
                        C2651um0.v = AbstractC2841wm0.p(applicationContext, c1414hl);
                    }
                    C2651um0.u = C2651um0.v;
                }
            } catch (Throwable th) {
                throw th;
            }
        }
        return C2651um0.H(context);
    }
}
