Fix ForegroundServiceDidNotStartInTimeException (#6470)

* Start the `FetchPushForegroundService ` in foreground ASAP. This is a first step to mitigate `ForegroundServiceDidNotStartInTimeException` being thrown.

* Don't stop the service immediately if it's running but not in foreground. Try waiting up to 5s for it to be in foreground.
This commit is contained in:
Jorge Martin Espinosa 2026-03-27 07:54:27 +01:00 committed by GitHub
parent ef041baeb4
commit bba2e6df3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 53 additions and 10 deletions

View file

@ -22,5 +22,5 @@ interface PushHandlingWakeLock {
/**
* Release the wakelock. If no wakelock is associated with the key, this method does nothing.
*/
fun unlock()
suspend fun unlock()
}