Always background legacy FCM fallback.
This commit is contained in:
parent
5db770ca44
commit
e2a79394ab
1 changed files with 7 additions and 10 deletions
|
@ -119,19 +119,16 @@ object FcmFetchManager {
|
|||
startForegroundOnDestroy = true
|
||||
Log.i(TAG, "Legacy fallback: foreground service is stopping, but trying to run in background anyways.")
|
||||
}
|
||||
val performedReplace = EXECUTOR.enqueue { fetch(context) }
|
||||
}
|
||||
val performedReplace = EXECUTOR.enqueue { fetch(context) }
|
||||
|
||||
if (performedReplace) {
|
||||
Log.i(TAG, "Legacy fallback: already have one running and one enqueued. Ignoring.")
|
||||
} else {
|
||||
activeCount++
|
||||
Log.i(TAG, "Legacy fallback: Incrementing active count to $activeCount")
|
||||
}
|
||||
return
|
||||
if (performedReplace) {
|
||||
Log.i(TAG, "Legacy fallback: already have one running and one enqueued. Ignoring.")
|
||||
} else {
|
||||
activeCount++
|
||||
Log.i(TAG, "Legacy fallback: Incrementing active count to $activeCount")
|
||||
}
|
||||
}
|
||||
Log.i(TAG, "No foreground running, performing legacy fallback")
|
||||
retrieveMessages(context)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
|
Loading…
Add table
Reference in a new issue