Skip to content

Commit 84920cc

Browse files
committed
Fix notifications transitioning from small->big.
We'll have to go back and tweak this when we add a more sophisticated switch from contentView to bigContentView, but for now, this ought to detect that the notification has gotten bigger (or smaller). Change-Id: I3816fe8ed321569d1ce07d8a62cb08a434e55c2d
1 parent 079f09c commit 84920cc

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,14 @@ public void updateNotification(IBinder key, StatusBarNotification notification)
591591
}
592592

593593
final StatusBarNotification oldNotification = oldEntry.notification;
594-
final RemoteViews oldContentView = oldNotification.notification.contentView;
595-
596-
final RemoteViews contentView = notification.notification.contentView;
597594

595+
// XXX: modify when we do something more intelligent with the two content views
596+
final RemoteViews oldContentView = (oldNotification.notification.bigContentView != null)
597+
? oldNotification.notification.bigContentView
598+
: oldNotification.notification.contentView;
599+
final RemoteViews contentView = (notification.notification.bigContentView != null)
600+
? notification.notification.bigContentView
601+
: notification.notification.contentView;
598602

599603
if (DEBUG) {
600604
Slog.d(TAG, "old notification: when=" + oldNotification.notification.when

packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,9 +867,14 @@ public void updateNotification(IBinder key, StatusBarNotification notification)
867867
}
868868

869869
final StatusBarNotification oldNotification = oldEntry.notification;
870-
final RemoteViews oldContentView = oldNotification.notification.contentView;
871870

872-
final RemoteViews contentView = notification.notification.contentView;
871+
// XXX: modify when we do something more intelligent with the two content views
872+
final RemoteViews oldContentView = (oldNotification.notification.bigContentView != null)
873+
? oldNotification.notification.bigContentView
874+
: oldNotification.notification.contentView;
875+
final RemoteViews contentView = (notification.notification.bigContentView != null)
876+
? notification.notification.bigContentView
877+
: notification.notification.contentView;
873878

874879
if (DEBUG) {
875880
Slog.d(TAG, "old notification: when=" + oldNotification.notification.when

0 commit comments

Comments
 (0)