Skip to content

Commit

Permalink
Merge pull request #318 from gotify/crash
Browse files Browse the repository at this point in the history
fix: remove probably unnecessary unregister
  • Loading branch information
jmattheis authored Oct 8, 2023
2 parents 5e67cc8 + b1be4d7 commit d3d28be
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.app.Notification
import android.app.NotificationManager
import android.app.PendingIntent
import android.app.Service
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.net.ConnectivityManager
Expand Down Expand Up @@ -80,10 +79,6 @@ internal class WebSocketService : Service() {
override fun onDestroy() {
super.onDestroy()
connection?.close()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
(getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager)
.unregisterNetworkCallback(networkCallback)
}

Logger.warn("Destroy ${javaClass.simpleName}")
}
Expand Down

0 comments on commit d3d28be

Please sign in to comment.