Browse Source

1.添加退出登录广播接收器

20241218TB223FC(测试jar包)
wangwanlei 5 months ago
parent
commit
7fc02603b5

+ 8
- 0
app/src/main/AndroidManifest.xml View File

@@ -117,6 +117,14 @@
117 117
                 <action android:name="android.net.wifi.STATE_CHANGE" />
118 118
             </intent-filter>
119 119
         </receiver>-->
120
+        <receiver
121
+            android:name="com.xhly.manageapp.broadcastreceiver.XhlyLoginOutReceiver"
122
+            android:enabled="true"
123
+            android:exported="true">
124
+            <intent-filter>
125
+                <action android:name="com.xhly.manageapp.loginout" />
126
+            </intent-filter>
127
+        </receiver>
120 128
         <receiver
121 129
             android:name="com.xhly.manageapp.broadcastreceiver.SimStateReceive"
122 130
             android:enabled="true"

+ 14
- 0
app/src/main/java/com/xhly/manageapp/broadcastreceiver/XhlyLoginOutReceiver.kt View File

@@ -0,0 +1,14 @@
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.Const
8
+import com.xhly.corelib.eventbus.UIEvent
9
+
10
+class XhlyLoginOutReceiver : BroadcastReceiver() {
11
+    override fun onReceive(context: Context, intent: Intent) {
12
+        UIEvent(Const.ACCOUNTLOGINOUT).post()
13
+    }
14
+}

Loading…
Cancel
Save