OSDN Git Service

Stop leaking Notifications when they change groupKeys.
authorDan Sandler <dsandler@android.com>
Thu, 14 Jan 2016 20:49:36 +0000 (15:49 -0500)
committerDan Sandler <dsandler@android.com>
Fri, 15 Jan 2016 15:29:31 +0000 (10:29 -0500)
commit24813b0dd5b6b0d7dead4e748ae9f4bbfa0040e0
tree9f4d6c75acb104e94fa305d8b0e077d55856c7f8
parente41a6c8b19482a05a98e77d13281f7f14056f119
Stop leaking Notifications when they change groupKeys.

If a Notification changes groups (either from one group to
another, or gets a group key for the first time, which takes
it out of its implicit singleton group) it should be removed
from the old group in NotificationGroupManager's mGroupMap
and re-inserted under the new one.

Unfortunately we were passing the *new* notification in the
oldNotification argument, so we would always attempt (and
fail) to remove it from the *new* group, leaving a strong
reference to the Notification inside mGroupMap under an
obsolete group key.

Bug: 26561365
Change-Id: Ie5cdceb4f843dbd363652e00fbc0f3ac6f6ef247
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java