package com.dowse.base.param;

import android.content.Context;

/* loaded from: ds_base_2.0.9_23030112.aar:classes.jar:com/dowse/base/param/NetType.class */
public enum NetType {
    SIM_1(0, "Inner 4G"),
    SIM_2(1, "Out 4G"),
    WIFI(2, "WiFi"),
    VPN(3, "VPN"),
    ETH(4, "ETH");
    
    private int net_type;
    private String name;

    NetType(int net_type, String name) {
        this.net_type = net_type;
        this.name = name;
    }

    public int getNet_type() {
        return this.net_type;
    }

    public void setNet_type(int net_type) {
        this.net_type = net_type;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static NetType getNetType(int sim) {
        NetType netType = null;
        if (sim == SIM_1.getNet_type()) {
            netType = SIM_1;
        } else if (sim == SIM_2.getNet_type()) {
            netType = SIM_2;
        } else if (sim == WIFI.getNet_type()) {
            netType = WIFI;
        } else if (sim == ETH.getNet_type()) {
            netType = ETH;
        }
        return netType;
    }

    public static int getSim(NetType netType) {
        int sim = SIM_1.getNet_type();
        if (netType != null) {
            sim = netType.getNet_type();
        }
        return sim;
    }

    public static String getBindEthName(Context context, int sim) {
        String bindEth = "eth0";
        /*
        if (sim == SIM_1.getNet_type()) {
            bindEth = NetUtil.getInner4GEthName(context);
        } else if (sim == SIM_2.getNet_type()) {
            bindEth = NetUtil.getOut4GEthName(context);
        } else if (sim == WIFI.getNet_type()) {
            bindEth = NetUtil.getWiFiName();
        } else if (sim == ETH.getNet_type()) {
            bindEth = NetUtil.getStaticEthName(context);
        }

         */
        return bindEth;
    }

    @Override // java.lang.Enum
    public String toString() {
        return "NetType{net_type=" + this.net_type + ", name='" + this.name + "'}";
    }
}
