package com.ifpdos.autotest.n0;

import android.util.Log;
import com.ifpdos.autotest.model.EthernetConfig;
import d.n;
import d.n0.c.s;
import d.n0.c.t;

/* JADX INFO: compiled from: EthernetDataHelper.kt */
/* JADX INFO: loaded from: classes.dex */
@n
public final class h {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final h f2250a = new h();

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private static final d.i f2251b = d.k.b(a.f2252d);

    /* JADX INFO: compiled from: EthernetDataHelper.kt */
    @n
    static final class a extends t implements d.n0.b.a<EthernetConfig> {

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public static final a f2252d = new a();

        a() {
            super(0);
        }

        @Override // d.n0.b.a
        /* JADX INFO: renamed from: c, reason: merged with bridge method [inline-methods] */
        public final EthernetConfig a() {
            return new EthernetConfig(null, null, null, null, null, false, 63, null);
        }
    }

    private h() {
    }

    public final EthernetConfig a() {
        return (EthernetConfig) f2251b.getValue();
    }

    public final void b(EthernetConfig ethernetConfig) {
        s.e(ethernetConfig, "ethernetConfig");
        Log.i("EthernetDataHelper", "saveEthernet: " + a().getInit() + "; " + ethernetConfig);
        if (a().getInit()) {
            return;
        }
        EthernetConfig ethernetConfigA = a();
        ethernetConfigA.setInit(true);
        ethernetConfigA.setIp(ethernetConfig.getIp());
        ethernetConfigA.setOpenSdkConnectMode(ethernetConfig.getOpenSdkConnectMode());
        ethernetConfigA.setSeewoConnectMode(ethernetConfig.getSeewoConnectMode());
        ethernetConfigA.setGateway(ethernetConfig.getGateway());
        ethernetConfigA.setMask(ethernetConfig.getMask());
    }
}
