package com.seewo.vcommons.data;

import android.os.SystemProperties;
import android.text.TextUtils;
import android.util.Log;
import com.cvte.vman.instance.InvokeCmd;
import okhttp3.HttpUrl;

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

    public static int a() {
        return f("persist.sys.cpu.tempthrehold", InvokeCmd.CMD_SYSTEMCTRL_ENABLE_TOUCH_ACCELERATION);
    }

    public static int b() {
        return f("persist.sys.factory.age.time", 0);
    }

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

    public static String d() {
        String strH = h(h.c.d.a.b.a);
        return TextUtils.isEmpty(strH) ? h("ro.cvte.panelname") : strH;
    }

    public static String e() {
        String strI = i("persist.sys.product.model", "empty");
        if ("empty".equals(strI)) {
            strI = i("ro.customer.product.model", "empty");
        }
        return strI.equals("empty") ? i("ro.product.model", "empty") : strI;
    }

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

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

    public static String h(String str) {
        try {
            return SystemProperties.get(str);
        } catch (Exception e) {
            Log.w("PropertiesUtils", "getProperty String: ", e);
            return HttpUrl.FRAGMENT_ENCODE_SET;
        }
    }

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

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

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

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

    public static boolean m() {
        return j("persist.sys.recy.factory.age", false);
    }

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

    public static boolean o() {
        return !n();
    }

    public static void p(boolean z) {
        r("sys.burn.video.state", String.valueOf(z));
    }

    public static void q(int i2) {
        r("persist.sys.factory.age.time", String.valueOf(i2));
    }

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