package o;

import android.net.ConnectivityManager;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.fS, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC1192fS {
    public static final /* synthetic */ int a = 0;

    static {
        C0669Zu.l("NetworkStateTracker");
    }

    public static final C0905cS a(ConnectivityManager connectivityManager) {
        NetworkCapabilities networkCapabilitiesA;
        NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
        boolean z = activeNetworkInfo != null && activeNetworkInfo.isConnected();
        try {
            networkCapabilitiesA = TR.a(connectivityManager, UR.a(connectivityManager));
        } catch (SecurityException unused) {
            C0669Zu.e().getClass();
        }
        boolean zB = networkCapabilitiesA != null ? TR.b(networkCapabilitiesA, 16) : false;
        return new C0905cS(z, zB, connectivityManager.isActiveNetworkMetered(), (activeNetworkInfo == null || activeNetworkInfo.isRoaming()) ? false : true);
    }
}
