From 5ae1ea8400d576b90f0ef02b2f10201d74729be6 Mon Sep 17 00:00:00 2001 From: Chris Wren Date: Thu, 28 Jun 2012 14:35:43 -0400 Subject: [PATCH] Retain expanded state across more than one violent update. Bug: 6680363 Change-Id: Iebf2387fc5c8774c1c001dde5a4608d4e60720aa --- .../src/com/android/systemui/statusbar/BaseStatusBar.java | 1 + .../com/android/systemui/statusbar/NotificationData.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 0cce1aed8426b..8a36d59973ea1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -913,6 +913,7 @@ public abstract class BaseStatusBar extends SystemUI implements if (wasExpanded) { final NotificationData.Entry newEntry = mNotificationData.findByKey(key); expandView(newEntry, true); + newEntry.setUserExpanded(true); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java index 1a07ed3775727..dfd8cf8a46890 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java @@ -65,6 +65,12 @@ public class NotificationData { public boolean userExpanded() { return NotificationData.getUserExpanded(row); } + /** + * Set the flag indicating that this was manually expanded by the user. + */ + public boolean setUserExpanded(boolean userExpanded) { + return NotificationData.setUserExpanded(row, userExpanded); + } } private final ArrayList mEntries = new ArrayList(); private final Comparator mEntryCmp = new Comparator() {