Move postFgsNotificationLocked() to outer block.
Some apps call Service.startForeground() multiple times with different
Notification objects to update the notification.
The change I049070f343f578fa3e9f6bb4dab914da5b23672a moved postFgsNotificationLocked()
from outer block to inner block for the purpose of updating mFgsNotificationDeferred and mFgsNotificationShown fields
before the logForegroundServiceStateChanged() call. This has changed the
behavior and apps can not use multiple Service.startForeground() calls to
update notification any more.
To avoid breaking apps, move postFgsNotificationLocked() to outer block.
Bug: 185523487
Test: b/185523487 test.
Change-Id: Idc6ea831cc8943dc24b85de9989c3aa3d99e2ffa
1 file changed