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
Loading
Please register or sign in to comment