Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 32c0da43 authored by Pradeep Sawlani's avatar Pradeep Sawlani
Browse files

Fix duplicate bitmaps.



onNotificationPosted callback can be called multiple times from the app
to update the notification in system UI before onNotificationRemoved() is
called. Prior code assumed, notification objet would not change and as
Set does not allow duplicates it will ignore the update.

Changes in this commit fixes the above assumption and while we are at
it, does shallow copy so there are no addtional references to Bitmap.

Verified the changes with media playback and checking system_server
memory.

Test: atest cts/tests/app/src/android/app/cts/ActivityManagerNotifyMediaFGSTypeTest.java
Flag: com.android.media.flags.enable_notifying_activity_manager_with_media_session_status_change
BUG: 403303336
Change-Id: I3d5d4f6d976731da55ff125e19f22020ec987af6
Signed-off-by: default avatarPradeep Sawlani <sawlani@google.com>
parent 5edd4c32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment