summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-04-09 13:15:42 -0400
committerDaniel Sandler <dsandler@android.com>2012-04-09 14:17:57 -0400
commit84920cc56e4cd4e843845d8d542ba47f3ffb4f36 (patch)
treebe1c97c98cd84e3f9d23796d48afbea4d3406e58
parent079f09c6ca4148d8e640e34ec03a3eb4fb3507cc (diff)
downloadframeworks_base-84920cc56e4cd4e843845d8d542ba47f3ffb4f36.zip
frameworks_base-84920cc56e4cd4e843845d8d542ba47f3ffb4f36.tar.gz
frameworks_base-84920cc56e4cd4e843845d8d542ba47f3ffb4f36.tar.bz2
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java9
2 files changed, 14 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 5ba72c7..804ae06 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -591,10 +591,14 @@ public class PhoneStatusBar extends BaseStatusBar {
}
final StatusBarNotification oldNotification = oldEntry.notification;
- final RemoteViews oldContentView = oldNotification.notification.contentView;
-
- final RemoteViews contentView = notification.notification.contentView;
+ // XXX: modify when we do something more intelligent with the two content views
+ final RemoteViews oldContentView = (oldNotification.notification.bigContentView != null)
+ ? oldNotification.notification.bigContentView
+ : oldNotification.notification.contentView;
+ final RemoteViews contentView = (notification.notification.bigContentView != null)
+ ? notification.notification.bigContentView
+ : notification.notification.contentView;
if (DEBUG) {
Slog.d(TAG, "old notification: when=" + oldNotification.notification.when
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 09283f4..ba51108 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -867,9 +867,14 @@ public class TabletStatusBar extends BaseStatusBar implements
}
final StatusBarNotification oldNotification = oldEntry.notification;
- final RemoteViews oldContentView = oldNotification.notification.contentView;
- final RemoteViews contentView = notification.notification.contentView;
+ // XXX: modify when we do something more intelligent with the two content views
+ final RemoteViews oldContentView = (oldNotification.notification.bigContentView != null)
+ ? oldNotification.notification.bigContentView
+ : oldNotification.notification.contentView;
+ final RemoteViews contentView = (notification.notification.bigContentView != null)
+ ? notification.notification.bigContentView
+ : notification.notification.contentView;
if (DEBUG) {
Slog.d(TAG, "old notification: when=" + oldNotification.notification.when