package defpackage;

import android.content.Context;
import android.net.ConnectivityManager;
import androidx.media3.container.NalUnitUtil;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes.dex */
@l18
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001¨\u0006\u0003"}, d2 = {"Lcn6;", "Lzc1;", "Lan6;", "work-runtime_release"}, k = 1, mv = {1, 8, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
public final class cn6 extends zc1<an6> {
    public final ConnectivityManager f;
    public final bn6 g;

    public cn6(Context context, qsa qsaVar) {
        super(context, qsaVar);
        Object systemService = this.b.getSystemService("connectivity");
        cr4.e(systemService, "null cannot be cast to non-null type android.net.ConnectivityManager");
        this.f = (ConnectivityManager) systemService;
        this.g = new bn6(this);
    }

    @Override // defpackage.zc1
    public final Object a() {
        return dn6.a(this.f);
    }

    @Override // defpackage.zc1
    public final void c() {
        try {
            eh5 eh5VarC = eh5.c();
            String str = dn6.a;
            eh5VarC.getClass();
            nk6.a(this.f, this.g);
        } catch (IllegalArgumentException e) {
            eh5.c().b(dn6.a, "Received exception while registering network callback", e);
        } catch (SecurityException e2) {
            eh5.c().b(dn6.a, "Received exception while registering network callback", e2);
        }
    }

    @Override // defpackage.zc1
    public final void d() {
        try {
            eh5 eh5VarC = eh5.c();
            String str = dn6.a;
            eh5VarC.getClass();
            lk6.c(this.f, this.g);
        } catch (IllegalArgumentException e) {
            eh5.c().b(dn6.a, "Received exception while unregistering network callback", e);
        } catch (SecurityException e2) {
            eh5.c().b(dn6.a, "Received exception while unregistering network callback", e2);
        }
    }
}
