|
@@ -338,7 +338,7 @@ object StrategyUtils {
|
338
|
338
|
/**
|
339
|
339
|
* 解除管控
|
340
|
340
|
*/
|
341
|
|
- public fun releaseControl(){
|
|
341
|
+ public fun releaseControl(context: Context){
|
342
|
342
|
try {
|
343
|
343
|
//允许截屏
|
344
|
344
|
ManageApplication.enableCaptureScreen(true)
|
|
@@ -363,20 +363,23 @@ object StrategyUtils {
|
363
|
363
|
//关闭网络白名单
|
364
|
364
|
ManageApplication.setUrlWhiteListEnable(false)
|
365
|
365
|
//设置默认启动器
|
366
|
|
- ManageApplication.setCustomLauncher("com.tblenovo.launcher","com.android.iotlauncher.IotLauncher")
|
367
|
|
- try {
|
368
|
|
- val launchIntent = Intent()
|
369
|
|
- launchIntent.setComponent(
|
370
|
|
- ComponentName(
|
371
|
|
- "com.tblenovo.launcher",
|
372
|
|
- "com.android.iotlauncher.IotLauncher"
|
|
366
|
+ if (ModelNameUtils.IS_LianxX505f()){
|
|
367
|
+ //505f的桌面名称
|
|
368
|
+ ManageApplication.setCustomLauncher("com.tblenovo.launcher","com.android.iotlauncher.IotLauncher")
|
|
369
|
+ try {
|
|
370
|
+ val launchIntent = Intent()
|
|
371
|
+ launchIntent.setComponent(
|
|
372
|
+ ComponentName(
|
|
373
|
+ "com.tblenovo.launcher",
|
|
374
|
+ "com.android.iotlauncher.IotLauncher"
|
|
375
|
+ )
|
373
|
376
|
)
|
374
|
|
- )
|
375
|
|
- launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
376
|
|
- ManageApplication.instance?.startActivity(launchIntent)
|
377
|
|
- exitProcess(0)
|
378
|
|
- }catch (e:Exception){
|
379
|
|
- Toaster.showLong("失败原因"+e.toString())
|
|
377
|
+ launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
378
|
+ context.startActivity(launchIntent)
|
|
379
|
+ exitProcess(0)
|
|
380
|
+ }catch (e:Exception){
|
|
381
|
+ Toaster.showLong("失败原因"+e.toString())
|
|
382
|
+ }
|
380
|
383
|
}
|
381
|
384
|
}catch (e:Exception){
|
382
|
385
|
|