package com.ifpdos.autotest.k0.f;

import android.content.Context;
import android.os.SystemProperties;
import android.util.Log;

/* JADX INFO: compiled from: ServerFactory.java */
/* JADX INFO: loaded from: classes.dex */
public class e {
    public static b a(Context context) {
        b bVarB = b(context);
        if (!com.ifpdos.autotest.o0.e.f() || !(bVarB instanceof d)) {
            return bVarB;
        }
        Log.i("ServerFactory", "getServer: production mode, SerialPortServer --> DoubleServer");
        return new a(context);
    }

    private static b b(Context context) {
        String str = SystemProperties.get("ro.wb.communication", "");
        Log.i("ServerFactory", "getServer: communication = " + str);
        if ("com".equalsIgnoreCase(str)) {
            return new d();
        }
        if ("socket".equalsIgnoreCase(str)) {
            return new c(context);
        }
        int i = b.c.d.a.a.f1470a;
        return (i == 7 || b.c.d.d.b.i()) ? new a(context) : i == 10 ? new d() : new c(context);
    }
}
