package com.seewo.vcommons.data;

import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.Log;
import java.util.Locale;

/* JADX INFO: compiled from: PropertiesUtils.java */
/* JADX INFO: loaded from: classes.dex */
public class d {
    static {
        o("persist.sys.umengfunction", true);
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
        e.c.e.f.b.p();
    }

    public static boolean A() {
        return !z();
    }

    public static void B(boolean z) {
        D("persist.sys.toumenu.call", Boolean.toString(z));
    }

    public static void C(int i2) {
        D("persist.sys.auto.switch.channel", Integer.toString(i2));
    }

    public static boolean D(String str, String str2) {
        try {
            SystemProperties.set(str, str2);
            return true;
        } catch (Exception e2) {
            Log.w("PropertiesUtils", "setProperty: ", e2);
            return false;
        }
    }

    public static void E(boolean z) {
        D("persist.sys.usbscsi", z ? "1" : "0");
    }

    public static String a(String str) {
        return !"empty".equals(n("ro.customer.product.model", "empty")) ? m("ro.product.model") : (!e.c.e.c.a.n() || e.c.e.c.a.m()) ? e.c.e.c.a.l() ? String.format(Locale.ENGLISH, "S%sEC", str.substring(1, 3)) : e.c.e.c.a.e() ? f(str) : e.c.e.c.a.d() ? String.format(Locale.ENGLISH, "ETP%sU", str.substring(1, 3)) : e.c.e.c.a.g() ? h(str) : e.c.e.c.a.c() ? String.format(Locale.ENGLISH, "LU%s-ST400", str.substring(1, 3)) : e.c.e.c.a.f() ? n("ro.product.model", "empty") : e.c.e.f.b.l() ? n("ro.product.model", "empty") : str : String.format(Locale.ENGLISH, "IFP%s50", str.substring(1, 3));
    }

    public static int b() {
        return k("persist.sys.auto.switch.channel", 1);
    }

    public static String c() {
        return n("ro.cvte.boardname", "");
    }

    public static String d() {
        return m("ro.cvte.buildTime");
    }

    public static String e() {
        return n("ro.cvte.flavor.name", "");
    }

    public static String f(String str) {
        return e.c.e.b.a.h(11) ? str : e.c.e.f.b.k() ? m("ro.product.model") : ("E55IB-GLM351A-G".equals(str) || "E65IB-GLM351A-G".equals(str)) ? String.format(Locale.ENGLISH, "P%s12", str.substring(1, 3)) : ("EX65".equals(str) || "EX75".equals(str) || "EX86".equals(str)) ? str : String.format(Locale.ENGLISH, "E10%s", str.substring(1, 3));
    }

    public static String g() {
        return n("ro.build.version.incremental", "develop");
    }

    private static String h(String str) {
        return str.startsWith("L55EB") ? "L55EB-EV5501IDP" : str.startsWith("L65EB") ? "L65EB-EV6501IDP" : str.startsWith("L75EB") ? "L75EB-EV7501IDP" : str.startsWith("L86EB") ? "L86EB-EV8601IDP" : str;
    }

    public static String i() {
        String strM = m(e.c.e.b.b.a);
        return TextUtils.isEmpty(strM) ? m("ro.cvte.panelname") : strM;
    }

    public static String j() {
        return n("ro.product.version", "203700000000");
    }

    public static int k(String str, int i2) {
        try {
            return SystemProperties.getInt(str, i2);
        } catch (Exception e2) {
            Log.w("PropertiesUtils", "getProperty int: ", e2);
            return i2;
        }
    }

    public static long l(String str, long j2) {
        try {
            return SystemProperties.getLong(str, j2);
        } catch (Exception e2) {
            Log.w("PropertiesUtils", "getProperty long: ", e2);
            return j2;
        }
    }

    public static String m(String str) {
        try {
            return SystemProperties.get(str);
        } catch (Exception e2) {
            Log.w("PropertiesUtils", "getProperty String: ", e2);
            return "";
        }
    }

    public static String n(String str, String str2) {
        try {
            return SystemProperties.get(str, str2);
        } catch (Exception e2) {
            Log.w("PropertiesUtils", "getProperty String: ", e2);
            return str2;
        }
    }

    public static boolean o(String str, boolean z) {
        try {
            return SystemProperties.getBoolean(str, z);
        } catch (Exception e2) {
            Log.w("PropertiesUtils", "getProperty bool: ", e2);
            return z;
        }
    }

    public static int p() {
        return k("persist.sys.working.writer", 0);
    }

    public static boolean q() {
        return o("persist.sys.toumenu.call", true);
    }

    public static boolean r() {
        return k(e.c.e.b.b.f802c, 0) == 0;
    }

    public static boolean s() {
        return (k("persist.sys.keys.vs.locks", 0) & 2) != 0;
    }

    public static boolean t() {
        return o("persist.sys.log.enable", false);
    }

    public static boolean u() {
        return (k("persist.sys.keys.vs.locks", 0) & 4) != 0;
    }

    public static boolean v() {
        return (k("persist.sys.keys.vs.locks", 0) & 8) != 0;
    }

    public static boolean w() {
        return (k("persist.sys.keys.vs.locks", 0) & 1) != 0;
    }

    public static boolean x() {
        return m("persist.sys.hdmiout.hdcpswitch").equals("yes");
    }

    public static boolean y() {
        return k("persist.sys.usbscsi", 1) == 1;
    }

    public static boolean z() {
        return "1".equals(m("persist.sys.accelerator_lock"));
    }
}
