Browse Source

1.添加更新策略的广播。

20241218TB223FC(测试jar包)
wangwanlei 2 months ago
parent
commit
6e230993fb

+ 26
- 13
app/src/main/AndroidManifest.xml View File

@@ -9,7 +9,7 @@
9 9
         android:name="android.permission.QUERY_ALL_PACKAGES"
10 10
         tools:ignore="QueryAllPackagesPermission" />
11 11
     <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
12
-    <uses-permission android:name="android.permission.READ_PHONE_NUMBERS"/>
12
+    <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
13 13
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
14 14
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
15 15
     <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
@@ -65,9 +65,13 @@
65 65
             android:value="667" /> <!-- 全局内容提供者 -->
66 66
         <meta-data
67 67
             android:name="com.baidu.lbsapi.API_KEY"
68
-            android:value="9eZF1Cg9JYIzme7dSnG8rmeUj7ET3lK1" >
69
-        </meta-data>
70
-        <service android:name="com.baidu.location.f" android:enabled="true" android:process=":remote" android:foregroundServiceType="location"> </service>
68
+            android:value="9eZF1Cg9JYIzme7dSnG8rmeUj7ET3lK1"></meta-data>
69
+        <service
70
+            android:name="com.baidu.location.f"
71
+            android:enabled="true"
72
+            android:foregroundServiceType="location"
73
+            android:process=":remote"></service>
74
+
71 75
         <activity
72 76
             android:name="com.xhly.manageapp.ui.main.activity.MainActivity"
73 77
             android:exported="true"
@@ -89,6 +93,7 @@
89 93
             android:launchMode="singleTask"
90 94
             android:screenOrientation="landscape"
91 95
             android:windowSoftInputMode="adjustResize" />
96
+
92 97
         <receiver
93 98
             android:name="com.xhly.manageapp.broadcastreceiver.USBReceiver"
94 99
             android:enabled="true"
@@ -107,22 +112,30 @@
107 112
                 <action android:name="android.bluetooth.BluetoothAdapter.STATE_ON" />
108 113
             </intent-filter>
109 114
         </receiver>
110
-<!--        <receiver
111
-            android:name="com.xhly.manageapp.broadcastreceiver.NetConnectReceiver"
115
+        <!--        <receiver
116
+                    android:name="com.xhly.manageapp.broadcastreceiver.NetConnectReceiver"
117
+                    android:enabled="true"
118
+                    android:exported="true">
119
+                    <intent-filter android:priority="1000">
120
+                        <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
121
+                        <action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
122
+                        <action android:name="android.net.wifi.STATE_CHANGE" />
123
+                    </intent-filter>
124
+                </receiver>-->
125
+        <receiver
126
+            android:name="com.xhly.manageapp.broadcastreceiver.XhlyLoginOutReceiver"
112 127
             android:enabled="true"
113 128
             android:exported="true">
114
-            <intent-filter android:priority="1000">
115
-                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
116
-                <action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
117
-                <action android:name="android.net.wifi.STATE_CHANGE" />
129
+            <intent-filter>
130
+                <action android:name="com.xhly.manageapp.loginout" />
118 131
             </intent-filter>
119
-        </receiver>-->
132
+        </receiver>
120 133
         <receiver
121
-            android:name="com.xhly.manageapp.broadcastreceiver.XhlyLoginOutReceiver"
134
+            android:name="com.xhly.manageapp.broadcastreceiver.XhlyUpdeteStrategyReceiver"
122 135
             android:enabled="true"
123 136
             android:exported="true">
124 137
             <intent-filter>
125
-                <action android:name="com.xhly.manageapp.loginout" />
138
+                <action android:name="com.xhly.manageapp.updetestrategy" />
126 139
             </intent-filter>
127 140
         </receiver>
128 141
         <receiver

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

@@ -0,0 +1,16 @@
1
+package com.xhly.manageapp.broadcastreceiver
2
+
3
+import android.content.BroadcastReceiver
4
+import android.content.Context
5
+import android.content.Intent
6
+import com.xhly.corelib.Const
7
+import com.xhly.corelib.eventbus.UIEvent
8
+
9
+/**
10
+ * 用于其他应用请求策略更新
11
+ */
12
+class XhlyUpdeteStrategyReceiver: BroadcastReceiver() {
13
+    override fun onReceive(context: Context, intent: Intent) {
14
+        UIEvent(Const.CODE2004.toString()).post()
15
+    }
16
+}

Loading…
Cancel
Save