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

Skip to content
Commit 43b4d613 authored by Jernej Virag's avatar Jernej Virag
Browse files

Don't store old pending intents in NotificationTemplateViewWrapper

In NotificationTemplateViewWrapper, we kept Action PendingIntents around so we could disable notification Actions correctly if those intents were cancelled and Actions were updated (there's a race there due to
use of multiple threads).

If application keeps updating their PendingIntents, we ended up keeping several 1000 of them, which causes problems for system_server due to Binder leaks.

This CL makes sure we only keep PendingIntent HashCodes (they're enough to disambiguate) and clean even those as Actions get updated. We now also only have a single listener instance to avoid leaks of those.

Bug:295847709
Bug:298028699

Test: Newly added unit tests.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:af02615322671de23cb3bae55b1e24ee7f309ae0)
Merged-In: I67188ee73920b1fea3a785bf729342ffc0099f20
Change-Id: I67188ee73920b1fea3a785bf729342ffc0099f20
parent b14d7c70
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