|
@@ -15,6 +15,7 @@ import com.xhly.corelib.bean.AppInfo
|
15
|
15
|
import com.xhly.corelib.eventbus.UIEvent
|
16
|
16
|
import com.xhly.corelib.utils.LogShow
|
17
|
17
|
import com.xhly.corelib.utils.SystemUtil
|
|
18
|
+import com.xhly.manageapp.utils.InstallUtils
|
18
|
19
|
import com.xhly.manageapp.utils.StrategyUtils
|
19
|
20
|
import java.util.Calendar
|
20
|
21
|
|
|
@@ -64,6 +65,7 @@ class AppAdapter(var context: Context, var data: ArrayList<AppInfo>) :
|
64
|
65
|
context.startActivity(Intent(Settings.ACTION_WIFI_SETTINGS))
|
65
|
66
|
}else if (appInfo.packageName.equals(Const.STOREAPPPKG)){
|
66
|
67
|
//跳转应用商店
|
|
68
|
+ var destroyFlag=false
|
67
|
69
|
try {
|
68
|
70
|
val launchIntent = Intent()
|
69
|
71
|
launchIntent.setComponent(
|
|
@@ -73,8 +75,14 @@ class AppAdapter(var context: Context, var data: ArrayList<AppInfo>) :
|
73
|
75
|
)
|
74
|
76
|
)
|
75
|
77
|
context.startActivity(launchIntent)
|
|
78
|
+ destroyFlag=true
|
76
|
79
|
}catch (e:Exception){
|
|
80
|
+ destroyFlag=false
|
77
|
81
|
Toaster.showLong("失败原因"+e.toString())
|
|
82
|
+ }finally {
|
|
83
|
+ if (destroyFlag){
|
|
84
|
+ InstallUtils.destroyInstallUtils()
|
|
85
|
+ }
|
78
|
86
|
}
|
79
|
87
|
} else{
|
80
|
88
|
try {
|