package com.xhly.corelib

import android.content.Intent


object Const {
    const val isDebug = false

    //记录点击返回的次数，超过UPDATESTRATEGYNUM次请求策略
    var backNum = 0

    //记录点击返回的次数，超过10次请求策略
    const val UPDATESTRATEGYNUM = 20

    /**
     * 标记熄屏
     */
    const val ACTION_SCREEN_OFF="ACTION_SCREEN_OFF"

    /**
     * 标记亮屏
     */
    const val ACTION_SCREEN_ON="ACTION_SCREEN_ON"

    /**
     * 当前应用包名
     */
    const val CURRENTAPPPKG = "com.xhkjedu.manageapp"

    /**
     * 商店包名
     */
    const val STOREAPPPKG = "com.xhkjedu.xh_control_appstore"

    /**
     * 更新策略包名
     */
    const val UPDATESTRATEGYPKGNAME = "UPDATESTRATEGYPKGNAME"



    /**
     * 进入网络设置
     */
    const val WIFISEETTINGPKG = "WIFISEETTINGPKG"


    /**
     * 存储管控是否已解除的key
     */
    const val EXIT_CONTROL = "EXIT_CONTROL"

    //用户id
    var USERID: Long? = 1L

    //用户姓名
    var USERNAME: String? = ""

    //学校id
    var SCHOOLID: Long? = null

    //班级id
    var CLASSID: Long? = null

    //标记上次打开的包名，当连续打开同一包名时，不认为打开多次
    var LASTPKGNAME = ""

    //存储区域码，存在则在弹窗出现时显示
    const val REGIONCODEKEY="REGIONCODEKEY"
    //接口地址
    const val URL1: String = "https://mcapitest.xhkjedu.com/"

    //接口地址
    const val WSURL: String = "wss://mcwstest.xhkjedu.com/ws"

    //标记平板禁用（来源于socket）
    const val DISABLEPAD = "DISABLEPAD"

    /**
     * 用来存储自动跳转应用相关的数据
     */
    const val AUTOAPPKEY = "AUTOAPPKEY"

    //作为存储白名单应用的key
    const val WHITELISTAPP = "WHITELISTAPP"

    //存储是否是第一次打开的key
    const val FIRSTFLAG = "FIRSTFLAG"

    //存储是否是第一次打开的key
    const val FIRSTAPPLIST = "FIRSTAPPLIST"
    /**
     * 启动socket
     */
     const val STARTSOCKET="STARTSOCKET"
    /**
     * 标记推出登录
     */
    const val ACCOUNTLOGINOUT = "ACCOUNTLOGINOUT"

    /**
     * 标记直接退出，不调用接口
     */
    const val ACCOUNTLOGINOUTSUCESS = "ACCOUNTLOGINOUTSUCESS"

    /**
     * 调用定位
     */
    const val STARTLOCATION = "STARTLOCATION"

    /**
     * 调用安装app方法
     */
    const val INSTALL_FORCEAPP="INSTALL_FORCEAPP"

    /**
     * 存储应用商店应用列表数据集合
     */
    const val APPSTOREDATAKEY = "APPSTOREDATAKEY"

    //401退出登录
    const val LOGIN_OUT_401 = "LOGIN_OUT_401"

    //通知websocket链接成功
    const val UPDATE_CONNECTED_SUCCESS = "UPDATE_CONNECTED_SUCCESS"

    //发送消息
    const val CODE2001 = 2001

    //限制使用
    const val CODE2002 = 2002

    //解除限制
    const val CODE2003 = 2003

    //更新策略
    const val CODE2004 = 2004

    //重启设备
    const val CODE2005 = 2005

    //恢复出厂
    const val CODE2006 = 2006

    //解除管控
    const val CODE2007 = 2007

    //解除绑定
    const val CODE2008 = 2008

    /**
     * 违规事件自动调用的锁定
     */
    const val CODE3002 = 3002


    /**
     * 违规事件自动调用的恢复出厂设置
     */
    const val CODE3006 = 3006

    //消息确认回发
    const val CODE666 = 666

    //错误消息
    const val CODE999 = 999

    //应用启动日志
    const val LOGAPPSTART = "LOGAPPSTART"

    //标记应用安装
    const val APPINSTALL = "APPINSTALL"

    //标记应用卸载
    const val APPUNINSTALL = "APPUNINSTALL"


    //标记SD卡安装
    const val SDINSTALL = "SDINSTALL"

    //标记SD卡卸载
    const val SDUNINSTALL = "SDUNINSTALL"

    //标记SIM卡安装事件
    const val SIMINSTALL = "SIMINSTALL"

    //标记SIM卡卸载事件
    const val SIMUNINSTALL = "SIMUNINSTALL"

    //标记蓝牙打开
    const val BLUETOOTHOPEN = "BLUETOOTHOPEN"

    //标记USB连接电脑
    const val USB_CONNECTED = "USB_CONNECTED"

    //标记USB拔出电脑
    const val USB_NOCONNECTED = "USB_NOCONNECTED"

    //标记更新策略
    const val UPDATESTRATEGY = "UPDATESTRATEGY"

    //存储平板策略
    const val STRATEGYBEANKEY = "STRATEGYBEAN"

    //存储app时间策略
    const val APPSTRATEGYBEANKEY = "APPSTRATEGYBEAN"

    //存储pad信息提交时间，如果为同一天则不在上传，不然继续上传
    const val PADINFOTIMEKEY = "PADINFOTIMEKEY"

    //存储pad更新请求时间，如果为同一天则不在请求更新，不然继续请求更新
    const val PADUPDATETIMEKEY = "PADUPDATETIMEKEY"

    //存储用户信息
    const val USERINFO = "USERINFO"

    //存储学校设置的设备设置
    const val SCHOOLSETDEVICE = "SCHOOLSETDEVICE"

    //记录设备策略名称
    const val DEVICETYPE1 = "摄像头"
    const val DEVICETYPE2 = "蓝牙"
    const val DEVICETYPE3 = "USB连接"
    const val DEVICETYPE4 = "WiFi开关"
    const val DEVICETYPE5 = "电话短信"
    const val DEVICETYPE6 = "数据流量"
    const val DEVICETYPE7 = "GPS"
    const val DEVICETYPE8 = "WiFi高级选项"
    const val DEVICETYPE9 = "SD卡"
    const val DEVICETYPE10 = "OTG"


    //记录系统应用名称
    /**
     * 电话包名
     */
    const val ANDROIDPHONE = "com.android.contacts"

    /**
     * 短信包名
     */
    const val ANDROIDMMS = "com.android.mms"

    /**
     * 日历
     */
    const val ANDROIDCALENDAR = "com.android.calendar"

    /**
     * 录音机
     */
    const val ANDROIDRECORDER = "com.android.soundrecorder"

    /**
     *时钟
     */
    const val ANDROIDDESKCLOCK = "com.android.deskclock"

    /**
     * 联想相机相机
     */
    const val ANDROIDCAMERA = "org.codeaurora.snapcam"

    /**
     * 联想相册505f
     */
    const val ANDROIDGALLERY = "org.codeaurora.gallery"
    /**
     * 联想相册6e6f
     */
    const val ANDROIDGALLERY6 = "com.android.gallery3d"

    /**
     * 这几个应用由学校设置接口处理
     */
    val schoolSetAppList = arrayListOf(
        ANDROIDPHONE,
        ANDROIDMMS,
        ANDROIDCALENDAR,
        ANDROIDDESKCLOCK,
        ANDROIDCAMERA,
        ANDROIDGALLERY,
        ANDROIDGALLERY6
    )

    /**
     *标记自定义的一键清理名称
     */
    const val CUSTOMSPEEDAPP = "CUSTOMSPEEDAPP"

    /**
     *标记自定义的清除缓存名称
     */
    const val CUSTOMCLEARAPP = "CUSTOMCLEARAPP"

    /**
     *标记自定义的自动旋转名称
     */
    const val CUSTOMROTATIONAPP = "CUSTOMROTATIONAPP"

    /**
     *标记自定义的修改密码
     */
    const val CUSTOMCHANGEPSD = "CUSTOMCHANGEPSD"
}