|
@@ -62,7 +62,6 @@ open class AppSocketService : LongConnService() {
|
62
|
62
|
super.onCreate()
|
63
|
63
|
EventBus.getDefault().register(this)
|
64
|
64
|
connectUrl = Const.WSURL
|
65
|
|
- /* csdkManager = CSDKManager(this)*/
|
66
|
65
|
/* startNotification()*/
|
67
|
66
|
LogShow("已经创建")
|
68
|
67
|
appList = AppUtils.GetAppList(this) as ArrayList<AppInfo>
|
|
@@ -91,9 +90,6 @@ open class AppSocketService : LongConnService() {
|
91
|
90
|
|
92
|
91
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
93
|
92
|
fun onUiEvent(uiEvent: UIEvent) {
|
94
|
|
- /* if (csdkManager == null) {
|
95
|
|
- csdkManager = CSDKManager(this)
|
96
|
|
- }*/
|
97
|
93
|
when (uiEvent.event) {
|
98
|
94
|
Const.CODE2001.toString() -> {
|
99
|
95
|
Toast.makeText(this, "这就是新消息", Toast.LENGTH_LONG).show()
|
|
@@ -106,11 +102,11 @@ open class AppSocketService : LongConnService() {
|
106
|
102
|
}
|
107
|
103
|
|
108
|
104
|
Const.CODE2005.toString() -> {
|
109
|
|
- //csdkManager?.rebootDevice()
|
|
105
|
+ ManageApplication.rebootDevice()
|
110
|
106
|
}
|
111
|
107
|
|
112
|
108
|
Const.CODE2006.toString() -> {
|
113
|
|
- //csdkManager?.launchFactoryReset()
|
|
109
|
+ ManageApplication.launchFactoryReset()
|
114
|
110
|
}
|
115
|
111
|
|
116
|
112
|
Const.LOGAPPSTART -> {
|
|
@@ -138,7 +134,7 @@ open class AppSocketService : LongConnService() {
|
138
|
134
|
ManageApplication.getDeviceInfo()?.let {
|
139
|
135
|
data.sn = it
|
140
|
136
|
}
|
141
|
|
- data.appPackage=message
|
|
137
|
+ data.appPackage = message
|
142
|
138
|
data.doEvent = EventLog.STARTAPPEVENT
|
143
|
139
|
eventLog(data)
|
144
|
140
|
}
|
|
@@ -150,8 +146,8 @@ open class AppSocketService : LongConnService() {
|
150
|
146
|
ManageApplication.getDeviceInfo()?.let {
|
151
|
147
|
data.sn = it
|
152
|
148
|
}
|
153
|
|
- data.appPackage=message
|
154
|
|
- data.comm="应用安装"
|
|
149
|
+ data.appPackage = message
|
|
150
|
+ data.comm = "应用安装"
|
155
|
151
|
data.doEvent = EventLog.APPINSTALLEVENT
|
156
|
152
|
eventLog(data)
|
157
|
153
|
}
|
|
@@ -162,8 +158,8 @@ open class AppSocketService : LongConnService() {
|
162
|
158
|
ManageApplication.getDeviceInfo()?.let {
|
163
|
159
|
data.sn = it
|
164
|
160
|
}
|
165
|
|
- data.appPackage=message
|
166
|
|
- data.comm="应用卸载"
|
|
161
|
+ data.appPackage = message
|
|
162
|
+ data.comm = "应用卸载"
|
167
|
163
|
data.doEvent = EventLog.APPUNINSTALLEVENT
|
168
|
164
|
eventLog(data)
|
169
|
165
|
}
|