package com.seewo.libsvendors.factory;

import android.content.Context;
import com.seewo.libsvendors.inter.IEthernetManager;
import com.seewo.libsvendors.utils.BoardTypeUtils;
import com.seewo.libsvendors.utils.IEthernetConstant;
import com.seewo.libsvendors.vendor.hisi.ethernet.HiSiEthernetManager;
import com.seewo.libsvendors.vendor.mstar.ethernet.MStarEthernetManager;

/* JADX INFO: loaded from: classes.dex */
public class EthernetFactory {
    private EthernetFactory() {
    }

    public static IEthernetManager getEthernetManager(Context context) {
        if (BoardTypeUtils.is638Machine()) {
            return new MStarEthernetManager(context);
        }
        BoardTypeUtils.is3399Machine();
        return new HiSiEthernetManager(context);
    }

    public static void initEthernetConstant() {
        if (BoardTypeUtils.is3399Machine()) {
            init3399EthernetConstant();
        } else {
            initHisiEthernetConstant();
        }
    }

    private static void initHisiEthernetConstant() {
        IEthernetConstant.ETHERNET_STATE_CHANGED_ACTION = "android.net.ethernet.ETHERNET_STATE_CHANGE";
        IEthernetConstant.NETWORK_STATE_CHANGED_ACTION = "android.net.ethernet.STATE_CHANGE";
        IEthernetConstant.EXTRA_ETHERNET_STATE = "ethernet_state";
        IEthernetConstant.EXTRA_PREVIOUS_ETHERNET_STATE = "previous_ethernet_state";
        IEthernetConstant.ETHERNET_STATE_DISABLED = 0;
        IEthernetConstant.ETHERNET_STATE_ENABLED = 1;
        IEthernetConstant.ETHERNET_STATE_UNKNOWN = 2;
        IEthernetConstant.EVENT_INTERFACE_CONFIGURATION_SUCCEEDED = 10;
        IEthernetConstant.EVENT_HW_DISCONNECTED = 19;
    }

    private static void init3399EthernetConstant() {
        IEthernetConstant.ETHERNET_STATE_CHANGED_ACTION = "android.net.ethernet.ETHERNET_STATE_CHANGED";
        IEthernetConstant.EXTRA_ETHERNET_STATE = "ethernet_state";
        IEthernetConstant.ETHERNET_STATE_DISABLED = 0;
        IEthernetConstant.ETHERNET_STATE_ENABLED = 1;
        IEthernetConstant.ETHERNET_STATE_UNKNOWN = 2;
    }
}
