|
@@ -1,20 +0,0 @@
|
1
|
|
-package com.xhly.manageapp.broadcastreceiver
|
2
|
|
-
|
3
|
|
-import android.content.BroadcastReceiver
|
4
|
|
-import android.content.Context
|
5
|
|
-import android.content.Intent
|
6
|
|
-import android.util.Log
|
7
|
|
-import com.xhly.corelib.utils.AppUtils
|
8
|
|
-
|
9
|
|
-class XhlyBroadCastReceiver : BroadcastReceiver() {
|
10
|
|
- override fun onReceive(context: Context?, intent: Intent?) {
|
11
|
|
- Log.i("收到广播", "这是finish广播")
|
12
|
|
- val getAppList1 = AppUtils.GetAppList(context)
|
13
|
|
- getAppList1?.forEach {
|
14
|
|
- if (it.packageName.equals("com.xhly.easystud")) {
|
15
|
|
- it.intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
16
|
|
- context?.startActivity(it.intent)
|
17
|
|
- }
|
18
|
|
- }
|
19
|
|
- }
|
20
|
|
-}
|