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:
parent
ef041baeb4
commit
bba2e6df3f
4 changed files with 53 additions and 10 deletions
|
|
@ -18,7 +18,7 @@ class FakePushHandlingWakeLock(
|
|||
lock.invoke(time)
|
||||
}
|
||||
|
||||
override fun unlock() {
|
||||
override suspend fun unlock() {
|
||||
unlock.invoke()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue