Quellcode durchsuchen

1.移除未使用的工具类和service

master
wangwanlei vor 10 Monaten
Ursprung
Commit
78fa858b1d

+ 0
- 6
websocket/src/main/AndroidManifest.xml Datei anzeigen

@@ -5,11 +5,5 @@
5 5
 
6 6
 
7 7
     <application>
8
-        <service android:name="com.xhly.websocket.service.SocketService"
9
-            android:foregroundServiceType="dataSync"
10
-            />
11
-        <service android:name="com.xhly.websocket.service.ManageService"
12
-            android:foregroundServiceType="dataSync"
13
-            />
14 8
     </application>
15 9
 </manifest>

+ 0
- 27
websocket/src/main/java/com/xhly/websocket/service/ManageService.kt Datei anzeigen

@@ -1,27 +0,0 @@
1
-package com.xhly.websocket.service
2
-
3
-import android.app.Service
4
-import android.content.Intent
5
-import android.os.IBinder
6
-import com.xhly.corelib.utils.LogShow
7
-import com.xhly.websocket.utils.WebSocketUtils
8
-
9
-class ManageService: Service() {
10
-    override fun onBind(intent: Intent?): IBinder? {
11
-       return null
12
-    }
13
-
14
-    override fun onCreate() {
15
-        super.onCreate()
16
-        LogShow("创建service")
17
-    }
18
-    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
19
-        WebSocketUtils.openWebSocket(this)
20
-        LogShow("执行service")
21
-        return super.onStartCommand(intent, flags, startId)
22
-    }
23
-
24
-    override fun onDestroy() {
25
-        super.onDestroy()
26
-    }
27
-}

+ 0
- 26
websocket/src/main/java/com/xhly/websocket/utils/WebSocketUtils.java Datei anzeigen

@@ -1,26 +0,0 @@
1
-package com.xhly.websocket.utils;
2
-
3
-import android.content.Context;
4
-import android.content.Intent;
5
-
6
-import com.neovisionaries.ws.client.WebSocket;
7
-import com.xhly.websocket.service.SocketService;
8
-import com.xhly.websocket.service.WebSocketHelper;
9
-
10
-
11
-public class WebSocketUtils {
12
-    //启动服务
13
-    public static void openWebSocket(Context context) {
14
-        context.startService(new Intent(context, SocketService.class));
15
-    }
16
-
17
-    public static void closeWebSocket(Context context) {
18
-        context.stopService(new Intent(context, SocketService.class));
19
-    }
20
-
21
-    //心跳消息
22
-    public static void hearBeat(WebSocket webSocket) {
23
-        WebSocketHelper.getInstance().hearBeat(webSocket);
24
-    }
25
-
26
-}

Laden…
Abbrechen
Speichern