Skip to content
Commit 8cbc9740 authored by Hui Yu's avatar Hui Yu
Browse files

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
parent 5681f7c0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment