package com.seewo.vcommons.data;

import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.text.TextUtils;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.seewo.hiddenapi.ContextInsider;
import com.seewo.hiddenapi.UserHandleInsider;
import com.seewo.vcommons.R;
import com.seewo.vcommons.constants.Platform;
import com.seewo.vcommons.constants.SeewoConstants;
import com.seewo.vcommons.constants.SeewoIntent;
import com.seewo.vcommons.constants.SeewoPackages;
import com.seewo.vcommons.cutomer.CustomerUtils;
import com.seewo.vcommons.model.MicroPhoneDevice;
import com.seewo.vcommons.model.NFCData;
import com.seewo.vcommons.model.NFCPassword;
import com.seewo.vcommons.utils.ActivityUtils;
import com.seewo.vcommons.utils.BoardTypeUtils;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

/* JADX INFO: loaded from: classes.dex */
public class PreferencesUtils {
    public static final String ACTION_PIN_CODE_SETTINGS_CHANGE = "com.ifpdos.action.pin_code_settings_change";
    private static final String AGING_VIDEO_PLAY_TIME = "aging_video_play_time";
    private static final String ANDROID_VERSION_VISIBLE = "android_version_visible";
    private static final String AUTO_UPDATE = "auto_update";
    private static final String BURNING_MODE_PLAY_TIME = "burning_mode_play_time";
    public static final int CHANNEL_BEFORE_SWITCH_DEFAULT = -1;
    private static final String CUSTOM_ABOUT_SYSTEM = "custom_about_system";
    private static final String CUSTOM_ANDROID_VERSION = "custom_android_version";
    private static final String CUSTOM_RAM_SIZE = "custom_ram_size";
    private static final String CUSTOM_ROM_SIZE = "custom_rom_size";
    private static final String DEFAULT_ACTIVE_LOCK_PWD = "ECDEA0C5C08B082A1882A95E0AB9FE92";
    private static final String DEFAULT_GATE_WAY = "www.remote-manage.com";
    private static final String DEFAULT_GLOBAL_LOCK_PASSWORD = "670B14728AD9902AECBA32E22FA4F6BD";
    private static final String DEFAULT_SETTINGS_DISPLAY_NAME = "Avocor AVE-5530";
    private static final String DEFAULT_TIME = "00000000";
    public static final int DEFAULT_USB_CHANNEL = -1;
    private static final String DEFAULT_USER_PW = "";
    private static final String FALSE_STRING = "false";
    private static final String FAMILY_MART_OTA_VERSION = "FAMILY_MART_OTA_VERSION";
    private static final Set<String> FC_TOUCH_SET;
    public static final int FILE_SAVE_ALWAYS = -1;
    public static final int FILE_SAVE_NEVER = 0;
    private static final String I3_TOUCH = "i3TOUCH";
    private static final String IS_SENSOR_MONITOR_SHOW = "IS_SENSOR_MONITOR_SHOW";
    private static final String KET_BOOT_ON_TYPE = "key_boot_on_type";
    private static final String KET_SETTINGS_LOCATION_DESCRIPTION = "key_settings_location_description";
    private static final String KET_SETTINGS_LOCATION_PLACE_ID = "key_settings_location_place_id";
    private static final String KET_SETTINGS_LONGITUDE_AND_LATITUDE = "key_settings_longitude_and_latitude";
    private static final String KET_SETTINGS_TEMPERATURE_UNIT = "key_settings_temperature_unit";
    private static final String KEY = "key";
    private static final String KEY_8153_MAC = "mac_8153";
    private static final String KEY_ABNORMAL_SHUTDOWN_COUNT = "ABNORMAL_SHUTDOWN_COUNT";
    private static final String KEY_ACCOUNT_DEVICE_LOCK = "key_account_device_lock";
    private static final String KEY_ACTIVATION_EXPIRE_TIME = "KEY_ACTIVATION_EXPIRE_TIME";
    private static final String KEY_ACTIVATION_TIME = "ACTIVATION_TIME";
    private static final String KEY_ACTIVE_LOCK_PWD = "key_active_lock_pwd";
    private static final String KEY_ACTIVE_LOCK_STATUS = "key_active_lock_status";
    private static final String KEY_ADB_SERVER_CONNECT_STATUS = "KEY_ADB_SERVER_CONNECT_STATUS";
    private static final String KEY_ADVANCED_PASSWORD = "KEY_ADVANCED_PASSWORD";
    private static final String KEY_ADVANCED_PASSWORD_SWITCH = "KEY_ADVANCED_PASSWORD_SWITCH";
    private static final String KEY_AIRCLASS_FULL_SCREEN = "KEY_AIRCLASS_FULL_SCREEN";
    private static final String KEY_AIRCLASS_SERVER = "KEY_AIRCLASS_SERVER";
    private static final String KEY_AMS_AUTO_LOGOUT_TIMEOUT = "KEY_AMS_AUTO_LOGOUT_TIMEOUT";
    private static final String KEY_AMS_LOGIN_STATUS = "KEY_AMS_LOGIN_STATUS";
    private static final String KEY_ANDROID_TOUCH_ENABLE = "KEY_ANDROID_TOUCH_ENABLE";
    private static final String KEY_AP_STATUS = "ap_status";
    private static final String KEY_AP_SUPPORT_5G = "ap_support_5g";
    private static final String KEY_ASSET_TAG = "KEY_ASSET_TAG";
    public static final String KEY_AUTOCHANNEL_SWITCH = "autochannel_switch";
    public static final String KEY_AUTO_BLACK_SCREEN_TIME = "AUTO_BLACK_SCREEN";
    public static final String KEY_AUTO_LOCK_SCREEN_TIME = "AUTO_LOCK_SCREEN_TIME";
    private static final String KEY_AUTO_OTA_UPDATE_STATE = "auto_ota_update_state";
    public static final String KEY_AUTO_POWER_OFF_TIME = "AUTO_POWER_OFF";
    private static final String KEY_AZURE_DEVICE_STRING = "KEY_AZURE_DEVICE_STRING";
    private static final String KEY_BENQ_EYE_CARE_STATUS = "KEY_BENQ_EYE_CARE_STATUS";
    private static final String KEY_BENQ_IR_MOUSE_ENABLE = "KEY_BENQ_IR_MOUSE_ENABLE";
    private static final String KEY_BENQ_IR_MOUSE_RUNNING = "KEY_BENQ_IR_MOUSE_RUNNING";
    private static final String KEY_CEC_MACHINE_OFF_PLAYER_OFF = "CEC_MACHINE_OFF_PLAYER_OFF";
    private static final String KEY_CEC_MACHINE_ON_PLAYER_ON = "CEC_MACHINE_ON_PLAYER_ON";
    private static final String KEY_CEC_PLAYER_OFF_MACHINE_OFF = "CEC_PLAYER_OFF_MACHINE_OFF";
    private static final String KEY_CEC_PLAYER_ON_MACHINE_ON = "CEC_PLAYER_ON_MACHINE_ON";
    private static final String KEY_CHANGE_SOURCE_SHORTCUT = "KEY_CHANGE_SOURCE_SHORTCUT";
    private static final String KEY_CHANNEL_SHORTCUT = "CHANNEL_SHORTCUT";
    private static final String KEY_CLOSE_SCREEN_SHUT_DOWN_TIME = "KEY_CLOSE_SCREEN_SHUT_DOWN";
    private static final String KEY_CLOUD_DRIVE_ENABLE = "cloud_drive_enable";
    private static final String KEY_COLOR_TEMP_RBG_VALUE = "KEY_COLOR_TEMP_RBG_VALUE";
    private static final String KEY_CONNECTION_STRING = "KEY_CONNECTION_STRING";
    private static final String KEY_COUNT_DOWN_OFF_TIME = "KEY_COUNT_DOWN_OFF_TIME";
    private static final String KEY_CURRENT_FRONT_USB_CHANNEL = "current_front_usb_channel";
    private static final String KEY_CURRENT_ON_TIME = "current_on_time";
    private static final String KEY_CURRENT_SOURCE = "current_source";
    private static final String KEY_CURRENT_SOURCE_FOR_SLOT = "current_source_for_slot";
    private static final String KEY_CURRENT_USER_ID = "KEY_CURRENT_USER_ID";
    private static final String KEY_CUSTOM_WINDOW_MODE_STATUS = "CUSTOM_WINDOW_MODE_STATUS";
    private static final String KEY_DAY_RUNNING_TIME = "KEY_DAY_RUNNING_TIME";
    private static final String KEY_DEFAULT_SOUND_OUT_VOLUME = "DEFAULT_SOUND_OUT_VOLUME";
    private static final String KEY_DEFAULT_TOOLBAR_TYPE = "default_toolbar_type";
    private static final String KEY_DEFAULT_VOLUME = "DEFAULT_VOLUME";
    private static final String KEY_DELETE_FILES = "delete_file_names_new";
    private static final String KEY_DEVICE_ALIAS_NAME = "device_alias_name";
    private static final String KEY_DISPLAY_POWER_MANAGEMENT = "KEY_DISPLAY_POWER_MANAGEMENT";
    private static final String KEY_DOUBLE_COLOR_PEN = "KEY_DOUBLE_COLOR_PEN";
    private static final String KEY_D_LINK = "KEY_D_LINK_STATUS";
    private static final String KEY_ETHERNET_SWITCH_STATE = "ethernet_switch_state";
    private static final String KEY_EYE_CARE_MODE = "KEY_EYE_CARE_MODE";
    private static final String KEY_EYE_CARE_STATE = "KEY_EYE_CARE_STATE";
    private static final String KEY_F2_CAMERA_VERSION = "KEY_F2_CAMERA_VERSION";
    private static final String KEY_F2_MIC_VERSION = "KEY_F2_MIC_VERSION";
    private static final String KEY_FACTORY_IR_TRABSMIT = "KEY_FACTORY_IR_TRABSMIT";
    private static final String KEY_FAKE_POWER_OFF_CHANNEL = "KEY_FAKE_POWER_OFF_CHANNEL";
    private static final String KEY_FAKE_STANDBY = "KEY_FAKE_STANDBY";
    private static final String KEY_FILE_SAVE_DURATION = "key_file_save_duration";
    private static final String KEY_FILE_SAVE_DURATION_MIN = "key_file_save_duration_min";
    private static final String KEY_FLICKER_FREE = "flicker_free";
    private static final String KEY_FRONT_USB_CHANNEL = "front_usb_channel";
    private static final String KEY_GATEWAY_ADDR_KEY = "manual_gateway_addr";
    private static final String KEY_GESTURE_FUNCTION_DOWN = "KEY_GESTURE_FUNCTION_DOWN";
    private static final String KEY_GESTURE_FUNCTION_ENABLE = "KEY_GESTURE_FUNCTION_ENABLE";
    private static final String KEY_GESTURE_FUNCTION_LEFT = "KEY_GESTURE_FUNCTION_LEFT";
    private static final String KEY_GESTURE_FUNCTION_RIGHT = "KEY_GESTURE_FUNCTION_RIGHT";
    private static final String KEY_GESTURE_FUNCTION_UP = "KEY_GESTURE_FUNCTION_UP";
    private static final String KEY_GESTURE_TOUCH_LOCK_ENABLE = "KEY_GESTURE_TOUCH_LOCK_ENABLE";
    private static final String KEY_GLOBAL_LOCK_PASSWORD = "KEY_GLOBAL_LOCK_PASSWORD";
    private static final String KEY_HAD_SET_COUNTRY_CODE = "KEY_HAD_SET_COUNTRY_CODE";
    private static final String KEY_HALF_WINDOW_MODE_STATUS = "HALF_WINDOW_MODE_STATUS";
    private static final String KEY_HDMI_OUT_SET = "hdmi_out_set";
    private static final String KEY_HIDE_LAUNCHER_TIME = "KEY_HIDE_LAUNCHER_TIME";
    private static final String KEY_HISI_BLUETOOTH_STATUS = "hisi_bluetooth_status";
    private static final String KEY_HISI_WIFI_STATUS = "hisi_wifi_status";
    private static final String KEY_HOME_THEME_MODE = "KEY_HOME_THEME_MODE";
    private static final String KEY_HOST_AP_ENABLE = "HOST_DEVICE_AP_ENABLE";
    private static final String KEY_HOST_AP_PSW = "HOST_DEVICE_AP_PSW";
    private static final String KEY_HOST_AP_SSID = "HOST_DEVICE_AP_SSID";
    private static final String KEY_HOST_DEVICE_IP = "HOST_DEVICE_IP";
    private static final String KEY_HOST_NET_TYPE = "HOST_DEVICE_NET_TYPE";
    private static final String KEY_HOST_WIFI_PSW = "HOST_DEVICE_WIFI_PSW";
    private static final String KEY_HOST_WIFI_SSID = "HOST_DEVICE_WIFI_SSID";
    private static final String KEY_HOTSPOT_ENABLE = "KEY_HOTSPOT_ENABLE";
    private static final String KEY_HUB_USB_SWITCH_POSITION = "hub_switch_position";
    public static final String KEY_INTERCEPT_AUTO_BLACK_SCREEN = "KEY_INTERCEPT_AUTO_BLACK_SCREEN";
    private static final String KEY_INTO_SECURITY_PASSWORD = "KEY_INTO_SECURITY_PASSWORD";
    private static final String KEY_IN_PASS_THROUGH = "pass_through";
    private static final String KEY_IOT_BROKER_IP = "KEY_IOT_BROKER_IP";
    private static final String KEY_IOT_DEVICE_ID = "KEY_IOT_DEVICE_ID";
    private static final String KEY_IOT_PRODUCT_KEY = "KEY_IOT_PRODUCT_KEY";
    private static final String KEY_IOT_PRODUCT_SECRET = "KEY_IOT_PRODUCT_SECRET";
    private static final String KEY_IOT_REGISTER = "KEY_IOT_REGISTER";
    private static final String KEY_IOT_SECRET_KEY = "KEY_IOT_SECRET_KEY";
    private static final String KEY_IS_AUTO_SEARCH_CHANNEL = "KEY_IS_AUTO_SEARCH_CHANNEL";
    private static final String KEY_IS_ENABLE_PASSWORD_SETTING = "KEY_IS_ENABLE_PASSWORD_SETTING";
    private static final String KEY_IS_ENABLE_PC_RECOVERY_BUTTON = "KEY_IS_ENABLE_PC_RECOVERY_BUTTON";
    private static final String KEY_IS_LAST_TIME_NORMAL_SHUTDOWN = "normal_shutdown";
    private static final String KEY_IS_LOCK_SCREEN = "KEY_IS_LOCK_SCREEN";
    private static final String KEY_IS_MODIFY_WIFI_SPOT_SSID = "KEY_IS_MODIFY_WIFI_SPOT_SSID";
    private static final String KEY_IS_NOT_FIRST_BOOT = "KEY_IS_NOT_FIRST_BOOT";
    private static final String KEY_IS_ONE_NET_MACHINE = "IS_ONE_NET_MACHINE";
    private static final String KEY_IS_REMOVE_MYSELF_USER = "KEY_IS_REMOVE_MYSELF_USER";
    private static final String KEY_IS_REMOVE_MYSELF_USER_ID = "KEY_IS_REMOVE_MYSELF_USER_ID";
    private static final String KEY_IS_SENSORS_INFO_SHOW = "IS_SENSORS_INFO_SHOW";
    private static final String KEY_IS_SUPPORT_NFC = "KEY_IS_SUPPORT_NFC";
    private static final String KEY_IS_TOUCHMENU_ENABLED = "key_is_touchmenu_enabled";
    private static final String KEY_KEEP_TOUCH_IN_PC = "KEY_KEEP_TOUCH_IN_PC";
    private static final String KEY_LAN_RS232_AUTH_PASSWORD = "KEY_LAN_RS232_AUTH_PASSWORD";
    private static final String KEY_LAN_RS232_MODE = "KEY_LAN_RS232_MODE";
    private static final String KEY_LASTSOURCE = "last_source";
    private static final String KEY_LAST_ETH_ENABLE = "KEY_LAST_ETH_ENABLE";
    private static final String KEY_LAST_OFF_TIME = "last_off_time";
    private static final String KEY_LAST_ON_TIME = "last_on_time";
    private static final String KEY_LAST_POWER_OFF_STATE = "last_power_off_state";
    private static final String KEY_LAST_POWER_STATE = "last_power_state";
    private static final String KEY_LAUNCHER_MODE = "KEY_LAUNCHER_MODE";
    private static final String KEY_LED_SWITCH = "led_switch";
    private static final String KEY_LOCAL_ROOT_PATH = "root_path";
    private static final String KEY_MANUAL_BT_STATUS = "KEY_MANUAL_BT_STATUS";
    private static final String KEY_MANUAL_CVTE_AP_STATUS = "KEY_MANUAL_CVTE_AP_STATUS";
    private static final String KEY_MANUAL_NATIVE_AP_STATUS = "KEY_MANUAL_NATIVE_AP_STATUS";
    private static final String KEY_MANUAL_WIFI_STATUS = "KEY_MANUAL_WIFI_STATUS";
    public static final int KEY_MAP_ALL = 1;
    public static final int KEY_MAP_NONE = 0;
    private static final String KEY_MAP_PORTS_TYPE = "map_ports_type";
    public static final int KEY_MAP_SECIFIC = 2;
    private static final String KEY_MARK_SAVE_ENABLE = "mark_save_enalbe";
    private static final String KEY_MDA_MUTE_STATE = "MDA_MUTE_STATE";
    public static final int KEY_MDA_MUTE_STATE_OFF = 0;
    public static final int KEY_MDA_MUTE_STATE_ON = 1;
    private static final String KEY_MEDIA_DEVICE_STATUS = "KEY_MEDIA_DEVICE_STATUS";
    private static final String KEY_MEETING_EXPLORER_SETTING_PASSWORD = "key_meeting_explorer_setting_password";
    private static final String KEY_MENU_KEYPAD_EVENT = "KEY_MENU_KEYPAD_EVENT";
    private static final String KEY_MICROPHONE_DEVICES = "KEY_MICROPHONE_DEVICES";
    private static final String KEY_MIC_MUTE = "KEY_MIC_MUTE";
    private static final String KEY_MIC_USB_CHANNEL = "KEY_MIC_USB_CHANNEL";
    private static final String KEY_MULTI_SHOW_SYSTEM_GUIDE = "KEY_MULTI_SHOW_SYSTEM_GUIDE";
    private static final String KEY_NATIVE_AP_STATUS = "key_native_ap_status";
    public static final String KEY_NETWORK_STATE = "network_state";
    private static final String KEY_NFC_DATA = "KEY_NFC_DATA";
    private static final String KEY_NFC_PASSWORD = "KEY_NFC_PASSWORD";
    private static final String KEY_NOTE_NOT_ERASER_AREAS = "KEY_NOTE_NOT_ERASER_AREAS";
    public static final String KEY_NO_SIGNAL_MODE = "KEY_NO_SIGNAL_MODE";
    private static final String KEY_OPEN_TOUCH_MENU_MODE_BOTTOM = "KEY_OPEN_TOUCH_MENU_MODE_BOTTOM";
    private static final String KEY_OPEN_TOUCH_MENU_MODE_FINGER = "KEY_OPEN_TOUCH_MENU_MODE_FINGER";
    private static final String KEY_OPEN_TOUCH_MENU_MODE_HOME = "KEY_OPEN_TOUCH_MENU_MODE_HOME";
    private static final String KEY_OSD_INFORMATION_TIME = "KEY_INFORMATION_TIME";
    private static final String KEY_PANEL_LOCK_STATE = "panel_lock_state";
    private static final String KEY_PC_INFO_8152_MAC = "pc_info_8152_mac";
    private static final String KEY_PC_INFO_ALL_MAC = "pc_info_all_mac";
    private static final String KEY_PC_INFO_CPU = "pc_info_cpu";
    private static final String KEY_PC_INFO_CPU_SN = "pc_info_cpu_sn";
    private static final String KEY_PC_INFO_DEVICE_ID = "pc_info_device_id";
    private static final String KEY_PC_INFO_DISK = "pc_info_disk";
    private static final String KEY_PC_INFO_DISK_SN = "pc_info_disk_sn";
    private static final String KEY_PC_INFO_GHOST_TIME = "pc_info_ghost_time";
    private static final String KEY_PC_INFO_GHOST_VERSION = "pc_info_ghost_version";
    private static final String KEY_PC_INFO_MEMORY = "pc_info_memory";
    private static final String KEY_PC_INFO_MOTHERBOARD = "pc_info_motherboard";
    private static final String KEY_PC_INFO_OS = "pc_info_os";
    private static final String KEY_PC_INFO_RAM_SN = "pc_info_ram_sn";
    private static final String KEY_PC_INFO_RAM_SN_V2 = "pc_info_ram_sn_v2";
    private static final String KEY_PC_INFO_SN = "pc_info_sn";
    private static final String KEY_PC_INFO_SN_V2 = "pc_info_sn_v2";
    private static final String KEY_PC_INFO_VIDEOCARD = "pc_info_videocard";
    private static final String KEY_PERSON_IDENTIFICATION = "person_identification";
    public static final String KEY_PHYSICAL_BUTTON_TYPE = "KEY_PHYSICAL_BUTTON_TYPE";
    public static final String KEY_PIN_CODE_FLOATING_WINDOW_ENABLE = "pin_code_floating_window_enable";
    public static final String KEY_PIN_CODE_FLOATING_WINDOW_SIZE = "pin_code_floating_window_size";
    public static final String KEY_PIN_CODE_REFRESH_RATE = "pin_code_refresh_rate";
    private static final String KEY_PIR_OFF_SECONDS = "KEY_PIR_OFF_SECONDS";
    private static final String KEY_PLATFORM_DEVICE_ID = "KEY_PLATFORM_DEVICE_ID";
    private static final String KEY_PLATFORM_VERSION = "KEY_PLATFORM_VERSION";
    private static final String KEY_PORT_MAP_MODE = "KEY_PORT_MAP_MODE";
    private static final String KEY_POWER_BUTTON_TO_INPUT_SOURCE = "KEY_POWER_BUTTON_TO_INPUT_SOURCE";
    private static final String KEY_POWER_BUTTON_WITH_WINDOWS_FUNCTION_KEY = "KEY_POWER_BUTTON_WITH_WINDOWS_FUNCTION_KEY";
    private static final String KEY_POWER_LOCK_MODE = "KEY_POWER_LOCK_MODE";
    private static final String KEY_POWER_OFF_STATE = "power_off_state";
    private static final String KEY_POWER_PHYSICAL_BUTTON_MODE = "KEY_POWER_PHYSICAL_BUTTON_MODE";
    public static final int KEY_POWER_SAVE_HIGH = 2;
    public static final int KEY_POWER_SAVE_LOW = 1;
    public static final int KEY_POWER_SAVE_OFF = 0;
    private static final String KEY_POWER_SAVE_STATE = "POWER_SAVE_STATE";
    private static final String KEY_QUICK_SOURCE = "KEY_QUICK_SOURCE";
    private static final String KEY_REMOTE_ADMIN_WORD = "KEY_REMOTE_ADMIN_WORD";
    private static final String KEY_REMOTE_CLIENT_NAME = "remote_client_name";
    private static final String KEY_REMOTE_CONNECTED = "remote_connected";
    private static final String KEY_REMOTE_CONTROL = "KEY_REMOTE_CONTROL";
    private static final String KEY_REMOTE_GATE_WAY = "KEY_REMOTE_GATE_WAY";
    private static final String KEY_REMOTE_HOST_NAME = "remote_host_name";
    private static final String KEY_REMOTE_IP = "remote_ip";
    private static final String KEY_REMOTE_RESIDENT_CONTENT = "remote_resident_content";
    private static final String KEY_REMOTE_RESIDENT_STATUS = "remote_resident_status";
    private static final String KEY_REMOTE_SCHOOL_CODE = "KEY_REMOTE_SCHOOL_CODE";
    private static final String KEY_REMOTE_SCHOOL_NAME = "KEY_REMOTE_SCHOOL_NAME";
    private static final String KEY_REMOTE_SERVER_IP = "KEY_REMOTE_SERVER_IP";
    private static final String KEY_REMOTE_SERVER_PORT = "KEY_REMOTE_SERVER_PORT";
    private static final String KEY_REMOTE_VIDEO_SOURCES = "key_remote_video_sources";
    private static final String KEY_RESET_WALLPAPER_FOR_OTA = "KEY_RESET_WALLPAPER_FOR_OTA";
    private static final String KEY_RS232_SWITCH = "rs232_switch";
    public static final String KEY_SAHARA_PASSWORD = "sahara_password";
    private static final String KEY_SAMBA_PASSWORD = "KEY_SAMBA_PASSWORD";
    private static final String KEY_SAMBA_START = "KEY_SAMBA_START";
    private static final String KEY_SAMBA_USERNAME = "KEY_SAMBA_USERNAME";
    private static final String KEY_SCREENLOCK_SWITCH = "screenlock_switch";
    private static final String KEY_SCREEN_SAVER = "screen_saver";
    private static final String KEY_SCREEN_STATUS = "KEY_SCREEN_STATUS";
    private static final String KEY_SECURE_MODE = "KEY_SECURE_MODE";
    private static final String KEY_SENSOR_AIR_DATA = "KEY_SENSOR_AIR_DATA";
    private static final String KEY_SENSOR_CO2_DATA = "KEY_SENSOR_CO2_DATA";
    private static final String KEY_SENSOR_HUMIDITY_DATA = "KEY_SENSOR_HUMIDITY_DATA";
    private static final String KEY_SENSOR_LAST_TIME = "KEY_SENSOR_LAST_TIME";
    private static final String KEY_SENSOR_PIR_DATA = "KEY_SENSOR_PIR_DATA";
    private static final String KEY_SENSOR_TEMPERATURE_DATA = "KEY_SENSOR_TEMPERATURE_DATA";
    private static final String KEY_SETTINGS_AUTO_POWER = "key_settings_auto_power";
    private static final String KEY_SETTINGS_DISPLAY_NAME = "key_settings_display_name";
    private static final String KEY_SETTINGS_LOCK_PWD = "KEY_SETTINGS_LOCK_PWD";
    private static final String KEY_SETTINGS_PASSWORD = "setting_password";
    private static final String KEY_SET_TIME_COLOR = "key_set_time_color";
    private static final String KEY_SHOW_BOOT_LOGO = "show_boot_logo";
    private static final String KEY_SHOW_LAUNCHER_APPLICATION = "KEY_SHOW_LAUNCHER_APPLICATION";
    private static final String KEY_SHOW_SENSOR_DATA_IN_LAUNCHER = "KEY_SHOW_SENSOR_DATA_IN_LAUNCHER";
    private static final String KEY_SIDE_BUTTON_TO_INPUT_SOURCE = "KEY_SIDE_BUTTON_TO_INPUT_SOURCE";
    private static final String KEY_SIDE_BUTTON_WITH_WINDOWS_FUNCTION_KEY = "KEY_SIDE_BUTTON_WITH_WINDOWS_FUNCTION_KEY";
    private static final String KEY_SIDE_PHYSICAL_BUTTON_MODE = "KEY_SIDE_PHYSICAL_BUTTON_MODE";
    private static final String KEY_SIDE_USB_CHANNEL = "KEY_SIDE_USB_CHANNEL";
    private static final String KEY_SLIDE_BOOT = "slide_boot";
    private static final String KEY_SLIDE_INTERVAL = "KEY_SLIDE_INTERVAL";
    private static final String KEY_SLOT_ETH0 = "slot_eth0";
    private static final String KEY_SMARTPEN_PAIRED = "smart_pen_paired";
    private static final String KEY_SMART_PEN_STATE = "KEY_SMART_PEN_STATE";
    private static final String KEY_SMOOTH_FILTER_LEVEL = "KEY_SMOOTH_FILTER_LEVEL";
    private static final String KEY_SOUND_CARD_NODE = "KEY_SOUND_CARD_NODE";
    private static final String KEY_SOURCE_BEFOR_SWITCH = "source_before_switch";
    private static final String KEY_SOURCE_LIST_FOR_SLOT = "source_list_for_slot";
    private static final String KEY_SP20_SENSITIVITY = "KEY_SP20_SENSITIVITY";
    private static final String KEY_SPECIFIC_PORTS = "specific_ports";
    private static final String KEY_SUPPORT_DEVELOPER = "KEY_SUPPORT_DEVELOPER";
    public static final String KEY_SUPPORT_INTERCEPT_AUTO_BLACK_SCREEN = "KEY_SUPPORT_INTERCEPT_AUTO_BLACK_SCREEN";
    private static final String KEY_SUPPORT_WIFI_AP_DUPLEX = "wifi_ap_support_duplex";
    private static final String KEY_TEMPERATURE_UNIT = "KEY_TEMPERATURE_UNIT";
    private static final String KEY_TEMPERATURE_VALUE = "KEY_TEMPERATURE_VALUE";
    private static final String KEY_TEMP_SETTINGS_PASSWORD = "setting_temp_password";
    private static final String KEY_TIME_RECORD = "KEY_TIME_RECORD";
    private static final String KEY_TOUCHMENU_SWITCH = "touchmenu_switch";
    public static final String KEY_TOUCH_CHECKSUM = "key_touch_check_sum";
    private static final String KEY_TOUCH_OUT_USB1_INSERT = "KEY_TOUCH_OUT_USB1_INSERT";
    private static final String KEY_TOUCH_OUT_USB2_INSERT = "KEY_TOUCH_OUT_USB2_INSERT";
    public static final String KEY_TOUCH_POINT = "key_touch_point";
    private static final String KEY_USB_DISABLE_ALLOWED = "usb_disable_allowed";
    private static final String KEY_USB_PATH = "usb_path";
    private static final String KEY_USB_WIFI_PASSWORD = "key_usb_wifi_password";
    private static final String KEY_USERS_INIT = "KEY_USERS_INIT";
    private static final String KEY_USER_ID = "KEY_USER_ID";
    private static final String KEY_USE_SAMBA_PASSWORD = "KEY_USE_SAMBA_PASSWORD";
    private static final String KEY_U_DISK_FORBID = "key_u_disk_forbid";
    private static final String KEY_VCAST_FORBIDDEN_BACKUP = "KEY_VCAST_FORBIDDEN_BACKUP";
    private static final String KEY_VGA_AUTO_ADJUST = "KEY_VGA_AUTO_ADJUST";
    private static final String KEY_VOLUME_MUTE = "KEY_VOLUME_MUTE";
    private static final String KEY_VR_TYPE = "vr_type";
    private static final String KEY_VS_CUSTOM_DEBUG_MENU_CODE = "vs_custom_debug_menu_code";
    private static final String KEY_VS_LAUNCHER_APPS_PACKAGE_NAME = "vs_launcher_apps_package_name";
    private static final String KEY_V_LAUNCHER_APP_DRAWER_ENABLE = "KEY_V_LAUNCHER_APP_DRAWER_ENABLE";
    private static final String KEY_WALLPAPER_NAME = "wallpaper_name";
    private static final String KEY_WIFI_SUPPORT_WPA3 = "wifi_support_wpa3";
    private static final String KEY_WIFI_USB_CHANNEL = "KEY_WIFI_USB_CHANNEL";
    private static final String KEY_WOS_SOURCE_ENABLE = "KEY_WOS_SOURCE_ENABLE_";
    public static final int KIOSK_MODE_CLASS = 2;
    public static final int KIOSK_MODE_NONE = 0;
    public static final int KIOSK_MODE_TOUCH_LOCK = 1;
    public static final String KIOSK_TEN_FINGER_MODE = "kiosk_ten_finger_mode";
    private static final String LOCAL_HOST_IP = "local_host_ip";
    private static final int MAX_BACKLIGHT = 100;
    public static final String ORIGINAL_TIME = "00:00:00";
    private static final int OWNER_USER_ID = 0;
    public static final int PIN_CODE_FLOATING_WINDOW_MINI = 1;
    public static final int PIN_CODE_FLOATING_WINDOW_NORMAL = 2;
    public static final int SWITCH_POSITION_DEFAULT = -1;
    public static final int SWITCH_POSITION_LEFT = 1;
    public static final int SWITCH_POSITION_RIGHT = 2;
    private static final String TAG = "PreferencesUtils";
    public static final String TOUCHMENU_CALL_GESTURE = "touchmenu_gesture";
    private static final String TRUE_STRING = "true";
    private static final String VALUE = "value";
    public static final int VALUE_BOOT_ON_CUSTOM = 4;
    public static final int VALUE_BOOT_ON_LAST_SOURCE = 1;
    public static final int VALUE_BOOT_ON_SOURCE = 2;
    public static final int VALUE_BOOT_ON_USB_AUTO_PLAY = 3;
    public static final int VALUE_GESTURE_FUNCTION_DESKTOP = 3;
    public static final int VALUE_GESTURE_FUNCTION_HALF_SCREEN = 4;
    public static final int VALUE_GESTURE_FUNCTION_MARK = 1;
    public static final int VALUE_GESTURE_FUNCTION_NONE = 0;
    public static final int VALUE_GESTURE_FUNCTION_SCREEN_OFF = 2;
    public static final int VALUE_KEEPER = 2;
    public static final int VALUE_MODE_ANDROID_SLOT = 2;
    public static final int VALUE_MODE_CLOSE = 0;
    public static final int VALUE_MODE_CUSTOM = 3;
    public static final int VALUE_MODE_PC = 1;
    public static final int VALUE_NO_SIGNAL_POWER_OFF = 0;
    public static final int VALUE_NO_SIGNAL_SCREEN_OFF = 1;
    public static final int VALUE_SHUT_DOWN_DEFAULT_TIME = -1;
    public static final int VALUE_TOUCH_MENU = 0;
    public static final int VALUE_VIDEO_PRESENTER = 1;
    private static final String VIEW_SONIC_BACKLIGHT_KEY = "view_sonic_backlight_key";
    public static final int VR_TYPE_SV06 = 0;
    public static final int VR_TYPE_SV07 = 1;
    private static final String WRITING_TOUCH_POINTS = "writing_touch_point";
    private static final String WRITING_TOUCH_POINTS_MULTIPLE = "multiple";
    private static final String WRITING_TOUCH_POINTS_SINGLE = "single";
    private static UserContentResolver sUserContentResolver;
    private static Gson sGson = new Gson();
    private static final Uri COOMMON_URI = Uri.parse("content://com.seewo.osservice.provider.VCommonContentProvider/key");

    public enum ANDROIDREMOTE_STATUS {
        CONNECTED,
        DISCONNECTED,
        CONNECTING,
        DISCONNECTING,
        BIND,
        BINDING,
        UNBIND,
        UNBINDING
    }

    public enum AirClassServerType {
        LAN,
        INTERNET
    }

    public enum DeviceType {
        ALL,
        IR,
        KEYPAD,
        VIRTUAL,
        OTHERS,
        NONE
    }

    public enum HomeThemeMode {
        AUTO,
        BUSINESS,
        EDUCATION
    }

    public enum LanRS232Mode {
        CLOSE,
        NOT_AUTH,
        AUTH
    }

    public enum LauncherMode {
        CORPORATE,
        EDUCATION,
        WCD
    }

    public enum POWER_PHYSICAL_BUTTON_MODE {
        SLEEP,
        SWITCH_INPUT_SOURCE,
        FREEZE_IMAGE,
        WINDOWS_TASK_VIEW,
        WINDOWS_FUNCTION_KEY,
        SCREEN_CAPTURE,
        FREEZE_TOUCH
    }

    public enum SIDE_PHYSICAL_BUTTON_MODE {
        NO_ACTION,
        SWITCH_INPUT_SOURCE,
        FREEZE_IMAGE,
        WINDOWS_TASK_VIEW,
        WINDOWS_FUNCTION_KEY,
        SCREEN_CAPTURE,
        FREEZE_TOUCH
    }

    public enum SOURCE_SHORTCUT_STATUS {
        CLOSE,
        PC_ANDROID,
        LAST_ONE
    }

    public enum TOUCHMENU_CALL_GESTURE {
        DOUBLE_TAP,
        SWIPE_UP,
        BOTH,
        NONE,
        DISABLED
    }

    public enum WINDOWS_FUNCTION_KEY {
        F1,
        F2,
        F3,
        F4,
        F5,
        F6,
        F7,
        F8,
        F9,
        F10,
        F11,
        F12
    }

    static {
        HashSet hashSet = new HashSet(5);
        FC_TOUCH_SET = hashSet;
        hashSet.add("FC86WHD-SW-C3-20P,4608-2693");
        hashSet.add("FC75WHD-SW-C3-20P,4608-9C3F");
        hashSet.add("FC70WHD-SW-C3-20P,4608-1478");
        hashSet.add("FC65WHD-SW-A3-20P,4608-BA4E");
        hashSet.add("FC55WHD-SW-A3-20P,4608-D1AC");
    }

    public enum PHYSICAL_BUTTON_TYPE {
        SOURCE,
        VIZUALISER,
        FINDER,
        SETTINGS;

        public static PHYSICAL_BUTTON_TYPE valueOf(int i) {
            if (i < 0 || i >= values().length) {
                throw new IndexOutOfBoundsException("Invalid ordinal");
            }
            return values()[i];
        }
    }

    private static boolean putString(ContentResolver contentResolver, String str, String str2) {
        ContentValues contentValues = new ContentValues();
        contentValues.put("key", str);
        contentValues.put(VALUE, str2);
        try {
            return contentResolver.update(COOMMON_URI, contentValues, null, null) > 0;
        } catch (Exception e) {
            Log.e(TAG, "Preferences#putString error, maybe URI is wrong.", e);
            return false;
        }
    }

    private static String getString(ContentResolver contentResolver, String str) {
        String string = "";
        Cursor cursorQuery = null;
        try {
            try {
                cursorQuery = contentResolver.query(COOMMON_URI, new String[]{str}, null, null, null);
                if (cursorQuery != null && cursorQuery.moveToFirst()) {
                    string = cursorQuery.getString(0);
                }
            } catch (Exception e) {
                Log.e(TAG, "Preferences#getString error, maybe URI is wrong.", e);
                if (cursorQuery != null) {
                }
            }
            return string;
        } finally {
            if (cursorQuery != null) {
                cursorQuery.close();
            }
        }
    }

    public static boolean putStringAsUser(Context context, String str, String str2, int i) {
        UserContentResolver userContentResolver = sUserContentResolver;
        if (userContentResolver == null) {
            sUserContentResolver = new UserContentResolver(context, i);
        } else {
            userContentResolver.setUserId(i);
        }
        return putString(sUserContentResolver, str, str2);
    }

    public static boolean putBooleanAsUser(Context context, String str, boolean z, int i) {
        return putStringAsUser(context, str, z ? "true" : FALSE_STRING, i);
    }

    public static boolean putIntAsUser(Context context, String str, int i, int i2) {
        return putStringAsUser(context, str, String.valueOf(i), i2);
    }

    public static String getStringAsUser(Context context, String str, String str2, int i) {
        String stringAsUser = getStringAsUser(context, str, i);
        return TextUtils.isEmpty(stringAsUser) ? str2 : stringAsUser;
    }

    public static boolean putString(Context context, String str, String str2) {
        return putString(context.getContentResolver(), str, str2);
    }

    public static boolean putBoolean(Context context, String str, boolean z) {
        return putString(context, str, z ? "true" : FALSE_STRING);
    }

    public static boolean putInt(Context context, String str, int i) {
        return putString(context, str, String.valueOf(i));
    }

    public static boolean putLong(Context context, String str, long j) {
        return putString(context, str, String.valueOf(j));
    }

    public static boolean putLongAsUser(Context context, String str, long j, int i) {
        return putStringAsUser(context, str, String.valueOf(j), i);
    }

    public static String getString(Context context, String str, String str2) {
        String string = getString(context, str);
        return TextUtils.isEmpty(string) ? str2 : string;
    }

    public static String getString(Context context, String str) {
        return getString(context.getContentResolver(), str);
    }

    public static String getStringAsUser(Context context, String str, int i) {
        UserContentResolver userContentResolver = sUserContentResolver;
        if (userContentResolver == null) {
            sUserContentResolver = new UserContentResolver(context, i);
        } else {
            userContentResolver.setUserId(i);
        }
        return getString(sUserContentResolver, str);
    }

    public static boolean getBooleanAsUser(Context context, String str, int i) {
        return "true".equals(getStringAsUser(context, str, i));
    }

    public static boolean getBooleanAsUser(Context context, String str, boolean z, int i) {
        String stringAsUser = getStringAsUser(context, str, i);
        return TextUtils.isEmpty(stringAsUser) ? z : "true".equals(stringAsUser);
    }

    public static int getIntAsUser(Context context, String str, int i, int i2) {
        String stringAsUser = getStringAsUser(context, str, i2);
        if (TextUtils.isEmpty(stringAsUser)) {
            return i;
        }
        try {
            return Integer.parseInt(stringAsUser);
        } catch (Exception e) {
            Log.e(TAG, "Exception", e);
            return i;
        }
    }

    public static boolean getBoolean(Context context, String str) {
        return "true".equals(getString(context, str));
    }

    public static boolean getBoolean(Context context, String str, boolean z) {
        String string = getString(context, str);
        return TextUtils.isEmpty(string) ? z : "true".equals(string);
    }

    public static int getInt(Context context, String str, int i) {
        String string = getString(context, str);
        if (TextUtils.isEmpty(string)) {
            return i;
        }
        try {
            return Integer.parseInt(string);
        } catch (Exception e) {
            Log.e(TAG, "Exception", e);
            return i;
        }
    }

    public static long getLong(Context context, String str, long j) {
        String string = getString(context, str);
        if (TextUtils.isEmpty(string)) {
            return j;
        }
        try {
            return Long.parseLong(string);
        } catch (Exception e) {
            Log.e(TAG, "Exception", e);
            return j;
        }
    }

    public static long getLongAsUser(Context context, String str, long j, int i) {
        String stringAsUser = getStringAsUser(context, str, i);
        if (TextUtils.isEmpty(stringAsUser)) {
            return j;
        }
        try {
            return Long.parseLong(stringAsUser);
        } catch (Exception e) {
            Log.e(TAG, "Exception", e);
            return j;
        }
    }

    public static int getViewSonicCustomizedBackLight(Context context) {
        String string = getString(context, VIEW_SONIC_BACKLIGHT_KEY);
        if (TextUtils.isEmpty(string)) {
            return 100;
        }
        return Integer.parseInt(string);
    }

    public static void setViewSonicCustomizedBackLight(Context context, int i) {
        putString(context, VIEW_SONIC_BACKLIGHT_KEY, String.valueOf(i));
    }

    public static String getRemoteServerIp(Context context) {
        return getStringAsUser(context, KEY_REMOTE_IP, UserHandleInsider.myUserId());
    }

    public static void setRemoteServerIp(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_IP, str, UserHandleInsider.myUserId());
    }

    public static String getRemoteServerHostName(Context context) {
        return getStringAsUser(context, KEY_REMOTE_HOST_NAME, UserHandleInsider.myUserId());
    }

    public static void setRemoteServerHostName(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_HOST_NAME, str, UserHandleInsider.myUserId());
    }

    public static String getRemoteClientName(Context context) {
        return getStringAsUser(context, KEY_REMOTE_CLIENT_NAME, UserHandleInsider.myUserId());
    }

    public static void setRemoteClientName(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_CLIENT_NAME, str, UserHandleInsider.myUserId());
    }

    public static ANDROIDREMOTE_STATUS getRemoteStatus(Context context) {
        String stringAsUser = getStringAsUser(context, KEY_REMOTE_CONNECTED, UserHandleInsider.myUserId());
        if (TextUtils.isEmpty(stringAsUser)) {
            return ANDROIDREMOTE_STATUS.DISCONNECTED;
        }
        try {
            return ANDROIDREMOTE_STATUS.valueOf(stringAsUser);
        } catch (Exception e) {
            Log.e(TAG, "convert to enum ANDROIDREMTOE_STATUS error", e);
            return ANDROIDREMOTE_STATUS.DISCONNECTED;
        }
    }

    public static void setRemoteConnectStatus(Context context, ANDROIDREMOTE_STATUS androidremote_status) {
        putStringAsUser(context, KEY_REMOTE_CONNECTED, androidremote_status.name(), UserHandleInsider.myUserId());
    }

    public static void setRemoteVideoSources(Context context, String str) {
        putString(context, KEY_REMOTE_VIDEO_SOURCES, str);
    }

    public static String getRemoteVideoSources(Context context) {
        return getString(context, KEY_REMOTE_VIDEO_SOURCES);
    }

    public static void setRemoteResdentModeStatus(Context context, boolean z) {
        if (z) {
            putStringAsUser(context, KEY_REMOTE_RESIDENT_STATUS, "true", UserHandleInsider.myUserId());
        } else {
            putStringAsUser(context, KEY_REMOTE_RESIDENT_STATUS, FALSE_STRING, UserHandleInsider.myUserId());
        }
    }

    public static boolean getRemoteResdentModeStatus(Context context) {
        String stringAsUser = getStringAsUser(context, KEY_REMOTE_RESIDENT_STATUS, UserHandleInsider.myUserId());
        return (TextUtils.isEmpty(stringAsUser) || stringAsUser.equals(FALSE_STRING) || !stringAsUser.equals("true")) ? false : true;
    }

    public static void setRemoteResdentModeContent(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_RESIDENT_CONTENT, str, UserHandleInsider.myUserId());
    }

    public static String getRemoteResdentModeContent(Context context) {
        return getStringAsUser(context, KEY_REMOTE_RESIDENT_CONTENT, UserHandleInsider.myUserId());
    }

    public static void setPcInfoMotherBoard(Context context, String str) {
        putString(context, KEY_PC_INFO_MOTHERBOARD, str);
    }

    public static String getPcInfoMotherBoard(Context context) {
        return getString(context, KEY_PC_INFO_MOTHERBOARD);
    }

    public static void setPcInfoCPU(Context context, String str) {
        putString(context, KEY_PC_INFO_CPU, str);
    }

    public static String getPcInfoCPU(Context context) {
        return getString(context, KEY_PC_INFO_CPU);
    }

    public static void setPcInfoMemory(Context context, String str) {
        putString(context, KEY_PC_INFO_MEMORY, str);
    }

    public static String getPcInfoMemory(Context context) {
        return getString(context, KEY_PC_INFO_MEMORY);
    }

    public static void setPcInfoDisk(Context context, String str) {
        putString(context, KEY_PC_INFO_DISK, str);
    }

    public static String getPcInfoDisk(Context context) {
        return getString(context, KEY_PC_INFO_DISK);
    }

    public static void setPcInfoVideoCard(Context context, String str) {
        putString(context, KEY_PC_INFO_VIDEOCARD, str);
    }

    public static String getPcInfoVideoCard(Context context) {
        return getString(context, KEY_PC_INFO_VIDEOCARD);
    }

    public static void setPcInfoOS(Context context, String str) {
        putString(context, KEY_PC_INFO_OS, str);
    }

    public static String getPcInfoOS(Context context) {
        return getString(context, KEY_PC_INFO_OS);
    }

    public static void setPcInfoSN(Context context, String str) {
        putString(context, KEY_PC_INFO_SN, str);
    }

    public static String getPcInfoSN(Context context) {
        return getString(context, KEY_PC_INFO_SN);
    }

    public static void setPcInfoDeviceId(Context context, String str) {
        putString(context, KEY_PC_INFO_DEVICE_ID, str);
    }

    public static String getPcInfoDeviceId(Context context) {
        return getString(context, KEY_PC_INFO_DEVICE_ID);
    }

    public static void setPcInfoGhostVersion(Context context, String str) {
        putString(context, KEY_PC_INFO_GHOST_VERSION, str);
    }

    public static String getPcInfoGhostVersion(Context context) {
        return getString(context, KEY_PC_INFO_GHOST_VERSION);
    }

    public static void setPcInfoGhostTime(Context context, String str) {
        putString(context, KEY_PC_INFO_GHOST_TIME, str);
    }

    public static String getPcInfoGhostTime(Context context) {
        return getString(context, KEY_PC_INFO_GHOST_TIME);
    }

    public static void setPcInfo8152Mac(Context context, String str) {
        putString(context, KEY_PC_INFO_8152_MAC, str);
    }

    public static String getPcInfo8152Mac(Context context) {
        return getString(context, KEY_PC_INFO_8152_MAC);
    }

    public static void setPcInfoRamSN(Context context, String str) {
        putString(context, KEY_PC_INFO_RAM_SN, str);
    }

    public static String getPcInfoRamSN(Context context) {
        return getString(context, KEY_PC_INFO_RAM_SN);
    }

    public static String getPcInfoAllMac(Context context) {
        return getString(context, KEY_PC_INFO_ALL_MAC);
    }

    public static void setPcInfoAllMac(Context context, String str) {
        putString(context, KEY_PC_INFO_ALL_MAC, str);
    }

    public static String getPcInfoCpuSn(Context context) {
        return getString(context, KEY_PC_INFO_CPU_SN);
    }

    public static void setPcInfoCpuSn(Context context, String str) {
        putString(context, KEY_PC_INFO_CPU_SN, str);
    }

    public static void setPcInfoRamSNV2(Context context, String str) {
        putString(context, KEY_PC_INFO_RAM_SN_V2, str);
    }

    public static String getPcInfoRamSNV2(Context context) {
        return getString(context, KEY_PC_INFO_RAM_SN_V2);
    }

    public static void setPcInfoSNV2(Context context, String str) {
        putString(context, KEY_PC_INFO_SN_V2, str);
    }

    public static String getPcInfoSNV2(Context context) {
        return getString(context, KEY_PC_INFO_SN_V2);
    }

    public static void setPcInfoDiskSN(Context context, String str) {
        putString(context, KEY_PC_INFO_DISK_SN, str);
    }

    public static String getPcInfoDiskSN(Context context) {
        return getString(context, KEY_PC_INFO_DISK_SN);
    }

    public static void setSmartPenPaired(Context context, boolean z) {
        putString(context, KEY_SMARTPEN_PAIRED, z ? "true" : FALSE_STRING);
    }

    public static boolean isSmartPenPaired(Context context) {
        String string = getString(context, KEY_SMARTPEN_PAIRED);
        return string != null && string.equals("true");
    }

    public static void setRs232Switch(Context context, boolean z) {
        putString(context, KEY_RS232_SWITCH, z ? "true" : FALSE_STRING);
    }

    public static boolean isRs232Enable(Context context) {
        return getBoolean(context, KEY_RS232_SWITCH, true);
    }

    public static void setLedSwitch(Context context, boolean z) {
        putString(context, KEY_LED_SWITCH, z ? "true" : FALSE_STRING);
    }

    public static boolean isLedSwitchEnable(Context context) {
        return getBoolean(context, KEY_LED_SWITCH);
    }

    public static void setSaharaPassword(Context context, String str) {
        putString(context, KEY_SAHARA_PASSWORD, str);
    }

    public static String getSaharaPassword(Context context) {
        return getString(context, KEY_SAHARA_PASSWORD);
    }

    public static void setNetworkState(Context context, boolean z) {
        putBoolean(context, KEY_NETWORK_STATE, z);
    }

    public static void setNetworkStateAndNotify(Context context, boolean z) {
        putBoolean(context, KEY_NETWORK_STATE, z);
        ContentResolver contentResolver = context.getContentResolver();
        if (contentResolver != null) {
            contentResolver.notifyChange(COOMMON_URI, null);
        }
    }

    public static boolean getNetworkState(Context context) {
        if (BoardTypeUtils.is510Machine73Version() || BoardTypeUtils.is551Machine()) {
            return ((ConnectivityManager) context.getSystemService("connectivity")).getNetworkInfo(9).isConnected();
        }
        return getBoolean(context, KEY_NETWORK_STATE);
    }

    public static void setManualStateGateWayAddr(Context context, String str) {
        putString(context, KEY_GATEWAY_ADDR_KEY, str);
    }

    public static String getManualStateGateWayAddr(Context context) {
        return getString(context, KEY_GATEWAY_ADDR_KEY);
    }

    public static void setAutoChannelSwitchStatus(Context context, boolean z) {
        putBoolean(context, KEY_AUTOCHANNEL_SWITCH, z);
    }

    public static boolean getAutoChannelSwitchStatus(Context context) {
        return getBoolean(context, KEY_AUTOCHANNEL_SWITCH, true);
    }

    public static void setTouchCheckSum(Context context, String str) {
        putStringAsUser(context, KEY_TOUCH_CHECKSUM, str, 0);
    }

    public static String getTouchCheckSum(Context context) {
        return getStringAsUser(context, KEY_TOUCH_CHECKSUM, 0);
    }

    public static boolean isFcTouchVersion(Context context) {
        return FC_TOUCH_SET.contains(getTouchCheckSum(context));
    }

    public static void setCustomRamSize(Context context, String str) {
        putString(context, CUSTOM_RAM_SIZE, str);
    }

    public static String getCustomRamSize(Context context) {
        String string = getString(context, CUSTOM_RAM_SIZE);
        return string.isEmpty() ? PropertiesUtils.getAndroidRam() : string;
    }

    public static void setCustomRomSize(Context context, String str) {
        putString(context, CUSTOM_ROM_SIZE, str);
    }

    public static String getCustomRomSize(Context context) {
        String string = getString(context, CUSTOM_ROM_SIZE);
        return string.isEmpty() ? PropertiesUtils.getAndroidRom() : string;
    }

    public static void setCustomAboutSystem(Context context, String str) {
        putString(context, CUSTOM_ABOUT_SYSTEM, str);
    }

    public static String getCustomAboutSystem(Context context) {
        String string = getString(context, CUSTOM_ABOUT_SYSTEM);
        return string.isEmpty() ? "RAM  " + PropertiesUtils.getAndroidRam() + "\nROM  " + PropertiesUtils.getAndroidRom() : string;
    }

    public static void setCustomAndroidVersion(Context context, String str) {
        putString(context, CUSTOM_ANDROID_VERSION, str);
    }

    public static String getCustomAndroidVersion(Context context) {
        String string = getString(context, CUSTOM_ANDROID_VERSION);
        return string.isEmpty() ? PropertiesUtils.getAndroidVersion() : string;
    }

    public static void setAndroidVersionVisible(Context context, boolean z) {
        putBoolean(context, ANDROID_VERSION_VISIBLE, z);
    }

    public static boolean isAndroidVersionVisible(Context context) {
        return getBoolean(context, ANDROID_VERSION_VISIBLE, false);
    }

    public static void setLocalHostIp(Context context, String str) {
        putString(context, LOCAL_HOST_IP, str);
    }

    public static String getLocalHostIp(Context context) {
        return getString(context, LOCAL_HOST_IP);
    }

    public static void setAgingVideoPlayTime(Context context, String str) {
        putString(context, AGING_VIDEO_PLAY_TIME, str);
    }

    public static String getAgingVideoPlayTime(Context context) {
        String string = getString(context, AGING_VIDEO_PLAY_TIME);
        return (string == null || string.isEmpty()) ? ORIGINAL_TIME : string;
    }

    public static void setBurningModePlayTime(Context context, String str) {
        putString(context, BURNING_MODE_PLAY_TIME, str);
    }

    public static String getBurningModePlayTime(Context context) {
        String string = getString(context, BURNING_MODE_PLAY_TIME);
        return (string == null || string.isEmpty()) ? ORIGINAL_TIME : string;
    }

    public static void setIsMultiPointsWriting(Context context, boolean z) {
        if (z) {
            putString(context, WRITING_TOUCH_POINTS, WRITING_TOUCH_POINTS_MULTIPLE);
        } else {
            putString(context, WRITING_TOUCH_POINTS, WRITING_TOUCH_POINTS_SINGLE);
        }
        context.sendBroadcast(new Intent(SeewoIntent.ACTION_UPDATE_WRITE_POINT));
    }

    public static boolean getIsMultiPointsWriting(Context context) {
        String string = getString(context, WRITING_TOUCH_POINTS);
        if (string == null || string.isEmpty()) {
            return !isSinglePointsWriting();
        }
        if (WRITING_TOUCH_POINTS_SINGLE.equals(string)) {
            return false;
        }
        if (WRITING_TOUCH_POINTS_MULTIPLE.equals(string)) {
            return true;
        }
        Log.e(TAG, "getIsMultiPointsWriting contains a illegal value");
        return !isSinglePointsWriting();
    }

    private static boolean isSinglePointsWriting() {
        if (BoardTypeUtils.is551Machine() && CustomerUtils.isChaoyeCustomized()) {
            return true;
        }
        if (CustomerUtils.is638ForeignFightMachine() || ((CustomerUtils.isSeewoCustomized() && BoardTypeUtils.is510Machine()) || CustomerUtils.isSeewoBytelloCustomized())) {
            return false;
        }
        return CustomerUtils.isSeewoCustomized() || CustomerUtils.is638GeneralEnCustomized();
    }

    public static void recordLastSource(Context context, String str) {
        if (CustomerUtils.isInfocusCustomized() && str.equals(SeewoConstants.CHANNEL_ATV)) {
            return;
        }
        putString(context, KEY_LASTSOURCE, str);
    }

    public static String getLastSource(Context context) {
        return getString(context, KEY_LASTSOURCE);
    }

    public static void setCurrentSource(Context context, String str) {
        putString(context, KEY_CURRENT_SOURCE, str);
    }

    public static String getCurrentSource(Context context) {
        return getString(context, KEY_CURRENT_SOURCE);
    }

    public static void setScreenLockStatus(Context context, boolean z) {
        putBoolean(context, KEY_SCREENLOCK_SWITCH, z);
        ActivityUtils.setAppEnable(context, SeewoPackages.SCREENLOCK_PACKAGE, z);
    }

    public static boolean isScreenLockEnable(Context context) {
        return getBoolean(context, KEY_SCREENLOCK_SWITCH, CustomerUtils.isForeignMachine());
    }

    public static void setCurrentSourceInAndroidSlot(Context context, String str) {
        putStringAsUser(context, KEY_CURRENT_SOURCE_FOR_SLOT, str, 0);
    }

    public static String getCurrentSourceInAndroidSlot(Context context) {
        return getStringAsUser(context, KEY_CURRENT_SOURCE_FOR_SLOT, 0);
    }

    public static void setSourceListInAndroidSlot(Context context, String str) {
        putStringAsUser(context, KEY_SOURCE_LIST_FOR_SLOT, str, 0);
    }

    public static String getSourceListInAndroidSlot(Context context) {
        return getStringAsUser(context, KEY_SOURCE_LIST_FOR_SLOT, 0);
    }

    public static void setFrontUsbChannel(Context context, int i) {
        putString(context, KEY_FRONT_USB_CHANNEL, String.valueOf(i));
    }

    public static int getFrontUsbChannel(Context context) {
        String string = getString(context, KEY_FRONT_USB_CHANNEL);
        if ("".equals(string)) {
            return -1;
        }
        return Integer.valueOf(string).intValue();
    }

    public static void setCurrentFrontUsbChannel(Context context, int i) {
        putString(context, KEY_CURRENT_FRONT_USB_CHANNEL, String.valueOf(i));
    }

    public static int getCurrentFrontUsbChannel(Context context) {
        String string = getString(context, KEY_CURRENT_FRONT_USB_CHANNEL);
        if ("".equals(string)) {
            if (CustomerUtils.isAverLCustomized()) {
                return 0;
            }
            return CustomerUtils.isAverCustomized() ? 6 : 8;
        }
        return Integer.valueOf(string).intValue();
    }

    public static void setHiWifiStatus(Context context, boolean z) {
        Log.d(TAG, "[" + context.getPackageName() + "] setHiWifiStatus: " + z);
        putBooleanAsUser(context, KEY_HISI_WIFI_STATUS, z, 0);
    }

    public static boolean getHiWifiStatus(Context context) {
        boolean booleanAsUser = getBooleanAsUser(context, KEY_HISI_WIFI_STATUS, 0);
        boolean zHasEmbeddedWifiModule = PropertiesUtils.hasEmbeddedWifiModule();
        boolean z = booleanAsUser || zHasEmbeddedWifiModule;
        Log.d(TAG, "[" + context.getPackageName() + "] getHiWifiStatus: " + z + ", hiWifiStatus=" + booleanAsUser + ", hasEmbeddedWifiModule=" + zHasEmbeddedWifiModule);
        return z;
    }

    public static void setNativeApStatus(Context context, boolean z) {
        Log.d(TAG, "[" + context.getPackageName() + "] setNativeApStatus: " + z);
        putBooleanAsUser(context, KEY_NATIVE_AP_STATUS, z, 0);
    }

    public static boolean getNativeApStatus(Context context) {
        boolean booleanAsUser = getBooleanAsUser(context, KEY_NATIVE_AP_STATUS, 0);
        Log.d(TAG, "[" + context.getPackageName() + "] getNativeApStatus: " + booleanAsUser);
        return booleanAsUser;
    }

    public static void setApStatus(Context context, boolean z) {
        Log.d(TAG, "[" + context.getPackageName() + "] setApStatus: " + z);
        putBooleanAsUser(context, KEY_AP_STATUS, z, 0);
    }

    public static boolean getApStatus(Context context) {
        boolean booleanAsUser = getBooleanAsUser(context, KEY_AP_STATUS, 0);
        Log.d(TAG, "[" + context.getPackageName() + "] getApStatus: " + booleanAsUser);
        return booleanAsUser;
    }

    public static boolean getOpenWrtApStatus() {
        String embeddedAPType = PropertiesUtils.getEmbeddedAPType();
        boolean zEquals = SeewoConstants.AP_TYPE_OPEN_WRT.equals(embeddedAPType);
        Log.d(TAG, "embeddedAPType: " + embeddedAPType + ", result: " + zEquals);
        return zEquals;
    }

    public static void setHiBluetoothStatus(Context context, boolean z) {
        Log.d(TAG, "[" + context.getPackageName() + "] setHiBluetoothStatus: " + z);
        putBooleanAsUser(context, KEY_HISI_BLUETOOTH_STATUS, z, 0);
    }

    public static boolean getHiBluetoothStatus(Context context) {
        boolean booleanAsUser = getBooleanAsUser(context, KEY_HISI_BLUETOOTH_STATUS, 0);
        Log.d(TAG, "[" + context.getPackageName() + "] getHiBluetoothStatus: " + booleanAsUser);
        return booleanAsUser;
    }

    public static void setMDAMuteState(Context context, int i) {
        putString(context, KEY_MDA_MUTE_STATE, String.valueOf(i));
    }

    public static int getMDAMuteState(Context context) {
        String string = getString(context, KEY_MDA_MUTE_STATE);
        if (TextUtils.isEmpty(string)) {
            return -1;
        }
        try {
            return Integer.valueOf(string).intValue();
        } catch (NumberFormatException e) {
            Log.d(TAG, "getMDAMuteState convert to integer error", e);
            return -1;
        }
    }

    public static void setPowerSaveState(Context context, int i) {
        putIntAsUser(context, KEY_POWER_SAVE_STATE, i, 0);
    }

    public static int getPowerSaveState(Context context) {
        return getIntAsUser(context, KEY_POWER_SAVE_STATE, 2, 0);
    }

    public static void setDeleteFiles(Context context, String str) {
        putString(context, KEY_DELETE_FILES, str);
    }

    public static String getDeleteFiles(Context context) {
        return getString(context, KEY_DELETE_FILES);
    }

    public static void setLastTouchMenuStatus(Context context, boolean z) {
        putBooleanAsUser(context, KEY_TOUCHMENU_SWITCH, z, 0);
    }

    public static boolean getLastTouchMenuStatus(Context context) {
        return getBooleanAsUser(context, KEY_TOUCHMENU_SWITCH, true, 0);
    }

    public static void setSettingsPassword(Context context, String str) {
        putStringAsUser(context, KEY_SETTINGS_PASSWORD, str, 0);
    }

    public static String getSettingsPassword(Context context) {
        return getStringAsUser(context, KEY_SETTINGS_PASSWORD, 0);
    }

    public static void setTempSettingsPassword(Context context, String str) {
        putStringAsUser(context, KEY_TEMP_SETTINGS_PASSWORD, str, 0);
    }

    public static String getUsbWifiPassword(Context context) {
        return getStringAsUser(context, KEY_USB_WIFI_PASSWORD, 0);
    }

    public static void setUsbWifiPassword(Context context, String str) {
        putStringAsUser(context, KEY_USB_WIFI_PASSWORD, str, 0);
    }

    public static String getTempSettingsPassword(Context context) {
        return getStringAsUser(context, KEY_TEMP_SETTINGS_PASSWORD, 0);
    }

    public static String getLauncherLogoText(Context context) {
        return getString(context, SeewoConstants.KEY_SAHARA_LAUNCHER_LOGO_TEXT);
    }

    public static String getLauncherLogoTypeFace(Context context) {
        return getString(context, SeewoConstants.KEY_SAHARA_LAUNCHER_LOGO_TEXT_TYPEFACE);
    }

    public static void setLauncherLogoText(Context context, String str) {
        putString(context, SeewoConstants.KEY_SAHARA_LAUNCHER_LOGO_TEXT, str);
    }

    public static void setLauncherLogoTypeFace(Context context, String str) {
        putString(context, SeewoConstants.KEY_SAHARA_LAUNCHER_LOGO_TEXT_TYPEFACE, str);
    }

    public static void setWallpaperName(Context context, String str) {
        putString(context, "wallpaper_name", str);
        ContentResolver contentResolver = context.getContentResolver();
        if (contentResolver != null) {
            contentResolver.notifyChange(COOMMON_URI, null);
        }
    }

    public static String getWallpaperName(Context context) {
        return getString(context, "wallpaper_name", "wallpaper_default");
    }

    public static void registerContentObserver(Context context, ContentObserver contentObserver) {
        context.getContentResolver().registerContentObserver(COOMMON_URI, false, contentObserver);
    }

    public static void unRegisterContentObserver(Context context, ContentObserver contentObserver) {
        context.getContentResolver().unregisterContentObserver(contentObserver);
    }

    public static void setDefaultToolbarType(Context context, String str) {
        putString(context, KEY_DEFAULT_TOOLBAR_TYPE, str);
    }

    public static String getDefaultToolbarType(Context context) {
        return getString(context, KEY_DEFAULT_TOOLBAR_TYPE);
    }

    public static void setSlideBootEnable(Context context, boolean z) {
        putBoolean(context, KEY_SLIDE_BOOT, z);
    }

    public static boolean isSlideBootEnabled(Context context) {
        return getBoolean(context, KEY_SLIDE_BOOT, true);
    }

    public static void setPersonIdentificationStatus(Context context, boolean z) {
        putBoolean(context, KEY_PERSON_IDENTIFICATION, z);
    }

    public static boolean getPersonIdentificationStatus(Context context) {
        return getBoolean(context, KEY_PERSON_IDENTIFICATION, false);
    }

    public static void setDeviceAliasName(Context context, String str) {
        putString(context, KEY_DEVICE_ALIAS_NAME, str);
    }

    public static String getDeviceAliasName(Context context, String str) {
        String string = getString(context, KEY_DEVICE_ALIAS_NAME);
        return TextUtils.isEmpty(string) ? (CustomerUtils.isI3Customized() && Platform.isOlder(11)) ? I3_TOUCH : PropertiesUtils.getAliasProductModel(str) : string;
    }

    public static void setUSBPath(Context context, String str) {
        putString(context, KEY_USB_PATH, str);
    }

    public static String getUSBPath(Context context) {
        return getString(context, KEY_USB_PATH);
    }

    public static void setEthernetSwitcherState(Context context, boolean z) {
        putBoolean(context, KEY_ETHERNET_SWITCH_STATE, z);
    }

    public static boolean getEthernetSwitcherState(Context context) {
        return getBoolean(context, KEY_ETHERNET_SWITCH_STATE, true);
    }

    public static void setLastOnTime(Context context, String str) {
        putString(context, KEY_LAST_ON_TIME, str);
    }

    public static String getLastOnTime(Context context) {
        String string = getString(context, KEY_LAST_ON_TIME);
        return TextUtils.isEmpty(string) ? DEFAULT_TIME : string;
    }

    public static void setLastOffTime(Context context, String str) {
        putString(context, KEY_LAST_OFF_TIME, str);
    }

    public static String getLastOffTime(Context context) {
        String string = getString(context, KEY_LAST_OFF_TIME);
        return TextUtils.isEmpty(string) ? DEFAULT_TIME : string;
    }

    public static void setCurrentOnTime(Context context, String str) {
        putString(context, KEY_CURRENT_ON_TIME, str);
    }

    public static String getCurrentOnTime(Context context) {
        String string = getString(context, KEY_CURRENT_ON_TIME);
        return TextUtils.isEmpty(string) ? DEFAULT_TIME : string;
    }

    public static void setFlickerFreeEnable(Context context, boolean z) {
        putBoolean(context, KEY_FLICKER_FREE, z);
    }

    public static boolean isFlickerFreeEnabled(Context context) {
        return getBoolean(context, KEY_FLICKER_FREE, false);
    }

    public static void setTouchMenuState(Context context, boolean z) {
        putBoolean(context, KEY_IS_TOUCHMENU_ENABLED, z);
    }

    public static boolean isTouchMenuEnabled(Context context) {
        return getBoolean(context, KEY_IS_TOUCHMENU_ENABLED, true);
    }

    public static void setAutoUpdate(Context context, boolean z) {
        putBoolean(context, AUTO_UPDATE, z);
    }

    public static boolean isAutoUpdate(Context context) {
        return getBoolean(context, AUTO_UPDATE, false);
    }

    public static String getCurrentRootPath(Context context) {
        String string = getString(context, KEY_LOCAL_ROOT_PATH);
        return TextUtils.isEmpty(string.trim()) ? Environment.getExternalStorageDirectory().getPath() : string;
    }

    public static void setCurrentRootPath(Context context, String str) {
        putString(context, KEY_LOCAL_ROOT_PATH, str);
    }

    public static void setScreenSaverEnable(Context context, boolean z) {
        putBooleanAsUser(context, KEY_SCREEN_SAVER, z, 0);
    }

    public static boolean isScreenSaverEnabled(Context context) {
        return getBooleanAsUser(context, KEY_SCREEN_SAVER, CustomerUtils.isArmaCustomized() && BoardTypeUtils.is638Machine(), 0);
    }

    public static void setPassThroughEnable(Context context, boolean z) {
        putBoolean(context, KEY_IN_PASS_THROUGH, z);
    }

    public static boolean isPassThroughEnabled(Context context) {
        return getBoolean(context, KEY_IN_PASS_THROUGH, false);
    }

    public static void setPortsMapType(Context context, int i) {
        putInt(context, KEY_MAP_PORTS_TYPE, i);
    }

    public static int getPortsMapType(Context context) {
        return getInt(context, KEY_MAP_PORTS_TYPE, 1);
    }

    public static void setSpecificPorts(Context context, int[] iArr) {
        StringBuilder sb = new StringBuilder();
        for (int i : iArr) {
            sb.append(i);
            sb.append("#");
        }
        sb.deleteCharAt(sb.length() - 1);
        putString(context, KEY_SPECIFIC_PORTS, sb.toString());
    }

    public static int[] getSpecificPorts(Context context) {
        String string = getString(context, KEY_SPECIFIC_PORTS);
        if (string.isEmpty()) {
            return context.getResources().getIntArray(R.array.specific_map_ports_array);
        }
        String[] strArrSplit = string.split("#");
        int[] iArr = new int[strArrSplit.length];
        for (int i = 0; i < strArrSplit.length; i++) {
            iArr[i] = Integer.parseInt(strArrSplit[i]);
        }
        return iArr;
    }

    public static void setAPSupport5G(Context context, boolean z) {
        putBoolean(context, KEY_AP_SUPPORT_5G, z);
    }

    public static boolean isAPSupport5G(Context context) {
        return getBoolean(context, KEY_AP_SUPPORT_5G, false);
    }

    public static void setShowBootLogo(Context context, boolean z) {
        putBoolean(context, KEY_SHOW_BOOT_LOGO, z);
    }

    public static boolean isShowBootLogo(Context context) {
        return getBoolean(context, KEY_SHOW_BOOT_LOGO, true);
    }

    public static void setHdmiOutStatus(Context context, boolean z) {
        putBoolean(context, KEY_HDMI_OUT_SET, z);
    }

    public static boolean isHdmiOutSet(Context context) {
        return getBoolean(context, KEY_HDMI_OUT_SET, false);
    }

    public static void setSlotEth0(Context context, boolean z) {
        putBoolean(context, KEY_SLOT_ETH0, z);
    }

    public static boolean isSlotEth0(Context context) {
        return getBoolean(context, KEY_SLOT_ETH0, false);
    }

    public static boolean isNormalShutdownLastTime(Context context) {
        return getBoolean(context, KEY_IS_LAST_TIME_NORMAL_SHUTDOWN, false);
    }

    public static void setNormalShutdownLastTime(Context context, boolean z) {
        putBoolean(context, KEY_IS_LAST_TIME_NORMAL_SHUTDOWN, z);
    }

    public static void setTouchPoint(Context context, String str) {
        putString(context, KEY_TOUCH_POINT, str);
    }

    public static String getTouchPoint(Context context) {
        return getString(context, KEY_TOUCH_POINT, "0");
    }

    public static void setVRType(Context context, int i) {
        putInt(context, KEY_VR_TYPE, i);
    }

    public static int getVRType(Context context) {
        return getInt(context, KEY_VR_TYPE, 1);
    }

    public static void setUsbSwitchPosition(Context context, int i) {
        putInt(context, KEY_HUB_USB_SWITCH_POSITION, i);
    }

    public static int getUsbSwitchPosition(Context context) {
        return getInt(context, KEY_HUB_USB_SWITCH_POSITION, -1);
    }

    public static void setUsbSourceBeforeSwitch(Context context, int i) {
        putInt(context, KEY_SOURCE_BEFOR_SWITCH, i);
    }

    public static int getUsbSourceBeforeSwitch(Context context) {
        return getInt(context, KEY_SOURCE_BEFOR_SWITCH, -1);
    }

    public static String getGlobalLockPassword(Context context) {
        return getString(context, KEY_GLOBAL_LOCK_PASSWORD, DEFAULT_GLOBAL_LOCK_PASSWORD);
    }

    public static void setGlobalLockPassword(Context context, String str) {
        putString(context, KEY_GLOBAL_LOCK_PASSWORD, str);
    }

    public static void setWifiSupportWPA3(Context context, boolean z) {
        putBoolean(context, KEY_WIFI_SUPPORT_WPA3, z);
    }

    public static boolean getWifiSupportWPA3(Context context) {
        return getBoolean(context, KEY_WIFI_SUPPORT_WPA3, false);
    }

    public static void setDLinkStatus(Context context, boolean z) {
        putBooleanAsUser(context, KEY_D_LINK, z, 0);
    }

    public static boolean getDLinkStatus(Context context) {
        return getBooleanAsUser(context, KEY_D_LINK, false, 0);
    }

    public static String getRemoteGateWay(Context context) {
        Log.i("Manager_", "getRemoteGateWay: " + UserHandleInsider.myUserId());
        return getStringAsUser(context, KEY_REMOTE_GATE_WAY, DEFAULT_GATE_WAY, UserHandleInsider.myUserId());
    }

    public static void setRemoteGateWay(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_GATE_WAY, str, UserHandleInsider.myUserId());
    }

    public static String getRemoteSchoolCode(Context context) {
        return getStringAsUser(context, KEY_REMOTE_SCHOOL_CODE, UserHandleInsider.myUserId());
    }

    public static void setRemoteSchoolCode(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_SCHOOL_CODE, str, UserHandleInsider.myUserId());
    }

    public static String getRemoteIP(Context context) {
        return getStringAsUser(context, KEY_REMOTE_SERVER_IP, UserHandleInsider.myUserId());
    }

    public static void setRemoteIP(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_SERVER_IP, str, UserHandleInsider.myUserId());
    }

    public static String getRemotePort(Context context) {
        return getStringAsUser(context, KEY_REMOTE_SERVER_PORT, UserHandleInsider.myUserId());
    }

    public static void setRemotePort(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_SERVER_PORT, str, UserHandleInsider.myUserId());
    }

    public static String getRemoteAdminWord(Context context) {
        return getStringAsUser(context, KEY_REMOTE_ADMIN_WORD, UserHandleInsider.myUserId());
    }

    public static void setRemoteAdminWord(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_ADMIN_WORD, str, UserHandleInsider.myUserId());
    }

    public static String getRemoteSchoolName(Context context, String str) {
        return getStringAsUser(context, KEY_REMOTE_SCHOOL_NAME, getDeviceAliasName(context, str), UserHandleInsider.myUserId());
    }

    public static void setRemoteSchoolName(Context context, String str) {
        putStringAsUser(context, KEY_REMOTE_SCHOOL_NAME, str, UserHandleInsider.myUserId());
    }

    public static void setQuickSourceName(Context context, String str) {
        putString(context, KEY_QUICK_SOURCE, str);
    }

    public static String getQuickSourceName(Context context) {
        return getString(context, KEY_QUICK_SOURCE);
    }

    public static void setFakeStandby(Context context, boolean z) {
        putBoolean(context, KEY_FAKE_STANDBY, z);
    }

    public static boolean getFakeStandby(Context context) {
        return getBoolean(context, KEY_FAKE_STANDBY, false);
    }

    public static void setPlatformDeviceId(Context context, String str) {
        putString(context, KEY_PLATFORM_DEVICE_ID, str);
    }

    public static String getPlatformDeviceId(Context context) {
        return getString(context, KEY_PLATFORM_DEVICE_ID);
    }

    public static void setPlatformVersion(Context context, String str) {
        putString(context, KEY_PLATFORM_VERSION, str);
    }

    public static String getPlatformVersion(Context context) {
        return getString(context, KEY_PLATFORM_VERSION);
    }

    public static void setFamilyMaryOTAVersion(Context context, String str) {
        putString(context, FAMILY_MART_OTA_VERSION, str);
    }

    public static String getFamilyMaryOTAVersion(Context context) {
        return getString(context, FAMILY_MART_OTA_VERSION);
    }

    public static void setADBServerConnectStatus(Context context, boolean z) {
        putBooleanAsUser(context, KEY_ADB_SERVER_CONNECT_STATUS, z, 0);
    }

    public static boolean isADBServerConnected(Context context) {
        return getBooleanAsUser(context, KEY_ADB_SERVER_CONNECT_STATUS, false, 0);
    }

    public static void setUserPassword(Context context, int i, String str) {
        putStringAsUser(context, KEY_USER_ID + Integer.toString(i), str, 0);
    }

    public static String getUserPassword(Context context, int i) {
        return getStringAsUser(context, KEY_USER_ID + Integer.toString(i), "", 0);
    }

    public static int getCurrentUserId(Context context) {
        return getIntAsUser(context, KEY_CURRENT_USER_ID, 0, 0);
    }

    public static void setCurrentUserId(Context context, int i) {
        putIntAsUser(context, KEY_CURRENT_USER_ID, i, 0);
    }

    public static void setUsersInit(Context context, boolean z) {
        putBooleanAsUser(context, KEY_USERS_INIT, z, 0);
    }

    public static boolean getUsersInit(Context context) {
        return getBooleanAsUser(context, KEY_USERS_INIT, 0);
    }

    public static void setTimeColor(Context context, String str) {
        putString(context, KEY_SET_TIME_COLOR, str);
    }

    public static String getTimeColor(Context context) {
        return getString(context, KEY_SET_TIME_COLOR, "#FFFFFF");
    }

    public static boolean isLockScreen(Context context) {
        return getBooleanAsUser(context, KEY_IS_LOCK_SCREEN, 0);
    }

    public static void setLockScreen(Context context, boolean z) {
        putBooleanAsUser(context, KEY_IS_LOCK_SCREEN, z, 0);
    }

    public static boolean isNotFirstBoot(Context context) {
        return getBooleanAsUser(context, KEY_IS_NOT_FIRST_BOOT, 0);
    }

    public static void setNotFirstBoot(Context context, boolean z) {
        putBooleanAsUser(context, KEY_IS_NOT_FIRST_BOOT, z, 0);
    }

    public static void setPhysicalButtonType(Context context, PHYSICAL_BUTTON_TYPE physical_button_type) {
        putInt(context, KEY_PHYSICAL_BUTTON_TYPE, physical_button_type.ordinal());
    }

    public static PHYSICAL_BUTTON_TYPE getPhysicalButtonType(Context context) {
        return PHYSICAL_BUTTON_TYPE.valueOf(getInt(context, KEY_PHYSICAL_BUTTON_TYPE, PHYSICAL_BUTTON_TYPE.SOURCE.ordinal()));
    }

    public static boolean isRemoveMyselfUser(Context context) {
        return getBooleanAsUser(context, KEY_IS_REMOVE_MYSELF_USER, 0);
    }

    public static void putRemoveMyselfUser(Context context, boolean z) {
        putBooleanAsUser(context, KEY_IS_REMOVE_MYSELF_USER, z, 0);
    }

    public static void putRemoveMyselfUserId(Context context, int i) {
        putIntAsUser(context, KEY_IS_REMOVE_MYSELF_USER_ID, i, 0);
    }

    public static int getRemoveMyselfUserId(Context context) {
        return getIntAsUser(context, KEY_IS_REMOVE_MYSELF_USER_ID, -1, 0);
    }

    public static boolean isSupportAndroidNfcInSlot(Context context) {
        return getBooleanAsUser(context, KEY_IS_SUPPORT_NFC, false, 0);
    }

    public static void setSupportAndroidNfcInSlot(Context context, boolean z) {
        putBooleanAsUser(context, KEY_IS_SUPPORT_NFC, z, 0);
    }

    public static void setAirClassServer(Context context, AirClassServerType airClassServerType) {
        putString(context, KEY_AIRCLASS_SERVER, airClassServerType.name());
    }

    public static AirClassServerType getAirClassServer(Context context) {
        return AirClassServerType.valueOf(getString(context, KEY_AIRCLASS_SERVER, AirClassServerType.LAN.name()));
    }

    public static void setAirClassFullScreen(Context context, boolean z) {
        putBooleanAsUser(context, KEY_AIRCLASS_FULL_SCREEN, z, 0);
    }

    public static boolean isAirClassFullScreen(Context context) {
        return getBooleanAsUser(context, KEY_AIRCLASS_FULL_SCREEN, false, 0);
    }

    public static boolean isModifyWifiSpotSSID(Context context) {
        return getBooleanAsUser(context, KEY_IS_MODIFY_WIFI_SPOT_SSID, false, 0);
    }

    public static void setModifyWifiSpotSSID(Context context) {
        putBooleanAsUser(context, KEY_IS_MODIFY_WIFI_SPOT_SSID, true, 0);
    }

    public static Integer getFakePowerOffChannel(Context context) {
        try {
            return Integer.valueOf(Integer.parseInt(getString(context, KEY_FAKE_POWER_OFF_CHANNEL, null)));
        } catch (Exception e) {
            Log.e(TAG, "getFakePowerOffChannel() -> null", e);
            return null;
        }
    }

    public static void setFakePowerOffChannel(Context context, Integer num) {
        putString(context, KEY_FAKE_POWER_OFF_CHANNEL, num == null ? "" : String.valueOf(num));
    }

    public static void setPCRecoveryButtonEnable(Context context, boolean z) {
        putBooleanAsUser(context, KEY_IS_ENABLE_PC_RECOVERY_BUTTON, z, 0);
    }

    public static boolean isPCRecoveryButtonEnable(Context context) {
        return getBooleanAsUser(context, KEY_IS_ENABLE_PC_RECOVERY_BUTTON, false, 0);
    }

    public static int getAutoBlackScreenTime(Context context) {
        return getIntAsUser(context, KEY_AUTO_BLACK_SCREEN_TIME, CustomerUtils.isI3Customized() ? 15 : 0, 0);
    }

    public static void setAutoBlackScreenTime(Context context, int i) {
        putIntAsUser(context, KEY_AUTO_BLACK_SCREEN_TIME, i, 0);
        ContextInsider.sendBroadcastAsUser(context, new Intent(SeewoIntent.ACTION_UPDATE_AUTO_BLACK_SCREEN_TIME), UserHandleInsider.OWNER);
    }

    public static int getAutoPowerOffTime(Context context) {
        return getIntAsUser(context, KEY_AUTO_POWER_OFF_TIME, 0, 0);
    }

    public static void setAutoPowerOffTime(Context context, int i) {
        putIntAsUser(context, KEY_AUTO_POWER_OFF_TIME, i, 0);
        ContextInsider.sendBroadcastAsUser(context, new Intent(SeewoIntent.ACTION_UPDATE_AUTO_POWER_OFF_TIME), UserHandleInsider.OWNER);
    }

    public static int getAutoLockScreenTime(Context context) {
        return getInt(context, KEY_AUTO_LOCK_SCREEN_TIME, -1);
    }

    public static void setAutoLockScreenTime(Context context, int i) {
        putInt(context, KEY_AUTO_LOCK_SCREEN_TIME, i);
        context.sendBroadcast(new Intent(SeewoIntent.ACTION_UPDATE_AUTO_LOCK_SCREEN));
    }

    public static void setVLauncherMode(Context context, LauncherMode launcherMode) {
        putString(context, KEY_LAUNCHER_MODE, launcherMode.name());
    }

    public static LauncherMode getVLauncherMode(Context context) {
        return LauncherMode.valueOf(getString(context, KEY_LAUNCHER_MODE, LauncherMode.EDUCATION.name()));
    }

    public static void setAutoSearchChannel(Context context, boolean z) {
        putBoolean(context, KEY_IS_AUTO_SEARCH_CHANNEL, z);
    }

    public static boolean isAutoSearchChannel(Context context) {
        return getBoolean(context, KEY_IS_AUTO_SEARCH_CHANNEL, false);
    }

    public static void setPortMapMode(Context context, int i) {
        putIntAsUser(context, KEY_PORT_MAP_MODE, i, 0);
    }

    public static int getPortMapMode(Context context) {
        return getIntAsUser(context, KEY_PORT_MAP_MODE, CustomerUtils.isForeignMachine() ? 2 : 1, 0);
    }

    public static void setHostDeviceIp(Context context, String str) {
        putStringAsUser(context, KEY_HOST_DEVICE_IP, str, 0);
    }

    public static String getHostDeviceIp(Context context) {
        return getStringAsUser(context, KEY_HOST_DEVICE_IP, 0);
    }

    public static void setHostWifiSSID(Context context, String str) {
        putStringAsUser(context, KEY_HOST_WIFI_SSID, str, 0);
    }

    public static String getHostWifiSSID(Context context) {
        return getStringAsUser(context, KEY_HOST_WIFI_SSID, 0);
    }

    public static void setHostWifiPassword(Context context, String str) {
        putStringAsUser(context, KEY_HOST_WIFI_PSW, str, 0);
    }

    public static String getHostWifiPassword(Context context) {
        return getStringAsUser(context, KEY_HOST_WIFI_PSW, 0);
    }

    public static void setHostApSSID(Context context, String str) {
        putStringAsUser(context, KEY_HOST_AP_SSID, str, 0);
    }

    public static String getHostApSSID(Context context) {
        return getStringAsUser(context, KEY_HOST_AP_SSID, 0);
    }

    public static void setHostApPassword(Context context, String str) {
        putStringAsUser(context, KEY_HOST_AP_PSW, str, 0);
    }

    public static String getHostApPassword(Context context) {
        return getStringAsUser(context, KEY_HOST_AP_PSW, 0);
    }

    public static void setHostApEnable(Context context, boolean z) {
        putBooleanAsUser(context, KEY_HOST_AP_ENABLE, z, 0);
    }

    public static boolean getHostApEnable(Context context) {
        return getBooleanAsUser(context, KEY_HOST_AP_ENABLE, 0);
    }

    public static int getHostNetType(Context context) {
        return getIntAsUser(context, KEY_HOST_NET_TYPE, 0, 0);
    }

    public static void setHostNetType(Context context, int i) {
        putIntAsUser(context, KEY_HOST_NET_TYPE, i, 0);
    }

    public static void setIsOneNetMachineHost(Context context, boolean z) {
        putBooleanAsUser(context, KEY_IS_ONE_NET_MACHINE, z, 0);
    }

    public static boolean isOneNetMachineHost(Context context) {
        return getBooleanAsUser(context, KEY_IS_ONE_NET_MACHINE, 0);
    }

    public static void setMac8153(Context context, String str) {
        putString(context, KEY_8153_MAC, str);
    }

    public static String getMac8153(Context context) {
        return getString(context, KEY_8153_MAC, "");
    }

    public static String getF2MicVersion(Context context) {
        return getString(context, KEY_F2_MIC_VERSION);
    }

    public static String getF2CameraVersion(Context context) {
        return getString(context, KEY_F2_CAMERA_VERSION);
    }

    public static void setF2MicVersion(Context context, String str) {
        putString(context, KEY_F2_MIC_VERSION, str);
    }

    public static void setF2CameraVersion(Context context, String str) {
        putString(context, KEY_F2_CAMERA_VERSION, str);
    }

    public static void setHotspotEnable(Context context, boolean z) {
        putBooleanAsUser(context, KEY_HOTSPOT_ENABLE, z, 0);
    }

    public static boolean getHotspotEnable(Context context) {
        return getBooleanAsUser(context, KEY_HOTSPOT_ENABLE, (CustomerUtils.isEvolutionCustomized() && BoardTypeUtils.is510Machine()) ? false : true, 0);
    }

    public static boolean isPlayerOnMachineOn(Context context) {
        return getBoolean(context, KEY_CEC_PLAYER_ON_MACHINE_ON, true);
    }

    public static boolean isPlayerOffMachineOff(Context context) {
        return getBoolean(context, KEY_CEC_PLAYER_OFF_MACHINE_OFF);
    }

    public static boolean isMachineOnPlayerOn(Context context) {
        return getBoolean(context, KEY_CEC_MACHINE_ON_PLAYER_ON);
    }

    public static boolean isMachineOffPlayerOff(Context context) {
        return getBoolean(context, KEY_CEC_MACHINE_OFF_PLAYER_OFF, true);
    }

    public static void setPlayerOnMachineOn(Context context, boolean z) {
        putBoolean(context, KEY_CEC_PLAYER_ON_MACHINE_ON, z);
    }

    public static void setPlayerOffMachineOff(Context context, boolean z) {
        putBoolean(context, KEY_CEC_PLAYER_OFF_MACHINE_OFF, z);
    }

    public static void setMachineOnPlayerOn(Context context, boolean z) {
        putBoolean(context, KEY_CEC_MACHINE_ON_PLAYER_ON, z);
    }

    public static void setMachineOffPlayerOff(Context context, boolean z) {
        putBoolean(context, KEY_CEC_MACHINE_OFF_PLAYER_OFF, z);
    }

    public static void setSupportDeveloper(Context context, boolean z) {
        putBoolean(context, KEY_SUPPORT_DEVELOPER, z);
    }

    public static boolean getSupportDeveloper(Context context) {
        return getBoolean(context, KEY_SUPPORT_DEVELOPER, false);
    }

    public static void setManualBluetoothStatus(Context context, boolean z) {
        putBooleanAsUser(context, KEY_MANUAL_BT_STATUS, z, 0);
    }

    public static boolean getManualBluetoothStatus(Context context) {
        return getBooleanAsUser(context, KEY_MANUAL_BT_STATUS, false, 0);
    }

    public static void setManualWifiStatus(Context context, boolean z) {
        putBooleanAsUser(context, KEY_MANUAL_WIFI_STATUS, z, 0);
    }

    public static boolean getManualWifiStatus(Context context) {
        return getBooleanAsUser(context, KEY_MANUAL_WIFI_STATUS, false, 0);
    }

    public static void setManualNativeApStatus(Context context, boolean z) {
        putBooleanAsUser(context, KEY_MANUAL_NATIVE_AP_STATUS, z, 0);
    }

    public static boolean getManualNativeApStatus(Context context) {
        return getBooleanAsUser(context, KEY_MANUAL_NATIVE_AP_STATUS, false, 0);
    }

    public static void setManualCvteApEnable(Context context, boolean z) {
        putBooleanAsUser(context, KEY_MANUAL_CVTE_AP_STATUS, z, 0);
    }

    public static boolean isManualCvteApEnable(Context context) {
        return getBooleanAsUser(context, KEY_MANUAL_CVTE_AP_STATUS, false, 0);
    }

    public static void setHalfWindowStatus(Context context, boolean z) {
        putBoolean(context, KEY_HALF_WINDOW_MODE_STATUS, z);
    }

    public static boolean getHalfWindowStatus(Context context) {
        if (Platform.is(7)) {
            return PropertiesUtils.getProperty("vendor.half.screen", 0) == 1;
        }
        return getBoolean(context, KEY_HALF_WINDOW_MODE_STATUS);
    }

    public static void setMenuKeyPadEvent(Context context, int i) {
        putInt(context, KEY_MENU_KEYPAD_EVENT, i);
    }

    public static int getMenuKeyPadEvent(Context context) {
        return getInt(context, KEY_MENU_KEYPAD_EVENT, 0);
    }

    public static void setSettingsLockPWD(Context context, String str) {
        putStringAsUser(context, KEY_SETTINGS_LOCK_PWD, str, 0);
    }

    public static String getSettingsLockPWD(Context context) {
        return getStringAsUser(context, KEY_SETTINGS_LOCK_PWD, 0);
    }

    public static int getMicUSB(Context context) {
        return getInt(context, KEY_MIC_USB_CHANNEL, 4);
    }

    public static void setMicUSB(Context context, int i) {
        putInt(context, KEY_MIC_USB_CHANNEL, i);
    }

    public static int getWifiUSB(Context context) {
        return getInt(context, KEY_WIFI_USB_CHANNEL, 5);
    }

    public static void setWifiUSB(Context context, int i) {
        putInt(context, KEY_WIFI_USB_CHANNEL, i);
    }

    public static void setCloseScreenShutDown(Context context, int i) {
        putIntAsUser(context, KEY_CLOSE_SCREEN_SHUT_DOWN_TIME, i, 0);
    }

    public static int getCloseScreenShutDown(Context context) {
        return getInt(context, KEY_CLOSE_SCREEN_SHUT_DOWN_TIME, -1);
    }

    public static void setAssetTagging(Context context, String str) {
        putString(context, KEY_ASSET_TAG, str);
    }

    public static String getAssetTagging(Context context) {
        return getString(context, KEY_ASSET_TAG, "");
    }

    public static boolean isCloudDriveEnable(Context context) {
        return getBoolean(context, KEY_CLOUD_DRIVE_ENABLE, true);
    }

    public static void setCloudDriveEnable(Context context, boolean z) {
        putBoolean(context, KEY_CLOUD_DRIVE_ENABLE, z);
    }

    public static boolean isSaveAsEnable(Context context) {
        return getBoolean(context, KEY_MARK_SAVE_ENABLE, true);
    }

    public static void setSaveAsEnable(Context context, boolean z) {
        putBoolean(context, KEY_MARK_SAVE_ENABLE, z);
    }

    public static void setPowerOffState(Context context, boolean z) {
        putBoolean(context, KEY_POWER_OFF_STATE, z);
    }

    public static boolean getPowerOffState(Context context) {
        return getBoolean(context, KEY_POWER_OFF_STATE, true);
    }

    public static void setLastPowerOffNormal(Context context, boolean z) {
        putBoolean(context, KEY_LAST_POWER_OFF_STATE, z);
    }

    public static boolean isLastPowerOffNormal(Context context) {
        return getBoolean(context, KEY_LAST_POWER_OFF_STATE, true);
    }

    public static void setFactoryTestIrTransmit(Context context, boolean z) {
        putBoolean(context, KEY_FACTORY_IR_TRABSMIT, z);
    }

    public static boolean isFactoryTestIrTransmitEnable(Context context) {
        return getBoolean(context, KEY_FACTORY_IR_TRABSMIT, false);
    }

    public static void setScreenStatus(Context context, boolean z) {
        putBooleanAsUser(context, KEY_SCREEN_STATUS, z, 0);
    }

    public static boolean getScreenStatus(Context context) {
        return getBooleanAsUser(context, KEY_SCREEN_STATUS, true, 0);
    }

    public static void setVgaAutoAdjusting(Context context, boolean z) {
        putBoolean(context, KEY_VGA_AUTO_ADJUST, z);
    }

    public static boolean isVgaAutoAdjusting(Context context) {
        return getBoolean(context, KEY_VGA_AUTO_ADJUST, false);
    }

    public static int getSideUsbChannel(Context context) {
        return getInt(context, KEY_SIDE_USB_CHANNEL, 4);
    }

    public static void setSideUsbChannel(Context context, int i) {
        putInt(context, KEY_SIDE_USB_CHANNEL, i);
    }

    public static boolean isCastForbiddenBackup(Context context) {
        return getBoolean(context, KEY_VCAST_FORBIDDEN_BACKUP, false);
    }

    public static void setCastForbiddenBackup(Context context, boolean z) {
        putBoolean(context, KEY_VCAST_FORBIDDEN_BACKUP, z);
    }

    public static boolean isLastEthEnable(Context context) {
        return getBooleanAsUser(context, KEY_LAST_ETH_ENABLE, false, 0);
    }

    public static void setLastEthStatus(Context context, boolean z) {
        putBooleanAsUser(context, KEY_LAST_ETH_ENABLE, z, 0);
    }

    public static void setDoubleColorPenEnable(Context context, boolean z) {
        putBoolean(context, KEY_DOUBLE_COLOR_PEN, z);
    }

    public static boolean getDoubleColorPenEnable(Context context, boolean z) {
        return getBoolean(context, KEY_DOUBLE_COLOR_PEN, z);
    }

    public static void setSensorsInfoShow(Context context, boolean z) {
        putBoolean(context, KEY_IS_SENSORS_INFO_SHOW, z);
    }

    public static boolean isSensorsInfoShow(Context context) {
        return getBoolean(context, KEY_IS_SENSORS_INFO_SHOW);
    }

    public static void setSensorMonitorShow(Context context, boolean z) {
        putBoolean(context, IS_SENSOR_MONITOR_SHOW, z);
    }

    public static boolean isSensorMonitorShow(Context context) {
        return getBoolean(context, IS_SENSOR_MONITOR_SHOW);
    }

    public static boolean isAndroidTouchEnable(Context context) {
        return getBoolean(context, KEY_ANDROID_TOUCH_ENABLE, true);
    }

    public static void setAndroidTouchEnable(Context context, boolean z) {
        putBoolean(context, KEY_ANDROID_TOUCH_ENABLE, z);
    }

    public static SOURCE_SHORTCUT_STATUS getSourceShortStatus(Context context) {
        String string = getString(context, KEY_CHANNEL_SHORTCUT);
        if (TextUtils.isEmpty(string)) {
            return SOURCE_SHORTCUT_STATUS.CLOSE;
        }
        try {
            return SOURCE_SHORTCUT_STATUS.valueOf(string);
        } catch (Exception e) {
            Log.e(TAG, "get source shortcut status:" + e);
            return SOURCE_SHORTCUT_STATUS.CLOSE;
        }
    }

    public static void setSourceShortStatus(Context context, SOURCE_SHORTCUT_STATUS source_shortcut_status) {
        putString(context, KEY_CHANNEL_SHORTCUT, source_shortcut_status.name());
    }

    public static boolean isForbidUDisk(Context context) {
        return getBoolean(context, KEY_U_DISK_FORBID);
    }

    public static void setForbidUDisk(Context context, boolean z) {
        putBoolean(context, KEY_U_DISK_FORBID, z);
    }

    public static int getFileSaveDuration(Context context) {
        return getInt(context, KEY_FILE_SAVE_DURATION, -1);
    }

    public static void setFileSaveDuration(Context context, int i) {
        putInt(context, KEY_FILE_SAVE_DURATION, i);
    }

    public static int getFileSaveDurationMin(Context context) {
        return getInt(context, KEY_FILE_SAVE_DURATION_MIN, -1);
    }

    public static void setFileSaveDurationMin(Context context, int i) {
        putInt(context, KEY_FILE_SAVE_DURATION_MIN, i);
    }

    public static boolean isSourceWosEnable(Context context, String str) {
        return getBoolean(context, KEY_WOS_SOURCE_ENABLE + str, true);
    }

    public static void setSourceWosEnable(Context context, String str, boolean z) {
        putBoolean(context, KEY_WOS_SOURCE_ENABLE + str, z);
    }

    public static int getSmoothFilterLevel(Context context, int i) {
        return getInt(context, KEY_SMOOTH_FILTER_LEVEL, i);
    }

    public static void setSmoothFilterLevel(Context context, int i) {
        putInt(context, KEY_SMOOTH_FILTER_LEVEL, i);
    }

    public static void setSourceShortcutValue(Context context, boolean z) {
        putBoolean(context, KEY_CHANGE_SOURCE_SHORTCUT, z);
    }

    public static boolean getSourceShortcutValue(Context context, boolean z) {
        return getBoolean(context, KEY_CHANGE_SOURCE_SHORTCUT, z);
    }

    public static boolean getActiveScreenLockStatus(Context context, boolean z) {
        return getBoolean(context, KEY_ACTIVE_LOCK_STATUS, z);
    }

    public static void setActiveScreenLockStatus(Context context, boolean z) {
        putBoolean(context, KEY_ACTIVE_LOCK_STATUS, z);
    }

    public static String getActiveScreenLockPwd(Context context) {
        return getString(context, KEY_ACTIVE_LOCK_PWD, DEFAULT_ACTIVE_LOCK_PWD);
    }

    public static void setActiveScreenLockPwd(Context context, String str) {
        putString(context, KEY_ACTIVE_LOCK_PWD, str);
    }

    public static void setHomeThemeMode(Context context, HomeThemeMode homeThemeMode) {
        putString(context, KEY_HOME_THEME_MODE, homeThemeMode.name());
    }

    public static HomeThemeMode getHomeThemeMode(Context context) {
        return HomeThemeMode.valueOf(getString(context, KEY_HOME_THEME_MODE, HomeThemeMode.AUTO.name()));
    }

    public static long getActivationTime(Context context) {
        return getLong(context, KEY_ACTIVATION_TIME, 0L);
    }

    public static void setActivationTime(Context context, long j) {
        putLong(context, KEY_ACTIVATION_TIME, j);
    }

    public static long getAbnormalShutdownCount(Context context) {
        return getLong(context, KEY_ABNORMAL_SHUTDOWN_COUNT, 0L);
    }

    public static void setAbnormalShutdownCount(Context context, long j) {
        putLong(context, KEY_ABNORMAL_SHUTDOWN_COUNT, j);
    }

    public static void setMediaDeviceStatus(Context context, boolean z) {
        putBoolean(context, KEY_MEDIA_DEVICE_STATUS, z);
    }

    public static boolean isMediaDeviceEnable(Context context) {
        return getBoolean(context, KEY_MEDIA_DEVICE_STATUS, false);
    }

    public static boolean isEyeCareEnabled(Context context) {
        return getBoolean(context, KEY_EYE_CARE_STATE, false);
    }

    public static void setEyeCareEnable(Context context, boolean z) {
        putBoolean(context, KEY_EYE_CARE_STATE, z);
    }

    public static void setEyeCareMode(Context context, int i) {
        putInt(context, KEY_EYE_CARE_MODE, i);
    }

    public static int getEyeCareMode(Context context, int i) {
        return getInt(context, KEY_EYE_CARE_MODE, i);
    }

    public static boolean isBenqEyeCareEnabled(Context context) {
        return getBoolean(context, KEY_BENQ_EYE_CARE_STATUS, false);
    }

    public static void setBenqEyeCareEnable(Context context, boolean z) {
        putBoolean(context, KEY_BENQ_EYE_CARE_STATUS, z);
    }

    public static int getAmsAutoLogoutTimeout(Context context) {
        return getInt(context, KEY_AMS_AUTO_LOGOUT_TIMEOUT, 1800);
    }

    public static void setAmsAutoLogoutTimeout(Context context, int i) {
        putInt(context, KEY_AMS_AUTO_LOGOUT_TIMEOUT, i);
    }

    public static String getAmsLoginStatus(Context context) {
        return getString(context, KEY_AMS_LOGIN_STATUS);
    }

    public static void setAmsLoginStatus(Context context, String str) {
        putString(context, KEY_AMS_LOGIN_STATUS, str);
    }

    public static void setSP20Sensitivity(Context context, int i) {
        putInt(context, KEY_SP20_SENSITIVITY, i);
    }

    public static int getSP20Sensitivity(Context context) {
        return getInt(context, KEY_SP20_SENSITIVITY, 0);
    }

    public static int getSoundCardNode(Context context) {
        return getInt(context, KEY_SOUND_CARD_NODE, 0);
    }

    public static void setSoundCardNode(Context context, int i) {
        putInt(context, KEY_SOUND_CARD_NODE, i);
    }

    public static boolean isTouchOut1Inserted(Context context) {
        return getBoolean(context, KEY_TOUCH_OUT_USB1_INSERT, false);
    }

    public static void setTouchOut1Inserted(Context context, boolean z) {
        putBoolean(context, KEY_TOUCH_OUT_USB1_INSERT, z);
    }

    public static boolean isTouchOut2Inserted(Context context) {
        return getBoolean(context, KEY_TOUCH_OUT_USB2_INSERT, false);
    }

    public static void setTouchOut2Inserted(Context context, boolean z) {
        putBoolean(context, KEY_TOUCH_OUT_USB2_INSERT, z);
    }

    public static boolean isVolumeMuteEnabled(Context context) {
        return getBoolean(context, KEY_VOLUME_MUTE, false);
    }

    public static void setVolumeMuteEnabled(Context context, boolean z) {
        putBoolean(context, KEY_VOLUME_MUTE, z);
    }

    public static boolean isMicrophoneMuteEnabled(Context context) {
        return getBoolean(context, KEY_MIC_MUTE, false);
    }

    public static void setMicrophoneMuteEnabled(Context context, boolean z) {
        putBoolean(context, KEY_MIC_MUTE, z);
    }

    public static boolean isHadSetWifiCountryCode(Context context) {
        return getBoolean(context, KEY_HAD_SET_COUNTRY_CODE, false);
    }

    public static void setWifiCountryCodeFlag(Context context, boolean z) {
        putBoolean(context, KEY_HAD_SET_COUNTRY_CODE, z);
    }

    public static int getDayRunningTime(Context context) {
        return getInt(context, KEY_DAY_RUNNING_TIME, 0);
    }

    public static void setDayRunningTime(Context context, int i) {
        putInt(context, KEY_DAY_RUNNING_TIME, i);
    }

    public static String getSensorTemperatureData(Context context) {
        return getString(context, KEY_SENSOR_TEMPERATURE_DATA, "");
    }

    public static void setSensorTemperatureData(Context context, String str) {
        putString(context, KEY_SENSOR_TEMPERATURE_DATA, str);
    }

    public static String getSensorHumidityData(Context context) {
        return getString(context, KEY_SENSOR_HUMIDITY_DATA, "");
    }

    public static void setSensorHumidityData(Context context, String str) {
        putString(context, KEY_SENSOR_HUMIDITY_DATA, str);
    }

    public static String getSensorAirData(Context context) {
        return getString(context, KEY_SENSOR_AIR_DATA, "");
    }

    public static void setSensorAirData(Context context, String str) {
        putString(context, KEY_SENSOR_AIR_DATA, str);
    }

    public static String getSensorPIRData(Context context) {
        return getString(context, KEY_SENSOR_PIR_DATA, "");
    }

    public static void setSensorPIRData(Context context, String str) {
        putString(context, KEY_SENSOR_PIR_DATA, str);
    }

    public static String getSensorCo2Data(Context context) {
        return getString(context, KEY_SENSOR_CO2_DATA, "");
    }

    public static void setSensorCo2Data(Context context, String str) {
        putString(context, KEY_SENSOR_CO2_DATA, str);
    }

    public static long getSensorSaveLastTime(Context context) {
        return getLong(context, KEY_SENSOR_LAST_TIME, 0L);
    }

    public static void setSensorSaveLastTime(Context context, long j) {
        putLong(context, KEY_SENSOR_LAST_TIME, j);
    }

    public static long getOffTimeRecord(Context context) {
        return getLong(context, KEY_TIME_RECORD, 0L);
    }

    public static void setOffTimeRecord(Context context, long j) {
        putLong(context, KEY_TIME_RECORD, j);
    }

    public static long getPirOffSeconds(Context context) {
        if (Build.VERSION.SDK_INT >= 33) {
            return getLong(context, KEY_PIR_OFF_SECONDS, 900L);
        }
        return getLongAsUser(context, KEY_PIR_OFF_SECONDS, 900L, 0);
    }

    public static void setPirOffSeconds(Context context, long j) {
        if (Build.VERSION.SDK_INT >= 33) {
            putLong(context, KEY_PIR_OFF_SECONDS, j);
        } else {
            putLongAsUser(context, KEY_PIR_OFF_SECONDS, j, 0);
        }
        context.sendBroadcast(new Intent(SeewoIntent.ACTION_UPDATE_PIR_SENSOR_TIME));
    }

    public static boolean isBenqIRMouseRunning(Context context) {
        return getBoolean(context, KEY_BENQ_IR_MOUSE_RUNNING, false);
    }

    public static void setBenqIRMouseRunning(Context context, boolean z) {
        putBoolean(context, KEY_BENQ_IR_MOUSE_RUNNING, z);
    }

    public static boolean isBenqIRMouseEnable(Context context) {
        return getBoolean(context, KEY_BENQ_IR_MOUSE_ENABLE, false);
    }

    public static void setBenqIRMouseEnable(Context context, boolean z) {
        putBoolean(context, KEY_BENQ_IR_MOUSE_ENABLE, z);
    }

    public static void setMultiShowSystemGuide(Context context, boolean z) {
        putBoolean(context, KEY_MULTI_SHOW_SYSTEM_GUIDE, z);
    }

    public static boolean isMultiShowSystemGuide(Context context) {
        return getBoolean(context, KEY_MULTI_SHOW_SYSTEM_GUIDE, false);
    }

    public static void setConnectionString(Context context, String str) {
        putString(context, KEY_CONNECTION_STRING, str);
    }

    public static String getConnectionString(Context context) {
        return getString(context, KEY_CONNECTION_STRING, "");
    }

    public static void setAzureDeviceString(Context context, String str) {
        putString(context, KEY_AZURE_DEVICE_STRING, str);
    }

    public static String getAzureDeviceString(Context context) {
        return getString(context, KEY_AZURE_DEVICE_STRING, "");
    }

    public static void setMicrophoneDevices(Context context, List<MicroPhoneDevice> list) {
        putStringAsUser(context, KEY_MICROPHONE_DEVICES, sGson.toJson(list), 0);
    }

    public static List<MicroPhoneDevice> getMicrophoneDevices(Context context) {
        return (List) sGson.fromJson(getStringAsUser(context, KEY_MICROPHONE_DEVICES, 0), new TypeToken<List<MicroPhoneDevice>>() { // from class: com.seewo.vcommons.data.PreferencesUtils.1
        }.getType());
    }

    public static void setVsCustomDebugMenuCode(Context context, String str) {
        putString(context, KEY_VS_CUSTOM_DEBUG_MENU_CODE, str);
    }

    public static String getVsCustomDebugMenuCode(Context context) {
        return getString(context, KEY_VS_CUSTOM_DEBUG_MENU_CODE);
    }

    public static void setVsLauncherAppsPackageNames(Context context, String str) {
        putString(context, KEY_VS_LAUNCHER_APPS_PACKAGE_NAME, str);
    }

    public static String getVsLauncherAppsPackageNames(Context context) {
        return getString(context, KEY_VS_LAUNCHER_APPS_PACKAGE_NAME);
    }

    public static long getActivationExpireTime(Context context) {
        return getLong(context, KEY_ACTIVATION_EXPIRE_TIME, 0L);
    }

    public static void setActivationExpireTime(Context context, long j) {
        putLong(context, KEY_ACTIVATION_EXPIRE_TIME, j);
    }

    public static void setTouchMenuOpenModeBottom(Context context, boolean z) {
        putBoolean(context, KEY_OPEN_TOUCH_MENU_MODE_BOTTOM, z);
    }

    public static boolean getTouchMenuOpenModeBottom(Context context) {
        return getBoolean(context, KEY_OPEN_TOUCH_MENU_MODE_BOTTOM, true);
    }

    public static void setTouchMenuOpenModeHome(Context context, boolean z) {
        putBoolean(context, KEY_OPEN_TOUCH_MENU_MODE_HOME, z);
    }

    public static boolean getTouchMenuOpenModeHome(Context context) {
        return getBoolean(context, KEY_OPEN_TOUCH_MENU_MODE_HOME);
    }

    public static void setTouchMenuOpenModeFinger(Context context, boolean z) {
        putBoolean(context, KEY_OPEN_TOUCH_MENU_MODE_FINGER, z);
    }

    public static boolean getTouchMenuOpenModeFinger(Context context) {
        return getBoolean(context, KEY_OPEN_TOUCH_MENU_MODE_FINGER);
    }

    public static int getCountDownOffTime(Context context) {
        return getInt(context, KEY_COUNT_DOWN_OFF_TIME, 0);
    }

    public static void setCountDownoffTime(Context context, int i) {
        putInt(context, KEY_COUNT_DOWN_OFF_TIME, i);
    }

    public static void setSmartPenState(Context context, int i) {
        putInt(context, KEY_SMART_PEN_STATE, i);
    }

    public static boolean isSmartPenPickUp(Context context, int i) {
        int i2 = getInt(context, KEY_SMART_PEN_STATE, -1);
        return i2 != -1 && ((i2 & ((int) Math.pow(2.0d, (double) i))) >> i) == 0;
    }

    public static int getSlideShowIntervalValue(Context context) {
        return getInt(context, KEY_SLIDE_INTERVAL, 5);
    }

    public static void setSlideShowIntervalValue(Context context, int i) {
        putInt(context, KEY_SLIDE_INTERVAL, i);
    }

    public static void setSambaStart(Context context, boolean z) {
        putBoolean(context, KEY_SAMBA_START, z);
    }

    public static boolean isSambaStart(Context context, boolean z) {
        return getBoolean(context, KEY_SAMBA_START, z);
    }

    public static void setUseSambaPassword(Context context, boolean z) {
        putBoolean(context, KEY_USE_SAMBA_PASSWORD, z);
    }

    public static boolean isUseSambaPassword(Context context) {
        return getBoolean(context, KEY_USE_SAMBA_PASSWORD);
    }

    public static void setSambaPassword(Context context, String str) {
        putString(context, KEY_SAMBA_PASSWORD, str);
    }

    public static String getSambaPassword(Context context) {
        return getString(context, KEY_SAMBA_PASSWORD);
    }

    public static void setSambaUserName(Context context, String str) {
        putString(context, KEY_SAMBA_USERNAME, str);
    }

    public static String getSambaUserName(Context context) {
        return getString(context, KEY_SAMBA_USERNAME);
    }

    public static void setAdvancedPasswordSwitch(Context context, boolean z) {
        putBoolean(context, KEY_ADVANCED_PASSWORD_SWITCH, z);
    }

    public static boolean isAdvancedPasswordSwitch(Context context, boolean z) {
        return getBoolean(context, KEY_ADVANCED_PASSWORD_SWITCH, z);
    }

    public static int getOSDInformationTime(Context context) {
        return getInt(context, KEY_OSD_INFORMATION_TIME, 5);
    }

    public static void setOSDInformationTime(Context context, int i) {
        putInt(context, KEY_OSD_INFORMATION_TIME, i);
    }

    public static String getIOTBrokerIP(Context context) {
        return getString(context, KEY_IOT_BROKER_IP, "");
    }

    public static void setIOTBrokerIP(Context context, String str) {
        putString(context, KEY_IOT_BROKER_IP, str);
    }

    public static String getIOTDeviceID(Context context) {
        return getString(context, KEY_IOT_DEVICE_ID, "");
    }

    public static void setIOTDeviceID(Context context, String str) {
        putString(context, KEY_IOT_DEVICE_ID, str);
    }

    public static String getIOTProductKey(Context context) {
        return getString(context, KEY_IOT_PRODUCT_KEY, "");
    }

    public static void setIOTProductKey(Context context, String str) {
        putString(context, KEY_IOT_PRODUCT_KEY, str);
    }

    public static String getIOTSecretKey(Context context) {
        return getString(context, KEY_IOT_SECRET_KEY, "");
    }

    public static void setIOTSecretKey(Context context, String str) {
        putString(context, KEY_IOT_SECRET_KEY, str);
    }

    public static String getIOTRegister(Context context) {
        return getString(context, KEY_IOT_REGISTER, "");
    }

    public static void setIOTRegister(Context context, String str) {
        putString(context, KEY_IOT_REGISTER, str);
    }

    public static String getIOTProductSecret(Context context) {
        return getString(context, KEY_IOT_PRODUCT_SECRET, "");
    }

    public static void setIOTProductSecret(Context context, String str) {
        putString(context, KEY_IOT_PRODUCT_SECRET, str);
    }

    public static String getAdvancedPassword(Context context) {
        return getString(context, KEY_ADVANCED_PASSWORD);
    }

    public static void setAdvancedPassword(Context context, String str) {
        putString(context, KEY_ADVANCED_PASSWORD, str);
    }

    public static boolean isKeepTouchInPC(Context context) {
        return getBoolean(context, KEY_KEEP_TOUCH_IN_PC);
    }

    public static void setKeepTouchInPC(Context context, boolean z) {
        putBoolean(context, KEY_KEEP_TOUCH_IN_PC, z);
    }

    public static int getColorTempRBGValue(Context context) {
        return getInt(context, KEY_COLOR_TEMP_RBG_VALUE, 73);
    }

    public static void setColorTempRBGValue(Context context, int i) {
        putInt(context, KEY_COLOR_TEMP_RBG_VALUE, i);
    }

    public static int getTemperatureValue(Context context) {
        return getInt(context, KEY_TEMPERATURE_VALUE, 120);
    }

    public static void setTemperatureValue(Context context, int i) {
        putInt(context, KEY_TEMPERATURE_VALUE, i);
    }

    public static void setVLauncherAppDrawerEnable(Context context, boolean z) {
        putBoolean(context, KEY_V_LAUNCHER_APP_DRAWER_ENABLE, z);
    }

    public static boolean isVLauncherAppDrawerEnable(Context context) {
        return getBoolean(context, KEY_V_LAUNCHER_APP_DRAWER_ENABLE, false);
    }

    public static void setHideLauncherTimeEnable(Context context, boolean z) {
        putBoolean(context, KEY_HIDE_LAUNCHER_TIME, z);
    }

    public static boolean isHideLauncherTimeEnable(Context context) {
        return getBoolean(context, KEY_HIDE_LAUNCHER_TIME, false);
    }

    public static void setDefaultVolume(Context context, int i) {
        putInt(context, KEY_DEFAULT_VOLUME, i);
    }

    public static int getDefaultVolume(Context context) {
        return getInt(context, KEY_DEFAULT_VOLUME, 25);
    }

    public static void setDefaultSoundOutVolume(Context context, int i) {
        putInt(context, KEY_DEFAULT_SOUND_OUT_VOLUME, i);
    }

    public static int getDefaultSoundOutVolume(Context context) {
        return getInt(context, KEY_DEFAULT_SOUND_OUT_VOLUME, 35);
    }

    public static void setMeetingExplorerSettingPassword(Context context, String str) {
        putString(context, KEY_MEETING_EXPLORER_SETTING_PASSWORD, str);
    }

    public static String getMeetingExplorerSettingPassword(Context context) {
        return getString(context, KEY_MEETING_EXPLORER_SETTING_PASSWORD, "");
    }

    public static void setResetWallpaperForOta(Context context, boolean z) {
        putBoolean(context, KEY_RESET_WALLPAPER_FOR_OTA, z);
    }

    public static boolean getResetWallpaperForOta(Context context) {
        return getBoolean(context, KEY_RESET_WALLPAPER_FOR_OTA, false);
    }

    public static void setSidePhysicalButtonMode(Context context, SIDE_PHYSICAL_BUTTON_MODE side_physical_button_mode) {
        putStringAsUser(context, KEY_SIDE_PHYSICAL_BUTTON_MODE, side_physical_button_mode.name(), UserHandleInsider.myUserId());
    }

    public static void setPowerPhysicalButtonMode(Context context, POWER_PHYSICAL_BUTTON_MODE power_physical_button_mode) {
        putStringAsUser(context, KEY_POWER_PHYSICAL_BUTTON_MODE, power_physical_button_mode.name(), UserHandleInsider.myUserId());
    }

    public static SIDE_PHYSICAL_BUTTON_MODE getSidePhysicalButtonMode(Context context) {
        String stringAsUser = getStringAsUser(context, KEY_SIDE_PHYSICAL_BUTTON_MODE, UserHandleInsider.myUserId());
        if (TextUtils.isEmpty(stringAsUser)) {
            return SIDE_PHYSICAL_BUTTON_MODE.NO_ACTION;
        }
        try {
            return SIDE_PHYSICAL_BUTTON_MODE.valueOf(stringAsUser);
        } catch (Exception unused) {
            return SIDE_PHYSICAL_BUTTON_MODE.NO_ACTION;
        }
    }

    public static POWER_PHYSICAL_BUTTON_MODE gePowerPhysicalButtonMode(Context context) {
        String stringAsUser = getStringAsUser(context, KEY_POWER_PHYSICAL_BUTTON_MODE, UserHandleInsider.myUserId());
        if (TextUtils.isEmpty(stringAsUser)) {
            return POWER_PHYSICAL_BUTTON_MODE.SLEEP;
        }
        try {
            return POWER_PHYSICAL_BUTTON_MODE.valueOf(stringAsUser);
        } catch (Exception unused) {
            return POWER_PHYSICAL_BUTTON_MODE.SLEEP;
        }
    }

    public static void setSidePhysicalButtonModeAsUser(Context context, SIDE_PHYSICAL_BUTTON_MODE side_physical_button_mode, int i) {
        putStringAsUser(context, KEY_SIDE_PHYSICAL_BUTTON_MODE, side_physical_button_mode.name(), i);
    }

    public static void setPowerPhysicalButtonModeAsUser(Context context, POWER_PHYSICAL_BUTTON_MODE power_physical_button_mode, int i) {
        putStringAsUser(context, KEY_POWER_PHYSICAL_BUTTON_MODE, power_physical_button_mode.name(), i);
    }

    public static SIDE_PHYSICAL_BUTTON_MODE getSidePhysicalButtonModeAsUser(Context context, int i) {
        String stringAsUser = getStringAsUser(context, KEY_SIDE_PHYSICAL_BUTTON_MODE, i);
        if (TextUtils.isEmpty(stringAsUser)) {
            return SIDE_PHYSICAL_BUTTON_MODE.NO_ACTION;
        }
        try {
            return SIDE_PHYSICAL_BUTTON_MODE.valueOf(stringAsUser);
        } catch (Exception unused) {
            return SIDE_PHYSICAL_BUTTON_MODE.NO_ACTION;
        }
    }

    public static POWER_PHYSICAL_BUTTON_MODE getPowerPhysicalButtonModeAsUser(Context context, int i) {
        String stringAsUser = getStringAsUser(context, KEY_POWER_PHYSICAL_BUTTON_MODE, i);
        if (TextUtils.isEmpty(stringAsUser)) {
            return POWER_PHYSICAL_BUTTON_MODE.SLEEP;
        }
        try {
            return POWER_PHYSICAL_BUTTON_MODE.valueOf(stringAsUser);
        } catch (Exception unused) {
            return POWER_PHYSICAL_BUTTON_MODE.SLEEP;
        }
    }

    public static void setInputSourceToPowerButton(Context context, String str) {
        putStringAsUser(context, KEY_POWER_BUTTON_TO_INPUT_SOURCE, str, UserHandleInsider.myUserId());
    }

    public static String getInputSourceToPowerButton(Context context) {
        return getStringAsUser(context, KEY_POWER_BUTTON_TO_INPUT_SOURCE, UserHandleInsider.myUserId());
    }

    public static void setInputSourceToPowerButtonAsUser(Context context, String str, int i) {
        putStringAsUser(context, KEY_POWER_BUTTON_TO_INPUT_SOURCE, str, i);
    }

    public static String getInputSourceToPowerButtonAsUser(Context context, int i) {
        return getStringAsUser(context, KEY_POWER_BUTTON_TO_INPUT_SOURCE, i);
    }

    public static void setPowerButtonWindowFunctionKey(Context context, WINDOWS_FUNCTION_KEY windows_function_key) {
        putStringAsUser(context, KEY_POWER_BUTTON_WITH_WINDOWS_FUNCTION_KEY, windows_function_key.name(), UserHandleInsider.myUserId());
    }

    public static WINDOWS_FUNCTION_KEY getPowerButtonWindowFunctionKey(Context context) {
        String stringAsUser = getStringAsUser(context, KEY_POWER_BUTTON_WITH_WINDOWS_FUNCTION_KEY, UserHandleInsider.myUserId());
        if (TextUtils.isEmpty(stringAsUser)) {
            return WINDOWS_FUNCTION_KEY.F1;
        }
        try {
            return WINDOWS_FUNCTION_KEY.valueOf(stringAsUser);
        } catch (Exception unused) {
            return WINDOWS_FUNCTION_KEY.F1;
        }
    }

    public static void setPowerButtonWindowFunctionKeyAsUser(Context context, WINDOWS_FUNCTION_KEY windows_function_key, int i) {
        putStringAsUser(context, KEY_POWER_BUTTON_WITH_WINDOWS_FUNCTION_KEY, windows_function_key.name(), i);
    }

    public static WINDOWS_FUNCTION_KEY getPowerButtonWindowFunctionKeyAsUser(Context context, int i) {
        String stringAsUser = getStringAsUser(context, KEY_POWER_BUTTON_WITH_WINDOWS_FUNCTION_KEY, i);
        if (TextUtils.isEmpty(stringAsUser)) {
            return WINDOWS_FUNCTION_KEY.F1;
        }
        try {
            return WINDOWS_FUNCTION_KEY.valueOf(stringAsUser);
        } catch (Exception unused) {
            return WINDOWS_FUNCTION_KEY.F1;
        }
    }

    public static void setSideButtonWindowFunctionKeyAsUser(Context context, WINDOWS_FUNCTION_KEY windows_function_key, int i) {
        putStringAsUser(context, KEY_SIDE_BUTTON_WITH_WINDOWS_FUNCTION_KEY, windows_function_key.name(), i);
    }

    public static WINDOWS_FUNCTION_KEY getSideButtonWindowFunctionKeyAsUser(Context context, int i) {
        String stringAsUser = getStringAsUser(context, KEY_SIDE_BUTTON_WITH_WINDOWS_FUNCTION_KEY, i);
        if (TextUtils.isEmpty(stringAsUser)) {
            return WINDOWS_FUNCTION_KEY.F1;
        }
        try {
            return WINDOWS_FUNCTION_KEY.valueOf(stringAsUser);
        } catch (Exception unused) {
            return WINDOWS_FUNCTION_KEY.F1;
        }
    }

    public static void setInputSourceToSideButton(Context context, String str) {
        putStringAsUser(context, KEY_SIDE_BUTTON_TO_INPUT_SOURCE, str, UserHandleInsider.myUserId());
    }

    public static String getInputSourceToSideButton(Context context) {
        return getStringAsUser(context, KEY_SIDE_BUTTON_TO_INPUT_SOURCE, UserHandleInsider.myUserId());
    }

    public static void setInputSourceToSideButtonAsUser(Context context, String str, int i) {
        putStringAsUser(context, KEY_SIDE_BUTTON_TO_INPUT_SOURCE, str, i);
    }

    public static String getInputSourceToSideButtonAsUser(Context context, int i) {
        return getStringAsUser(context, KEY_SIDE_BUTTON_TO_INPUT_SOURCE, i);
    }

    public static void setSideButtonWindowFunctionKey(Context context, WINDOWS_FUNCTION_KEY windows_function_key) {
        putStringAsUser(context, KEY_SIDE_BUTTON_WITH_WINDOWS_FUNCTION_KEY, windows_function_key.name(), UserHandleInsider.myUserId());
    }

    public static WINDOWS_FUNCTION_KEY getSideButtonWindowFunctionKey(Context context) {
        String stringAsUser = getStringAsUser(context, KEY_SIDE_BUTTON_WITH_WINDOWS_FUNCTION_KEY, UserHandleInsider.myUserId());
        if (TextUtils.isEmpty(stringAsUser)) {
            return WINDOWS_FUNCTION_KEY.F1;
        }
        try {
            return WINDOWS_FUNCTION_KEY.valueOf(stringAsUser);
        } catch (Exception unused) {
            return WINDOWS_FUNCTION_KEY.F1;
        }
    }

    public static boolean isGestureTouchLockEnable(Context context) {
        return getBoolean(context, KEY_GESTURE_TOUCH_LOCK_ENABLE, false);
    }

    public static void setGestureTouchLockEnable(Context context, boolean z) {
        putBoolean(context, KEY_GESTURE_TOUCH_LOCK_ENABLE, z);
        context.sendBroadcast(new Intent(SeewoIntent.ACTION_GESTURE_CONFIG_CHANGED));
    }

    public static boolean isShowLauncherApp(Context context) {
        return getBoolean(context, KEY_SHOW_LAUNCHER_APPLICATION, true);
    }

    public static void setShowLauncherApp(Context context, boolean z) {
        putBoolean(context, KEY_SHOW_LAUNCHER_APPLICATION, z);
    }

    public static boolean isCentigrade(Context context) {
        return getBooleanAsUser(context, KEY_TEMPERATURE_UNIT, true, 0);
    }

    public static void setCentigrade(Context context, boolean z) {
        putBooleanAsUser(context, KEY_TEMPERATURE_UNIT, z, 0);
    }

    public static boolean isShowSensorDataInLauncher(Context context) {
        return getBooleanAsUser(context, KEY_SHOW_SENSOR_DATA_IN_LAUNCHER, true, 0);
    }

    public static void setShowSensorDataInLauncher(Context context, boolean z) {
        putBooleanAsUser(context, KEY_SHOW_SENSOR_DATA_IN_LAUNCHER, z, 0);
    }

    public static void setPanelLockOn(Context context, boolean z) {
        putBoolean(context, KEY_PANEL_LOCK_STATE, z);
    }

    public static boolean isPanelLockOn(Context context) {
        return getBoolean(context, KEY_PANEL_LOCK_STATE, false);
    }

    public static void setDisplayPowerManagement(Context context, boolean z) {
        putBoolean(context, KEY_DISPLAY_POWER_MANAGEMENT, z);
    }

    public static boolean isDisplayPowerManagement(Context context) {
        return getBooleanAsUser(context, KEY_DISPLAY_POWER_MANAGEMENT, false, 0);
    }

    public static void setUsbDisableAllowed(Context context, boolean z) {
        putBooleanAsUser(context, KEY_USB_DISABLE_ALLOWED, z, 0);
    }

    public static boolean isUsbDisableAllowed(Context context) {
        return getBoolean(context, KEY_USB_DISABLE_ALLOWED, false);
    }

    public static String getVSettingsDisplayName(Context context, String str) {
        String str2;
        String property = PropertiesUtils.getProperty(SeewoConstants.SYSTEM_PROPERTY_CVT_CUSTOMER_PRODUCT_MODEL);
        if ("AVL-1050-T".equals(property)) {
            str2 = "Avocor L1050 Touch Display";
        } else if (property.contains("105")) {
            str2 = "Avocor L1050 Display";
        } else if (property.equalsIgnoreCase("AVE-9200")) {
            str2 = "Avocor AVE-9200";
        } else if (property.equalsIgnoreCase("AVH-652GV")) {
            str2 = "Avocor AVH-652GV";
        } else if (property.equalsIgnoreCase("AVH-752GV")) {
            str2 = "Avocor AVH-752GV";
        } else if (property.equalsIgnoreCase("AVH-862GV")) {
            str2 = "Avocor AVH-862GV";
        } else if (property.contains("65")) {
            str2 = "Avocor AVH-6520";
        } else if (property.contains("75")) {
            str2 = "Avocor AVH-7520";
        } else if (!property.contains("86")) {
            str2 = "";
        } else {
            str2 = "Avocor AVH-8620";
        }
        return getVSettingsDisplayName(context, str2, str);
    }

    public static String getVSettingsDisplayName(Context context, String str, String str2) {
        String string = getString(context, KEY_SETTINGS_DISPLAY_NAME);
        return !TextUtils.isEmpty(string) ? string : TextUtils.isEmpty(str) ? str2 : str;
    }

    public static void setVSettingsDisplayName(Context context, String str) {
        putString(context, KEY_SETTINGS_DISPLAY_NAME, str);
    }

    public static String getVSettingsLocation(Context context) {
        return getString(context, KET_SETTINGS_LONGITUDE_AND_LATITUDE, "");
    }

    public static void setVSettingsLocation(Context context, String str) {
        putString(context, KET_SETTINGS_LONGITUDE_AND_LATITUDE, str);
    }

    public static boolean isCelsiusDegrees(Context context) {
        return getBoolean(context, KET_SETTINGS_TEMPERATURE_UNIT, false);
    }

    public static boolean setIsCelsiusDegrees(Context context, boolean z) {
        return putBoolean(context, KET_SETTINGS_TEMPERATURE_UNIT, z);
    }

    public static String getVSettingsLocationPlaceId(Context context) {
        return getString(context, KET_SETTINGS_LOCATION_PLACE_ID, "");
    }

    public static void setVSettingsLocationPlaceId(Context context, String str) {
        putString(context, KET_SETTINGS_LOCATION_PLACE_ID, str);
    }

    public static String getVSettingsLocationDescription(Context context) {
        return getString(context, KET_SETTINGS_LOCATION_DESCRIPTION, "");
    }

    public static void setVSettingsLocationDescription(Context context, String str) {
        putString(context, KET_SETTINGS_LOCATION_DESCRIPTION, str);
    }

    public static void setBootOnType(Context context, int i) {
        putIntAsUser(context, KET_BOOT_ON_TYPE, i, 0);
    }

    public static int getBootOnType(Context context) {
        return getIntAsUser(context, KET_BOOT_ON_TYPE, 1, 0);
    }

    public static void setGestureFunctionRight(Context context, int i) {
        putInt(context, KEY_GESTURE_FUNCTION_RIGHT, i);
    }

    public static int getGestureFunctionRight(Context context) {
        return getInt(context, KEY_GESTURE_FUNCTION_RIGHT, 0);
    }

    public static void setGestureFunctionUp(Context context, int i) {
        putInt(context, KEY_GESTURE_FUNCTION_UP, i);
    }

    public static int getGestureFunctionUp(Context context) {
        return getInt(context, KEY_GESTURE_FUNCTION_UP, 0);
    }

    public static void setGestureFunctionDown(Context context, int i) {
        putInt(context, KEY_GESTURE_FUNCTION_DOWN, i);
    }

    public static int getGestureFunctionDown(Context context) {
        return getInt(context, KEY_GESTURE_FUNCTION_DOWN, 0);
    }

    public static void setGestureFunctionLeft(Context context, int i) {
        putInt(context, KEY_GESTURE_FUNCTION_LEFT, i);
    }

    public static int getGestureFunctionLeft(Context context) {
        return getInt(context, KEY_GESTURE_FUNCTION_LEFT, 0);
    }

    public static boolean isGestureFunctionEnable(Context context) {
        return getBoolean(context, KEY_GESTURE_FUNCTION_ENABLE, false);
    }

    public static void setGestureFunctionEnable(Context context, boolean z) {
        putBoolean(context, KEY_GESTURE_FUNCTION_ENABLE, z);
        context.sendBroadcast(new Intent(SeewoIntent.ACTION_GESTURE_CONFIG_CHANGED));
    }

    public static void setAutoOtaUpdateEnable(Context context, boolean z) {
        putBoolean(context, KEY_AUTO_OTA_UPDATE_STATE, z);
        context.sendBroadcast(new Intent(SeewoIntent.ACTION_AUTO_OTA_UPDATE_CHANGED));
    }

    public static boolean isAutoOtaUpdateEnable(Context context) {
        return getBoolean(context, KEY_AUTO_OTA_UPDATE_STATE, false);
    }

    public static void saveLastPowerState(Context context, int i) {
        putInt(context, KEY_LAST_POWER_STATE, i);
    }

    public static int getLastPowerState(Context context) {
        return getInt(context, KEY_LAST_POWER_STATE, 0);
    }

    public static void setAutoPowerEnable(Context context, boolean z) {
        putBoolean(context, KEY_SETTINGS_AUTO_POWER, z);
    }

    public static boolean isAutoPowerEnable(Context context) {
        return getBoolean(context, KEY_SETTINGS_AUTO_POWER, false);
    }

    public static void setNoteNoEraseAreas(Context context, String str) {
        putString(context, KEY_NOTE_NOT_ERASER_AREAS, str);
    }

    public static String getNoteNoEraseAreas(Context context) {
        return getString(context, KEY_NOTE_NOT_ERASER_AREAS);
    }

    public static boolean isSecureMode(Context context) {
        return getBoolean(context, KEY_SECURE_MODE, false);
    }

    public static void setSecureMode(Context context, boolean z) {
        putBoolean(context, KEY_SECURE_MODE, z);
    }

    public static String getIntoSecurityPassword(Context context, String str) {
        return getString(context, KEY_INTO_SECURITY_PASSWORD, str);
    }

    public static void setIntoSecurityPassword(Context context, String str) {
        putString(context, KEY_INTO_SECURITY_PASSWORD, str);
    }

    public static boolean isIntoSecurityPasswordEnable(Context context) {
        return getBoolean(context, KEY_IS_ENABLE_PASSWORD_SETTING, true);
    }

    public static void setIsIntoSecurityPasswordEnable(Context context, boolean z) {
        putBoolean(context, KEY_IS_ENABLE_PASSWORD_SETTING, z);
    }

    public static void setLanRS232Mode(Context context, LanRS232Mode lanRS232Mode) {
        putString(context, KEY_LAN_RS232_MODE, lanRS232Mode.name());
        context.sendBroadcast(new Intent(SeewoIntent.ACTION_UPDATE_LAN_RS232_STATE));
    }

    public static LanRS232Mode getLanRS232Mode(Context context) {
        return LanRS232Mode.valueOf(getString(context, KEY_LAN_RS232_MODE, LanRS232Mode.NOT_AUTH.name()));
    }

    public static void setLanRS232AuthPassword(Context context, String str) {
        putString(context, KEY_LAN_RS232_AUTH_PASSWORD, str);
        context.sendBroadcast(new Intent(SeewoIntent.ACTION_UPDATE_LAN_RS232_STATE));
    }

    public static String getLanRS232AuthPassword(Context context) {
        return getString(context, KEY_LAN_RS232_AUTH_PASSWORD, "");
    }

    public static void addNfcPassword(Context context, NFCPassword nFCPassword) {
        List<NFCPassword> nFCPassword2 = getNFCPassword(context);
        nFCPassword2.add(nFCPassword);
        putString(context, KEY_NFC_PASSWORD, sGson.toJson(nFCPassword2));
    }

    public static boolean isExistNfcPassword(Context context, String str) {
        Iterator<NFCPassword> it = getNFCPassword(context).iterator();
        while (it.hasNext()) {
            if (it.next().getNfcNum().equals(str)) {
                return true;
            }
        }
        return false;
    }

    public static void deleteNfcPassword(Context context, NFCPassword nFCPassword) {
        List<NFCPassword> nFCPassword2 = getNFCPassword(context);
        Iterator<NFCPassword> it = nFCPassword2.iterator();
        while (it.hasNext()) {
            NFCPassword next = it.next();
            if (next.getNfcName().equals(nFCPassword.getNfcName()) && next.getNfcNum().equals(nFCPassword.getNfcNum())) {
                it.remove();
            }
        }
        putString(context, KEY_NFC_PASSWORD, sGson.toJson(nFCPassword2));
    }

    public static List<NFCPassword> getNFCPassword(Context context) {
        String string = getString(context, KEY_NFC_PASSWORD, "");
        if ("".equals(string)) {
            return new ArrayList();
        }
        return (List) sGson.fromJson(string, new TypeToken<List<NFCPassword>>() { // from class: com.seewo.vcommons.data.PreferencesUtils.2
        }.getType());
    }

    public static DeviceType getPowerLockDeviceMode(Context context) {
        return DeviceType.valueOf(getString(context, KEY_POWER_LOCK_MODE, DeviceType.ALL.name()));
    }

    public static void setPowerLockDeviceMode(Context context, DeviceType deviceType) {
        putString(context, KEY_POWER_LOCK_MODE, deviceType.name());
    }

    public static void setWifiAPSupportDuplex(Context context, boolean z) {
        putBooleanAsUser(context, KEY_SUPPORT_WIFI_AP_DUPLEX, z, 0);
    }

    public static boolean isWifiAPSupportDuplex(Context context) {
        return getBooleanAsUser(context, KEY_SUPPORT_WIFI_AP_DUPLEX, false, 0);
    }

    public static int getKioskTenFingerMode(Context context) {
        return getInt(context, KIOSK_TEN_FINGER_MODE, 0);
    }

    public static boolean isInKioskModeLockingApp(Context context) {
        return getInt(context, SeewoConstants.KIOSK_NOW_RUNNING_MODE, 0) != 0;
    }

    public static boolean isPinCodeFloatingWindowEnable(Context context) {
        return getBoolean(context, KEY_PIN_CODE_FLOATING_WINDOW_ENABLE, true);
    }

    public static void setPinCodeFloatingWindowEnable(Context context, boolean z) {
        putBoolean(context, KEY_PIN_CODE_FLOATING_WINDOW_ENABLE, z);
        context.sendBroadcast(new Intent(ACTION_PIN_CODE_SETTINGS_CHANGE));
    }

    public static int getPinCodeRefreshRate(Context context) {
        return getInt(context, KEY_PIN_CODE_REFRESH_RATE, 10);
    }

    public static void setPinCodeRefreshRate(Context context, int i) {
        putInt(context, KEY_PIN_CODE_REFRESH_RATE, i);
        context.sendBroadcast(new Intent(ACTION_PIN_CODE_SETTINGS_CHANGE));
    }

    public static int getPinCodeFloatingWindowSize(Context context) {
        return getInt(context, KEY_PIN_CODE_FLOATING_WINDOW_SIZE, 2);
    }

    public static void setPinCodeFloatingWindowSize(Context context, int i) {
        putInt(context, KEY_PIN_CODE_FLOATING_WINDOW_SIZE, i);
        context.sendBroadcast(new Intent(ACTION_PIN_CODE_SETTINGS_CHANGE));
    }

    public static boolean isSupportInterceptAutoBlackScreen(Context context) {
        return getBoolean(context, KEY_SUPPORT_INTERCEPT_AUTO_BLACK_SCREEN);
    }

    public static void setInterceptAutoBlackScreen(Context context, boolean z) {
        putBoolean(context, KEY_INTERCEPT_AUTO_BLACK_SCREEN, z);
    }

    public static boolean isAccountDeviceLock(Context context) {
        return getBoolean(context, KEY_ACCOUNT_DEVICE_LOCK, false);
    }

    public static boolean setAccountDeviceLock(Context context, boolean z) {
        return putBoolean(context, KEY_ACCOUNT_DEVICE_LOCK, z);
    }

    public static boolean isInterceptAutoBlackScreen(Context context) {
        return getBoolean(context, KEY_INTERCEPT_AUTO_BLACK_SCREEN);
    }

    public static void addNfcData(Context context, NFCData nFCData) {
        List<NFCData> nfcData = getNfcData(context);
        nfcData.add(nFCData);
        putString(context, KEY_NFC_DATA, sGson.toJson(nfcData));
    }

    public static List<NFCData> getNfcData(Context context) {
        String string = getString(context, KEY_NFC_DATA, "");
        if ("".equals(string)) {
            return new ArrayList();
        }
        return (List) sGson.fromJson(string, new TypeToken<List<NFCData>>() { // from class: com.seewo.vcommons.data.PreferencesUtils.3
        }.getType());
    }

    public static void deleteNfcData(Context context, NFCData nFCData) {
        List<NFCData> nfcData = getNfcData(context);
        Iterator<NFCData> it = nfcData.iterator();
        while (it.hasNext()) {
            NFCData next = it.next();
            if (next.getApp().equals(nFCData.getApp()) && next.getData().equals(nFCData.getData())) {
                it.remove();
            }
        }
        putString(context, KEY_NFC_DATA, sGson.toJson(nfcData));
    }
}
