OSDN Git Service

Merge "Stop leaking Notifications when they change groupKeys." into mnc-dr1.5-dev...
authorDaniel Sandler <dsandler@android.com>
Sat, 16 Jan 2016 02:26:53 +0000 (02:26 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Sat, 16 Jan 2016 02:26:53 +0000 (02:26 +0000)
am: 8afab95aa9

* commit '8afab95aa976cc1d07ee307df9fa85f505ba800c':
  Stop leaking Notifications when they change groupKeys.

1  2 
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

@@@ -1943,19 -1907,16 +1943,20 @@@ public abstract class BaseStatusBar ext
          }
  
          Notification n = notification.getNotification();
 +        mNotificationData.updateRanking(ranking);
 +
 +        boolean applyInPlace = entry.cacheContentViews(mContext, notification.getNotification());
 +        boolean shouldPeek = shouldPeek(entry, notification);
 +        boolean alertAgain = alertAgain(entry, n);
          if (DEBUG) {
 -            logUpdate(entry, n);
 +            Log.d(TAG, "applyInPlace=" + applyInPlace
 +                    + " shouldPeek=" + shouldPeek
 +                    + " alertAgain=" + alertAgain);
          }
 -        boolean applyInPlace = shouldApplyInPlace(entry, n);
 -        boolean shouldInterrupt = shouldInterrupt(entry, notification);
 -        boolean alertAgain = alertAgain(entry, n);
  
+         final StatusBarNotification oldNotification = entry.notification;
          entry.notification = notification;
-         mGroupManager.onEntryUpdated(entry, entry.notification);
+         mGroupManager.onEntryUpdated(entry, oldNotification);
  
          boolean updateSuccessful = false;
          if (applyInPlace) {