package com.seewo.vcommons.data;

import android.content.Context;
import android.os.SystemProperties;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import com.seewo.vcommons.constants.Platform;
import com.seewo.vcommons.constants.SeewoConstants;
import com.seewo.vcommons.constants.SeewoLayerTitle;
import com.seewo.vcommons.cutomer.CustomerUtils;
import com.seewo.vcommons.helper.NetShareHelper;
import com.seewo.vcommons.mstar.ethernet.EthernetHelperInfo;
import com.seewo.vcommons.utils.BoardTypeUtils;
import com.seewo.vcommons.utils.ShellCommandUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;

/* JADX INFO: loaded from: classes.dex */
public class PropertiesUtils {
    private static final String ARP_SOLUTION_DISABLE = "0";
    private static final String ARP_SOLUTION_ENABLE = "work";
    private static final int BIT_BUTTON_LOCK = 2;
    private static final int BIT_IR_LOCK = 4;
    private static final int BIT_MENU_LOCK = 8;
    private static final int BIT_POWER_LOCK = 1;
    private static final String DAHUA_PRODUCT_FORMAT = "LU%s-ST400";
    private static final int DEFAULT_HDMI_ENCRYPTION_ON = 1;
    private static final int DEFAULT_HDMI_RESOLUTION_1080P = 1;
    private static final String EDPRO_PRODUCT_FORMAT = "ETP%sU";
    public static final boolean FEATURE_UMENG_DATA = SystemProperties.getBoolean(SeewoConstants.FEATURE_UMENG_FUNCTION, true);
    private static final String FREQUENCY_NATIVE_AP_2g4 = "2g4";
    private static final String FREQUENCY_NATIVE_AP_5g = "5g";
    private static final String I3_EB_PRODUCT_FORMAT = "P%s12";
    private static final String I3_PRODUCT_E55 = "E55IB-GLM351A-G";
    private static final String I3_PRODUCT_E65 = "E65IB-GLM351A-G";
    private static final String I3_PRODUCT_EX65 = "EX65";
    private static final String I3_PRODUCT_EX75 = "EX75";
    private static final String I3_PRODUCT_EX86 = "EX86";
    private static final String I3_PRODUCT_FORMAT = "E10%s";
    private static final String L55EB_PREFIX = "L55EB";
    private static final String L65EB_PREFIX = "L65EB";
    private static final String L75EB_PREFIX = "L75EB";
    private static final String L86EB_PREFIX = "L86EB";
    private static final String NETWORK_LINK_DISABLE = "0";
    private static final String NETWORK_LINK_ENABLE = "eth0";
    private static final String NOT_SUPPORT_HDMI_RESOLUTION = "0";
    private static final String OPI_L55EB_PRODUCE_MODEL = "L55EB-EV5501IDP";
    private static final String OPI_L65EB_PRODUCE_MODEL = "L65EB-EV6501IDP";
    private static final String OPI_L75EB_PRODUCE_MODEL = "L75EB-EV7501IDP";
    private static final String OPI_L86EB_PRODUCE_MODEL = "L86EB-EV8601IDP";
    private static final String PERSIST_SYS_AUTO_FORCE_CHANNEL = "persist.sys.autoforce.source";
    private static final String PERSIST_SYS_FAKE_STAND_BY = "persist.sys.fake.standby";
    private static final String PERSIST_SYS_FAVORITE_SOURCE = "persist.sys.favorite.source";
    private static final String PERSIST_SYS_HDMIOUT_MODE = "persist.sys.hdmiout.mode";
    private static final String PERSIST_SYS_HDMIOUT_RESOLUTION = "persist.sys.hdmiout.resolution";
    private static final String PERSIST_SYS_MIC_TYPE = "persist.sys.mic.type";
    private static final String PERSIST_SYS_NETWORK_DEBUG = "persist.sys.network.debug";
    private static final String PERSIST_SYS_NETWORK_LOG = "persist.sys.network.log";
    private static final String PERSIST_SYS_PC_POWER = "persist.sys.pc_power";
    private static final String PERSIST_SYS_PEN_DETECT = "persist.sys.pen.detect";
    private static final String PERSIST_SYS_RECYCLE_FACTORY_AGING = "persist.sys.recy.factory.age";
    private static final String PERSIST_SYS_RECYCLE_FACTORY_AGING_TIME = "persist.sys.factory.age.time";
    private static final String PERSIST_SYS_SETUP_COMPLETE = "persist.sys.setup.complete";
    private static final String PERSIST_SYS_SET_CUSTOM_WALLPAPER = "persist.sys.set.custom_wallpaper";
    private static final String PERSIST_SYS_SI01_DRIVER_VERSION = "persist.sys.si01.drv_ver";
    private static final String PERSIST_SYS_UPGRADE_FINISH = "persist.sys.upgrade_finish";
    private static final String PERSIST_SYS_WIFI_COUNTRYCODE = "persist.sys.wifi.countrycode";
    private static final String SHELL_COMMAND_SET_PROP = "setprop %s %d";
    private static final String SKYWORTH_PRODUCT_FORMAT = "S%sEC";
    private static final String SUPPORT_HDMI_RESOLUTION = "1";
    private static final String SYS_BURN_VIDEO_STATE = "sys.burn.video.state";
    private static final String TAG = "PropertiesUtils";
    public static final String UWST_TYPE_SCREEN_SHARE = "ScreenShare";
    private static final String VIEWSONIC_PRODUCT_FORMAT = "IFP%s50";

    private PropertiesUtils() {
    }

    public static String get3288OTADeviceId() {
        return SystemProperties.get(SeewoConstants.KEY_BOARD_TYPE, "") + "_" + SystemProperties.get(SeewoConstants.KEY_CUSTOMER_NAME, "") + "_" + getAndroidVersion() + "_" + SystemProperties.get(SeewoConstants.KEY_DEFAULT_KEY, SeewoConstants.KEY_DEFAULT_VALUE);
    }

    public static String get6M60Version() {
        return SystemProperties.get("persist.sys.6m60.version", "");
    }

    public static boolean getADVoiceSate() {
        return SystemProperties.getBoolean(SeewoConstants.AD_VOICE_STATE, false);
    }

    public static String getAboutSystem() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_ABOUT_SYSTEM, SeewoConstants.DEFAULT_ABOUT_SYSTEM);
    }

    public static String getAliasProductModel() {
        if (!SeewoConstants.MODEL_EMPTY.equals(SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_CVT_CUSTOMER_PRODUCT_MODEL, SeewoConstants.MODEL_EMPTY))) {
            return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_CVT_PRODUCT_MODEL);
        }
        String productModel = getProductModel();
        return (!CustomerUtils.isViewSonicCustomized() || CustomerUtils.isViewSonicBiaopaiCustomized()) ? CustomerUtils.isSkyworthCustomized() ? String.format(Locale.ENGLISH, SKYWORTH_PRODUCT_FORMAT, productModel.substring(1, 3)) : CustomerUtils.isI3Customized() ? getI3ProductModel() : CustomerUtils.isEdproCustomized() ? String.format(Locale.ENGLISH, EDPRO_PRODUCT_FORMAT, productModel.substring(1, 3)) : CustomerUtils.isOPICustomized() ? getOPIAliasProductModel() : CustomerUtils.isDaHuaCustomized() ? String.format(Locale.ENGLISH, DAHUA_PRODUCT_FORMAT, productModel.substring(1, 3)) : CustomerUtils.isNecCustomized() ? SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_CVT_PRODUCT_MODEL, SeewoConstants.MODEL_EMPTY) : productModel : String.format(Locale.ENGLISH, VIEWSONIC_PRODUCT_FORMAT, productModel.substring(1, 3));
    }

    public static String getAndroidRam() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_ANDROID_RAM_SIZE, SeewoConstants.DEFAULT_ANDROID_RAM);
    }

    public static boolean getAndroidRemoteSwitch() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_ANDROIDREMOTE_SWITCH, CustomerUtils.isClearTouchCustomized() || CustomerUtils.isEvolutionCustomized());
    }

    public static String getAndroidRom() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_ANDROID_ROM_SIZE, SeewoConstants.DEFAULT_ANDROID_ROM);
    }

    public static String getAndroidVersion() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_ANDROID_VERSION, SeewoConstants.UNKNOWN);
    }

    public static String getArrayMicVersion() {
        return SystemProperties.get(SeewoConstants.ARRAY_MIC_VERSION, "");
    }

    public static int getAutoChannelSwitch() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_AUTO_SWITCH_CHANNLE, 1);
    }

    public static String getBackLightValue() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_BACKLIGHT, "100");
    }

    public static String getBoardName() {
        return SystemProperties.get("ro.cvte.boardname", "");
    }

    @Deprecated
    public static String getBoardType510() {
        String str = SystemProperties.get("ro.cvte.boardname", SeewoConstants.BOARD_TYPE_NULL);
        if (str.equals(SeewoConstants.BOARD_TYPE_NULL)) {
            return null;
        }
        return str;
    }

    public static String getBoardType638() {
        String str = SystemProperties.get(SeewoConstants.BOARD_TYPE_638, SeewoConstants.BOARD_TYPE_NULL);
        if (str.equals(SeewoConstants.BOARD_TYPE_NULL)) {
            return null;
        }
        return str;
    }

    public static String getBoardTypeHISI() {
        String str = SystemProperties.get("ro.cvte.boardname", SeewoConstants.BOARD_TYPE_NULL);
        if (str.equals(SeewoConstants.BOARD_TYPE_NULL)) {
            return null;
        }
        return str;
    }

    public static String getBuildDate() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_BUILD_DATE);
    }

    public static String getBuildNumber() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_BUILD_NUMBER, SeewoConstants.MODEL_EMPTY);
    }

    public static int getCpuTemperatureThrehold() {
        return SystemProperties.getInt("persist.sys.cpu.tempthrehold", 120);
    }

    public static String getCurrentAndroidSlotIp() {
        return SystemProperties.get(SeewoConstants.SYSTEM_ANDROID_SLOT_IP);
    }

    public static String getCurrentPCIp() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PC_IP);
    }

    public static int getCurrentToolbarType() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_ENABLED_TOOLBAR_TYPE, (CustomerUtils.isAOneMachine() || CustomerUtils.isPrediaCustomized()) ? 2 : 1);
    }

    public static int getCustomKeyAction(Context context) {
        try {
            return Settings.Secure.getInt(context.getContentResolver(), SeewoConstants.CUSTOM_KEY_ACTION);
        } catch (Settings.SettingNotFoundException e2) {
            Log.e(TAG, "getCustomKeyAction: ", e2);
            return -1;
        }
    }

    public static String getCustomerBrand() {
        return SystemProperties.get(SeewoConstants.KEY_CUSTOMER_BRAND, SeewoConstants.PRODUCT_BRAND_DEFAULT);
    }

    public static String getDataFormat() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_DATE_FORMAT);
    }

    public static int getDefaultNoSignalSleepTime() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_DEFAULT_SLEEP_TIME, (CustomerUtils.isFengtongCustomized() || CustomerUtils.isProwiseCustomized()) ? 60 : CustomerUtils.isAverCustomized() ? SeewoConstants.DEFAULT_SLEEP_TIME_7_MINUTE : SeewoConstants.DEFAULT_SLEEP_TIME_5_MINUTE);
    }

    public static String getDefaultPCSystem() {
        return String.format(SeewoConstants.DEFAULT_PROPERTY_PC_SYSTEM, getProductModel().substring(1, 3));
    }

    public static boolean getDevicceLockerStatus() {
        return SystemProperties.getBoolean(SeewoConstants.PROPERTY_DEVICE_LOCKER_STATE, false);
    }

    public static String getDeviceId() {
        return getProductModel().trim() + "_" + getFlavorName().trim() + "_" + getOTASpecial().trim();
    }

    public static boolean getEthFull() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_ETH_FULL, false);
    }

    public static int getEthStatus() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_IF_NET_DONE, 0);
    }

    public static String getEthernetMac() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_MAC);
    }

    public static int getFactoryRecycleTime() {
        return SystemProperties.getInt(PERSIST_SYS_RECYCLE_FACTORY_AGING_TIME, 0);
    }

    public static boolean getFakeStandBy() {
        return SystemProperties.getBoolean(PERSIST_SYS_FAKE_STAND_BY, false);
    }

    public static int getFavoriteSource() {
        return SystemProperties.getInt(PERSIST_SYS_FAVORITE_SOURCE, -1);
    }

    public static String getFlavorName() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_FLAVOR_NAME, "");
    }

    public static int getGalleryType() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_GALLERY_TYPE, 0);
    }

    public static String getGateWayAddr() {
        return SystemProperties.get(SeewoConstants.ANDROID_NIC_GATEWAY_KEY);
    }

    public static int getGrepLogSwitch() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_GREP_LOG_KEY, 0);
    }

    public static int getHdmiOutResulotion() {
        try {
            return Integer.parseInt(SystemProperties.get(PERSIST_SYS_HDMIOUT_MODE).substring(0, 1));
        } catch (Exception e2) {
            Log.e(TAG, "Error", e2);
            return 1;
        }
    }

    public static String getHostBuildVersion() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_KEY_MAIN_MACHINE_BUILD_VERSION);
    }

    public static String getHs3700() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_HS3700);
    }

    public static String getI3ProductModel() {
        String productModel = getProductModel();
        return (I3_PRODUCT_E55.equals(productModel) || I3_PRODUCT_E65.equals(productModel)) ? String.format(Locale.ENGLISH, I3_EB_PRODUCT_FORMAT, productModel.substring(1, 3)) : (I3_PRODUCT_EX65.equals(productModel) || I3_PRODUCT_EX75.equals(productModel) || I3_PRODUCT_EX86.equals(productModel)) ? productModel : String.format(Locale.ENGLISH, I3_PRODUCT_FORMAT, productModel.substring(1, 3));
    }

    public static boolean getIfWakeupWithSource() {
        return SystemProperties.getBoolean(SeewoConstants.PROPERTY_WAKEUP_ACTIVE_SOURCE, false);
    }

    public static String getIncremental() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_CVT_INCREMENTAL, SeewoConstants.INCREMENTAL_DEFAULT);
    }

    public static boolean getKeysLockState() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_KEYS_LOCK_STATE, false);
    }

    public static int getLastPostTime() {
        return SystemProperties.getInt(SeewoConstants.MACHINE_LAST_POST_KEY, 0);
    }

    public static int getMICType() {
        return SystemProperties.getInt(PERSIST_SYS_MIC_TYPE, 0);
    }

    public static int getMachineId() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_VIEWSONIC_ID_KEY, 1);
    }

    public static String getMicVersion() {
        return SystemProperties.get(SeewoConstants.MIC_WM8281_VERSION, "");
    }

    public static boolean getMonitorServiceStatus() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_MONITOR_SERVICE, false);
    }

    private static String getOPIAliasProductModel() {
        String productModel = getProductModel();
        return productModel.startsWith(L55EB_PREFIX) ? OPI_L55EB_PRODUCE_MODEL : productModel.startsWith(L65EB_PREFIX) ? OPI_L65EB_PRODUCE_MODEL : productModel.startsWith(L75EB_PREFIX) ? OPI_L75EB_PRODUCE_MODEL : productModel.startsWith(L86EB_PREFIX) ? OPI_L86EB_PRODUCE_MODEL : productModel;
    }

    public static String getOTASpecial() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_OTA_SPECIAL, "0");
    }

    public static Date getOtaVersion() {
        String dataFormat = getDataFormat();
        if (TextUtils.isEmpty(dataFormat)) {
            return new Date();
        }
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dataFormat);
        String str = SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_OTA_VERSION);
        if (TextUtils.isEmpty(str)) {
            return new Date();
        }
        try {
            return simpleDateFormat.parse(str);
        } catch (ParseException e2) {
            Log.e(TAG, "Error", e2);
            return new Date();
        }
    }

    public static int getPCBootChoice() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROP_PC_BOOT, (CustomerUtils.isAverLCustomized() || (CustomerUtils.isI3Customized() && !CustomerUtils.isI3ECustomized())) ? 1 : 0);
    }

    public static String getPCSN() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_PC_SN);
    }

    public static boolean getPCStandbyPowerState() {
        return SystemProperties.getBoolean(PERSIST_SYS_PC_POWER, false);
    }

    public static String getPCSystem() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_PC_SYSTEM);
    }

    public static String getPCType() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_PC_TYPE);
    }

    public static String getPanelName() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_PANEL_NAME);
    }

    public static int getPcStatus() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_PC_STATUS, 0);
    }

    public static int getPowerOnStatus() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_POWER_ON_STATUS, 0);
    }

    public static String getProductCommit() {
        return SystemProperties.get("ro.product.commit", SeewoConstants.MODEL_EMPTY);
    }

    public static String getProductModel() {
        String str = SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_CVT_CUSTOMER_PRODUCT_MODEL, SeewoConstants.MODEL_EMPTY);
        return SeewoConstants.MODEL_EMPTY.equals(str) ? SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_CVT_PRODUCT_MODEL, SeewoConstants.MODEL_EMPTY) : str;
    }

    public static String getProductPanel() {
        return SystemProperties.get("ro.cvte.panel", SeewoConstants.PANEL_DEFAULT);
    }

    public static String getProductVersion() {
        return SystemProperties.get(SeewoConstants.RO_PRODUCT_VERSION, SeewoConstants.DEFAULT_PRODUCT_VERSION);
    }

    public static boolean getPropAccessBlack() {
        return SystemProperties.getBoolean(SeewoConstants.KEY_SYSTEM_PROP_ACCESS_BLACK, false);
    }

    public static String getProperty(String str) {
        return SystemProperties.get(str);
    }

    public static String getProperty(String str, String str2) {
        return SystemProperties.get(str, str2);
    }

    public static String getPs175Version() {
        return SystemProperties.get("persist.sys.ps175.version", "");
    }

    public static String getRemoteSwitch() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_IN_REMOTE_KEY, Integer.toString(2));
    }

    public static String getRemoteTouchStatus() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_REMOTE_TOUCH_STATUS, "0");
    }

    public static String getRpcIp() {
        return SystemProperties.get(SeewoConstants.SYSTEM_RPC_IP);
    }

    public static int getSI01DriverVersion() {
        return SystemProperties.getInt(PERSIST_SYS_SI01_DRIVER_VERSION, 0);
    }

    public static boolean getScreenLockStatus() {
        return SystemProperties.getBoolean(SeewoConstants.PROPERTY_SYSTEM_SCREEN_LOCK, false);
    }

    public static String getScreenOrientation() {
        return SystemProperties.get("persist.sys.screenorientation", "landscape");
    }

    public static int getScreenSaverInterval() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_SCREENSAVER_INTERVAL, 2);
    }

    public static int getScreenShotType() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_SHOT_TYPE, 2);
    }

    public static String getSeewoAirName() {
        return SystemProperties.get("persist.sys.seewoair.product", "UWST");
    }

    public static int getSetupwizardComplete() {
        return SystemProperties.getInt(PERSIST_SYS_SETUP_COMPLETE, 0);
    }

    public static String getShareRecoveryStatus() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_SHARE_RECOVERY);
    }

    public static String getSkyworthProductModel() {
        return String.format(Locale.ENGLISH, SKYWORTH_PRODUCT_FORMAT, getProductModel().substring(1, 3));
    }

    public static String getSlotBuildVersion() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_KEY_SLOT_MACHINE_BUILD_VERSION);
    }

    public static String getSoftwareVersion() {
        return SystemProperties.get(SeewoConstants.SYSTEM_SOFTWARE_VERSION, "Unknown");
    }

    public static int getSoundCardNode() {
        return SystemProperties.getInt("persist.sys.usbaudio.channel", 0);
    }

    public static final String getSystemAppsVersion() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_SYSTEM_APPS_VERSION, "");
    }

    public static int getSystemDockFlag() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_SYSTEMDOCK_FLAG, 1);
    }

    public static int getSystemNetworkDebug() {
        return SystemProperties.getInt(PERSIST_SYS_NETWORK_DEBUG, 0);
    }

    public static int getSystemNetworkLog() {
        return SystemProperties.getInt(PERSIST_SYS_NETWORK_LOG, 0);
    }

    public static String getTVBuildData() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_KEY_TV_DATA);
    }

    public static String getTVBuildVersion() {
        return SystemProperties.get("ro.product.commit");
    }

    public static String getTVSourceId() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_TV_SOURCE_ID, SeewoConstants.TV_SOURCE_ANDROID);
    }

    public static int getTimerShutdownType() {
        return SystemProperties.getInt(SeewoConstants.KEY_TIMER_SHUTDOWN_TYPE, 0);
    }

    public static int getToolBarCallValue() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_IF_CALL_TOOLBAR_STATIC, CustomerUtils.isViewSonicCustomized() ? 4 : 1);
    }

    public static int getTouchDriverLocation() {
        return SystemProperties.getInt("ro.seewo.touch_driver_location", -1);
    }

    public static int getTouchState() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_IN_TOUCH_KEY, 1);
    }

    public static boolean getUSBLockSwitch() {
        return SystemProperties.getBoolean(SeewoConstants.PROPERTY_USB_LOCK_SWITCH, false);
    }

    public static int getUpdateWiredStatus() {
        return SystemProperties.getInt(SeewoConstants.PROPERTIES_UPDATE, 0);
    }

    public static int getUseTime() {
        return SystemProperties.getInt(SeewoConstants.MACHINE_USETIME_COUNTS_KEY, 0);
    }

    public static String getViewSonicProductModel() {
        return String.format(Locale.ENGLISH, VIEWSONIC_PRODUCT_FORMAT, getProductModel().substring(1, 3));
    }

    public static boolean getWOLStatus() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_REMOTE_DUMMY_STANDBY_SWITCH, isWolDefaultOnCustomized() ? SeewoConstants.VALUE_SWITCH_ON : SeewoConstants.VALUE_SWITCH_OFF).equals(SeewoConstants.VALUE_SWITCH_ON);
    }

    public static String getWifiChannel() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_WIFI_CHANNEL, "0");
    }

    public static String getWifiCountrycode() {
        return SystemProperties.get(PERSIST_SYS_WIFI_COUNTRYCODE);
    }

    public static int getWorkingWriteApp() {
        return SystemProperties.getInt(SeewoConstants.APP_PROPERTY_WRITE, 0);
    }

    public static boolean hasEmbeddedWifiModule() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_EMBEDDED_WIFI_MODULE, false);
    }

    public static boolean hasLightSensor() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_LIGHT_SENSOR, 0) == 1;
    }

    public static boolean is5GFrequency() {
        return "5g".equals(SystemProperties.get(NetShareHelper.Constants.PERSIST_AP_BAND, "5g"));
    }

    public static boolean is5gNativeAp() {
        return "5g".equals(SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_NATIVE_AP_FREQUENCY, "5g"));
    }

    public static boolean isAdbOn() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_ENABLE_ADB, 0) == 1;
    }

    public static boolean isAllowShareFiles(Context context) {
        return (context == null || Settings.Global.getInt(context.getContentResolver(), SeewoConstants.KEY_IS_ALLOW_SHARE_FILES, 0) == 0) ? false : true;
    }

    public static boolean isAllowTouchMenuSwipeCall() {
        return SystemProperties.getBoolean(SeewoConstants.TOUCHEMENU_CALL_FROM_BUTTON_STRING, true);
    }

    public static boolean isAndroidEnabled() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_NO_ANDROID, 0) == 0;
    }

    public static boolean isAndroidSettingsEnable() {
        return !SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_SETTINGS_DISABLE, false);
    }

    public static boolean isApRestartOK() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_AP_RESTART_STATUS).equals("1");
    }

    public static boolean isArpSolutionEnable() {
        return ARP_SOLUTION_ENABLE.equals(SystemProperties.get(SeewoConstants.SYSTEM_ARP_SOLUTION, "0"));
    }

    public static boolean isAtMode() {
        return SystemProperties.getInt("ro.boot.AT_Read", 0) == 1;
    }

    public static boolean isAutoLight() {
        return SystemProperties.getBoolean("persist.sys.auto.light", false);
    }

    public static boolean isAutoOta() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_OTA_AUTO, true);
    }

    public static boolean isBurnVideoState() {
        return SystemProperties.getBoolean(SYS_BURN_VIDEO_STATE, false);
    }

    public static boolean isButtonLocked() {
        return (SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, 0) & 2) != 0;
    }

    public static boolean isCapacitiveTouchType() {
        return SystemProperties.get("ro.seewo.touch_type", "IR_TOUCH").equals("CAP_TOUCH");
    }

    public static boolean isChildLockForbidden() {
        return SystemProperties.getBoolean(SeewoConstants.PROPERTY_CHILDREN_LOCK_FORBIDDEN, false);
    }

    public static boolean isCustomWallpaperState() {
        return SystemProperties.getBoolean(PERSIST_SYS_SET_CUSTOM_WALLPAPER, false);
    }

    public static boolean isDcrEnable() {
        return SystemProperties.getInt("persist.sys.backlight_off_auto.enable", 0) == 1;
    }

    public static boolean isDebugLogEnable() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_DEBUG_LOG_ENABLE, false);
    }

    public static boolean isDynamicContrastEnable() {
        return SystemProperties.getBoolean("persist.sys.dcr.enable", false);
    }

    public static boolean isEnergySave() {
        return SystemProperties.getBoolean("persist.sys.energy", false);
    }

    public static boolean isFactoryRecycleState() {
        return SystemProperties.getBoolean(PERSIST_SYS_RECYCLE_FACTORY_AGING, false);
    }

    public static boolean isFloatToolbarEnabled() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_FLOAT_TOOLBAR_ENABLED, CustomerUtils.isOptomaCustomized());
    }

    public static boolean isFreezeEnable() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_FREEZE_SWITCH, true);
    }

    public static boolean isHdmiCecIrPass() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_CEC_IR_PASS, true);
    }

    public static boolean isHdmiEncryptionEnabled() {
        int i2;
        try {
            i2 = Integer.parseInt(SystemProperties.get(PERSIST_SYS_HDMIOUT_MODE).substring(1, 2));
        } catch (Exception e2) {
            Log.e(TAG, "Error", e2);
            i2 = 1;
        }
        return i2 == 1;
    }

    public static boolean isIRLocked() {
        return (SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, 0) & 4) != 0;
    }

    public static boolean isInstallApps() {
        return SystemProperties.getBoolean(SeewoConstants.FEATURE_INSTALL_APK, false);
    }

    public static boolean isKeyLocked() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_KEYS_CHILD_LOCK_STATE, false);
    }

    public static boolean isMarkNotSupportWriteEverywhere() {
        return !isMarkSupportWriteEverywhere();
    }

    public static boolean isMarkSupportWriteEverywhere() {
        return "1".equals(SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_WRITE_EVERYWHERE));
    }

    public static boolean isMcuWorkOnJniInterface() {
        return SystemProperties.getBoolean(SeewoConstants.MCU_JNI_INTERFACE, false);
    }

    public static boolean isMenuLocked() {
        return (SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, 0) & 8) != 0;
    }

    public static boolean isNetworkLinkEnable() {
        return NETWORK_LINK_ENABLE.equals(SystemProperties.get(SeewoConstants.SYSTEM_NETWORK_LINK, "0"));
    }

    public static boolean isOpenTestMode() {
        return SystemProperties.getBoolean("persist.sys.test_mode.enable", false);
    }

    public static boolean isPBCustomer() {
        return SystemProperties.getInt("persist.sys.pb_customer", 0) == 1;
    }

    public static boolean isPenDetectEnable() {
        return SystemProperties.getBoolean(PERSIST_SYS_PEN_DETECT, true);
    }

    public static boolean isPowerLocked() {
        return (SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, 0) & 1) != 0;
    }

    public static boolean isSTRMode() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_SHUTDOWN_LONGPRESS, false) && SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_DDR_SELF_REFRESH, false);
    }

    public static boolean isScreenShareType() {
        return SystemProperties.get("persist.sys.seewoair.product").equals(UWST_TYPE_SCREEN_SHARE);
    }

    public static boolean isSettingMenuVisible() {
        return SystemProperties.getBoolean(SeewoConstants.SETTING_MENU_VISIBLE, false);
    }

    public static boolean isSmartPenEnabled(Context context) {
        return context == null || Settings.Global.getInt(context.getContentResolver(), SeewoConstants.PROPERTY_SMART_PEN_ENABLE, 1) != 0;
    }

    public static boolean isSourceConfirm() {
        return SystemProperties.getBoolean("sys.tv_source_init", false);
    }

    public static boolean isSplitScreenDividerPressed() {
        return SystemProperties.getBoolean("persist.sys.press_divider", false);
    }

    public static boolean isSupport638HdmiOut() {
        return SystemProperties.get(SeewoConstants.SYSTEM_PROPERTY_HDMIOUT_SWITCH).equals(SeewoConstants.VALUE_TRUE);
    }

    public static boolean isSupportCommonFrequency() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_FREQUENCY_SUPPORT, false);
    }

    public static boolean isSupportDeveloper() {
        return SystemProperties.getBoolean("persist.sys.support.developer", false);
    }

    public static boolean isSupportHdmiOutResolution() {
        return "1".equals(SystemProperties.get(PERSIST_SYS_HDMIOUT_RESOLUTION, "0"));
    }

    public static boolean isSupportMultiwindows() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_SUPPORT_MULTIWINDOWS, false);
    }

    public static boolean isSupportUsers() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_PROPERTY_SUPPORT_USERS, false);
    }

    public static boolean isSupportWifiAp() {
        return SystemProperties.getBoolean(SeewoConstants.SYSTEM_SUPPORT_WIFIAP, false);
    }

    public static boolean isSystemSmartPenFunctionEnabled(Context context) {
        return context == null || Settings.Global.getInt(context.getContentResolver(), SeewoConstants.KEY_IS_SMARTPEN_FUNCTION_ENABLED, 1) != 0;
    }

    public static boolean isTouchOut1Inserted() {
        return SystemProperties.getBoolean(SeewoConstants.TOUCH_OUT_USB1_INSERT, true);
    }

    public static boolean isTouchOut2Inserted() {
        return SystemProperties.getBoolean(SeewoConstants.TOUCH_OUT_USB2_INSERT, true);
    }

    public static boolean isUSBDiskEnable() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_USB_DISK_ENABLE, 1) == 1;
    }

    public static boolean isUartOn() {
        return SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_ENABLE_UART, 1) == 1;
    }

    public static boolean isUpgradeFinish() {
        return SystemProperties.getBoolean(PERSIST_SYS_UPGRADE_FINISH, false);
    }

    public static boolean isWisdomBlackboard() {
        return getProductModel().startsWith("B");
    }

    private static boolean isWolDefaultOnCustomized() {
        return CustomerUtils.isBoxlightCustomized() || CustomerUtils.isEvolutionCustomized() || (CustomerUtils.isEverestCustomized() && Platform.VERSION == 5);
    }

    public static boolean isWriteAcceleratorLock() {
        return "1".equals(SystemProperties.get(SeewoConstants.APP_PROPERTY_WRITE_ACCELERATOR_LOCK));
    }

    public static boolean isWriteAcceleratorUnlock() {
        return !isWriteAcceleratorLock();
    }

    public static void resetGateWayAddr() {
        setGateWayAddr("0.0.0.0");
    }

    public static void resetWorkingWriteApp() {
        SystemProperties.set(SeewoConstants.APP_PROPERTY_WRITE, String.valueOf(0));
    }

    public static void restoreHideLayers() {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_HIDE_LAYERS, SeewoLayerTitle.LAYER_TITLE_DEFAULT);
    }

    public static void setADVoiceState(boolean z) {
        SystemProperties.set(SeewoConstants.AD_VOICE_STATE, Boolean.toString(z));
    }

    public static void setAdbSwitch(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_ENABLE_ADB, Integer.toString(z ? 1 : 0));
    }

    public static void setAllowTouchMenuSwipeCall(boolean z) {
        SystemProperties.set(SeewoConstants.TOUCHEMENU_CALL_FROM_BUTTON_STRING, Boolean.toString(z));
    }

    public static void setAndroidEnable(boolean z) {
        if (BoardTypeUtils.is638Machine()) {
            ShellCommandUtils.executeCommand(String.format(Locale.ENGLISH, SHELL_COMMAND_SET_PROP, SeewoConstants.SYSTEM_PROPERTY_NO_ANDROID, Integer.valueOf(!z ? 1 : 0)));
        } else {
            SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_NO_ANDROID, Integer.toString(!z ? 1 : 0));
        }
    }

    public static void setAndroidSettingsEnable(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_SETTINGS_DISABLE, String.valueOf(!z));
    }

    public static void setArpSolutionEnable(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_ARP_SOLUTION, z ? ARP_SOLUTION_ENABLE : "0");
    }

    public static void setAutoChannelSwitch(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_AUTO_SWITCH_CHANNLE, Integer.toString(i2));
    }

    public static void setAutoLight(boolean z) {
        SystemProperties.set("persist.sys.auto.light", Boolean.toString(z));
    }

    public static void setAutoOta(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_OTA_AUTO, Boolean.toString(z));
    }

    public static void setAutoStartupForceSource(int i2) {
        SystemProperties.set(PERSIST_SYS_AUTO_FORCE_CHANNEL, String.valueOf(i2));
    }

    public static void setBackLightValue(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_BACKLIGHT, String.valueOf(i2));
    }

    public static void setBurnVideoState(boolean z) {
        SystemProperties.set(SYS_BURN_VIDEO_STATE, String.valueOf(z));
    }

    public static void setButtonLock(boolean z) {
        if (z != isButtonLocked()) {
            SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, Integer.toString(SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, 0) ^ 2));
        }
    }

    public static void setChildLock(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_KEYS_CHILD_LOCK_STATE, Boolean.toString(z));
    }

    public static void setChildLockForbidden(boolean z) {
        SystemProperties.set(SeewoConstants.PROPERTY_CHILDREN_LOCK_FORBIDDEN, Boolean.toString(z));
    }

    public static void setCurrentFrequency(boolean z) {
        SystemProperties.set(NetShareHelper.Constants.PERSIST_AP_BAND, z ? "5g" : "2g4");
    }

    public static void setCurrentToolbarType(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_ENABLED_TOOLBAR_TYPE, Integer.toString(i2));
    }

    public static void setCustomKeyAction(Context context, int i2) {
        Settings.Secure.putInt(context.getContentResolver(), SeewoConstants.CUSTOM_KEY_ACTION, i2);
    }

    public static void setDcrEnable(boolean z) {
        SystemProperties.set("persist.sys.backlight_off_auto.enable", z ? "1" : "0");
    }

    public static void setDefaultNoSignalSleepTime(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_DEFAULT_SLEEP_TIME, Integer.toString(i2));
    }

    public static void setDevicceLockerStatus(boolean z) {
        SystemProperties.set(SeewoConstants.PROPERTY_DEVICE_LOCKER_STATE, String.valueOf(z));
    }

    public static void setDynamicContrastEnable(boolean z) {
        SystemProperties.set("persist.sys.dcr.enable", String.valueOf(z));
    }

    public static void setEnergySave(boolean z) {
        SystemProperties.set("persist.sys.energy", Boolean.toString(z));
    }

    public static void setEthFull(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_ETH_FULL, String.valueOf(z));
    }

    public static void setEthStatus(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_IF_NET_DONE, Integer.toString(i2));
    }

    public static void setFactoryRecycleState(boolean z) {
        SystemProperties.set(PERSIST_SYS_RECYCLE_FACTORY_AGING, String.valueOf(z));
    }

    public static void setFactoryRecycleTime(int i2) {
        SystemProperties.set(PERSIST_SYS_RECYCLE_FACTORY_AGING_TIME, String.valueOf(i2));
    }

    public static void setFakeStandBy(boolean z) {
        SystemProperties.set(PERSIST_SYS_FAKE_STAND_BY, String.valueOf(z));
    }

    public static void setFavoriteSource(int i2) {
        SystemProperties.set(PERSIST_SYS_FAVORITE_SOURCE, String.valueOf(i2));
    }

    public static void setFloatToolbarEnabled(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_FLOAT_TOOLBAR_ENABLED, Boolean.toString(z));
    }

    public static void setForbidCallMark(List<String> list) {
        StringBuilder sb = new StringBuilder();
        Iterator<String> it = list.iterator();
        while (it.hasNext()) {
            sb.append(it.next());
            sb.append(',');
        }
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_FORBID_PACKAGE, sb.toString());
    }

    public static void setFreezeEnable(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_FREEZE_SWITCH, Boolean.toString(z));
    }

    public static void setGalleryType(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_GALLERY_TYPE, Integer.toString(i2));
    }

    public static void setGateWayAddr(String str) {
        SystemProperties.set(SeewoConstants.ANDROID_NIC_GATEWAY_KEY, str);
    }

    public static void setGrepLogSwitch(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_GREP_LOG_KEY, Integer.toString(i2));
    }

    public static void setHdmiCecIrPass(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_CEC_IR_PASS, String.valueOf(z));
    }

    public static void setHideLayers(List<String> list) {
        StringBuilder sb = new StringBuilder();
        Iterator<String> it = list.iterator();
        while (it.hasNext()) {
            sb.append(it.next());
            sb.append(',');
        }
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_HIDE_LAYERS, sb.toString());
    }

    public static void setHotspotApModuleStatus(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_HOTSPOT_AP_EXIST, String.valueOf(z));
    }

    public static void setIRLock(boolean z) {
        if (z != isIRLocked()) {
            SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, Integer.toString(SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, 0) ^ 4));
        }
    }

    public static void setIfWakeupWithSource(boolean z) {
        SystemProperties.set(SeewoConstants.PROPERTY_WAKEUP_ACTIVE_SOURCE, Boolean.toString(z));
    }

    public static void setInitTv(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_SEEWO_INIT_TV, Boolean.toString(z));
    }

    public static void setIsAllowShareFiles(Context context, boolean z) {
        if (context == null) {
            return;
        }
        Settings.Global.putInt(context.getContentResolver(), SeewoConstants.KEY_IS_ALLOW_SHARE_FILES, z ? 1 : 0);
    }

    public static void setKeysLockState(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_KEYS_LOCK_STATE, Boolean.toString(z));
    }

    public static void setLastPostTime(String str) {
        SystemProperties.set(SeewoConstants.MACHINE_LAST_POST_KEY, str);
    }

    public static void setMachineId(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_VIEWSONIC_ID_KEY, Integer.toString(i2));
    }

    public static void setMarkWriteEverywhere(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_WRITE_EVERYWHERE, Integer.toString(i2));
    }

    public static void setMenuLock(boolean z) {
        if (z != isMenuLocked()) {
            SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, Integer.toString(SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, 0) ^ 8));
        }
    }

    public static void setMonitorServiceStatus(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_MONITOR_SERVICE, String.valueOf(z));
    }

    public static void setNativeApFrequency(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_NATIVE_AP_FREQUENCY, z ? "5g" : "2g4");
    }

    public static void setNetworkLinkEnable(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_NETWORK_LINK, z ? NETWORK_LINK_ENABLE : "0");
    }

    public static void setPCBootChoice(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROP_PC_BOOT, str);
    }

    public static void setPCStandbyPowerState(boolean z) {
        SystemProperties.set(PERSIST_SYS_PC_POWER, String.valueOf(z));
    }

    public static void setPcStatus(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_PC_STATUS, Integer.toString(i2));
    }

    public static void setPenDetectEnable(boolean z) {
        SystemProperties.set(PERSIST_SYS_PEN_DETECT, String.valueOf(z));
    }

    public static void setPowerLock(boolean z) {
        if (z != isPowerLocked()) {
            SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, Integer.toString(SystemProperties.getInt(SeewoConstants.SYSTEM_PROPERTY_KEYS_VS_LOCK_STATE, 0) ^ 1));
        }
    }

    public static void setPropAccessBlack(String str) {
        SystemProperties.set(SeewoConstants.KEY_SYSTEM_PROP_ACCESS_BLACK, str);
    }

    public static void setProperty(String str, String str2) {
        SystemProperties.set(str, str2);
    }

    public static void setRecognizeSize(float f2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_RECOGNIZE_SIZE, Float.toString(f2));
    }

    public static void setRemotePowerOnStatus(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_POWER_ON_STATUS, Integer.toString(i2));
    }

    public static void setRemoteSwitch(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_IN_REMOTE_KEY, str);
    }

    public static void setReplaceGeneralApkKey(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_REPLACE_GENERAL_APK, str);
    }

    public static void setSI01DriverVersion(int i2) {
        SystemProperties.set(PERSIST_SYS_SI01_DRIVER_VERSION, String.valueOf(i2));
    }

    public static void setSTRMode(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_SHUTDOWN_LONGPRESS, Boolean.toString(z));
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_DDR_SELF_REFRESH, Boolean.toString(z));
    }

    public static void setScreenLockStatus(boolean z) {
        SystemProperties.set(SeewoConstants.PROPERTY_SYSTEM_SCREEN_LOCK, Boolean.toString(z));
    }

    public static void setScreenOrientation(String str) {
        SystemProperties.set("persist.sys.screenorientation", str);
    }

    public static void setScreenSaverInterval(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_SCREENSAVER_INTERVAL, str);
    }

    public static void setScreenShotType(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_SHOT_TYPE, Integer.toString(i2));
    }

    public static void setSettingMenuVisibility(boolean z) {
        SystemProperties.set(SeewoConstants.SETTING_MENU_VISIBLE, String.valueOf(z));
    }

    public static void setSetupwizardComplete(int i2) {
        SystemProperties.set(PERSIST_SYS_SETUP_COMPLETE, String.valueOf(i2));
    }

    public static void setSmartPenEnabled(Context context, boolean z) {
        if (context == null) {
            return;
        }
        Settings.Global.putInt(context.getContentResolver(), SeewoConstants.PROPERTY_SMART_PEN_ENABLE, z ? 1 : 0);
    }

    public static void setSoundCardNode(int i2) {
        SystemProperties.set("persist.sys.usbaudio.channel", String.valueOf(i2));
    }

    public static void setSupportDeveloper(boolean z) {
        SystemProperties.set("persist.sys.support.developer", String.valueOf(z));
    }

    public static final void setSystemAppsVersion(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_SYSTEM_APPS_VERSION, str);
    }

    public static void setSystemDockFlag(int i2) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_SYSTEMDOCK_FLAG, Integer.toString(i2));
    }

    public static void setSystemNetworkDebug(int i2) {
        SystemProperties.set(PERSIST_SYS_NETWORK_DEBUG, String.valueOf(i2));
    }

    public static void setSystemNetworkLog(int i2) {
        SystemProperties.set(PERSIST_SYS_NETWORK_LOG, String.valueOf(i2));
    }

    public static void setSystemSmartPenFunctionState(Context context, boolean z) {
        if (context == null) {
            return;
        }
        Settings.Global.putInt(context.getContentResolver(), SeewoConstants.KEY_IS_SMARTPEN_FUNCTION_ENABLED, z ? 1 : 0);
    }

    public static void setTVSourceId(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_TV_SOURCE_ID, str);
        Log.i(TAG, "set source id to " + str);
    }

    public static void setTimerShutdownType(String str) {
        SystemProperties.set(SeewoConstants.KEY_TIMER_SHUTDOWN_TYPE, str);
    }

    public static void setToolBarCallValue(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_IF_CALL_TOOLBAR_STATIC, str);
    }

    public static void setTouchState(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_IN_TOUCH_KEY, str);
    }

    public static void setUSBDiskEnable(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_USB_DISK_ENABLE, z ? "1" : "0");
    }

    public static void setUSBLockSwitch(boolean z) {
        SystemProperties.set(SeewoConstants.PROPERTY_USB_LOCK_SWITCH, Boolean.toString(z));
    }

    public static void setUartSwitch(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_ENABLE_UART, Integer.toString(z ? 1 : 0));
    }

    public static void setUpdateWiredStatus(int i2) {
        if (i2 < 0 || i2 > 2) {
            return;
        }
        SystemProperties.set(SeewoConstants.PROPERTIES_UPDATE, Integer.toString(i2));
    }

    public static void setUpgradeFinish(boolean z) {
        SystemProperties.set(PERSIST_SYS_UPGRADE_FINISH, String.valueOf(z));
    }

    public static void setWOLStatus(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_REMOTE_DUMMY_STANDBY_SWITCH, z ? SeewoConstants.VALUE_SWITCH_ON : SeewoConstants.VALUE_SWITCH_OFF);
    }

    public static void setWallpaperState(boolean z) {
        SystemProperties.set(PERSIST_SYS_SET_CUSTOM_WALLPAPER, String.valueOf(z));
    }

    public static void setWifiChannel(String str) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_WIFI_CHANNEL, str);
    }

    public static void setWifiCountrycode(String str) {
        SystemProperties.set(PERSIST_SYS_WIFI_COUNTRYCODE, str);
    }

    public static void setWorkingWriteApp(int i2, boolean z) {
        int workingWriteApp = getWorkingWriteApp();
        SystemProperties.set(SeewoConstants.APP_PROPERTY_WRITE, String.valueOf(z ? i2 | workingWriteApp : (~i2) & workingWriteApp));
    }

    public static void setWriteAcceleratorUnlock() {
        SystemProperties.set(SeewoConstants.APP_PROPERTY_WRITE_ACCELERATOR_LOCK, "0");
    }

    public static void setupRpcConflictedHandler() {
        SystemProperties.set("persist.sys.rpcip.conflicted", String.valueOf(1));
    }

    public static void switchAndroidRemoteFeature(boolean z) {
        SystemProperties.set(SeewoConstants.SYSTEM_PROPERTY_ANDROIDREMOTE_SWITCH, Boolean.toString(z));
    }

    public static void switchInstallAppsFeature(boolean z) {
        SystemProperties.set(SeewoConstants.FEATURE_INSTALL_APK, Boolean.toString(z));
    }

    public static void switchUmengFeature(boolean z) {
        SystemProperties.set(SeewoConstants.FEATURE_UMENG_FUNCTION, Boolean.toString(z));
    }

    public static void updateSystemGateWay(EthernetHelperInfo ethernetHelperInfo) {
        SystemProperties.set(SeewoConstants.ANDROID_NIC_GATEWAY_KEY, ethernetHelperInfo.getRouteAddr());
        SystemProperties.set(SeewoConstants.ANDROID_NID_DNS_KEY, ethernetHelperInfo.getDnsAddr());
        SystemProperties.set(SeewoConstants.ANDROID_NID_DNS2_KEY, ethernetHelperInfo.getDns2Addr());
    }
}
