Skip to content

Commit d3d28be

Browse files
authored
Merge pull request #318 from gotify/crash
fix: remove probably unnecessary unregister
2 parents 5e67cc8 + b1be4d7 commit d3d28be

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

app/src/main/kotlin/com/github/gotify/service/WebSocketService.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import android.app.Notification
55
import android.app.NotificationManager
66
import android.app.PendingIntent
77
import android.app.Service
8-
import android.content.Context
98
import android.content.Intent
109
import android.graphics.Color
1110
import android.net.ConnectivityManager
@@ -80,10 +79,6 @@ internal class WebSocketService : Service() {
8079
override fun onDestroy() {
8180
super.onDestroy()
8281
connection?.close()
83-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
84-
(getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager)
85-
.unregisterNetworkCallback(networkCallback)
86-
}
8782

8883
Logger.warn("Destroy ${javaClass.simpleName}")
8984
}

0 commit comments

Comments
 (0)