Skip to content
Commit 7d442919 authored by Evan Laird's avatar Evan Laird
Browse files

Fix FGS lifetime extender overzealousness

ForegroundServiceLifetimeExtender was always posting MIN_FGS_TIME_MS in
the future to release a notification if it was canceled at any time
before the minimum. Meaning that if a foreground service was started and
then stopped 4.9 seconds later, it woudn't be released until 9.9 seconds
due to always posting 5000ms.

This change takes into consideration the time that a notification has
already been showing.

Fixes: 141688100
Test: atest ForegroundServiceNotificationListenerTest
Change-Id: Ie0403ddb37bb85a602a5ac6ffedcaf4bab2efcbc
parent 38bbedae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment