mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 04:20:00 +03:00
Add missed callback unregister in NetworkConnectivityChecker
Avoid ConnectivityManager$TooManyRequestsException Change-Id: Ie2a80576940fd9f91d475a2d1b4626d6d4cfd02d
This commit is contained in:
parent
884568cbeb
commit
5726c769ec
1 changed files with 3 additions and 0 deletions
|
@ -88,6 +88,9 @@ internal class DefaultNetworkConnectivityChecker @Inject constructor(
|
|||
listeners.remove(listener)
|
||||
if (listeners.isEmpty()) {
|
||||
backgroundDetectionObserver.unregister(backgroundDetectionObserverListener)
|
||||
if (!backgroundDetectionObserver.isInBackground) {
|
||||
unbind()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue