diff options
Diffstat (limited to 'packages/SystemUI/src')
4 files changed, 16 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java index 2d65dd6..ceb8654 100644 --- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java +++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java @@ -322,6 +322,9 @@ public class SwipeHelper implements Gefingerpoken { } if (!mDragging) { + // We are not doing anything, make sure the long press callback + // is not still ticking like a bomb waiting to go off. + removeLongPressCallback(); return false; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 0866d18..ec99513 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -907,8 +907,14 @@ public abstract class BaseStatusBar extends SystemUI implements if (DEBUG) Slog.d(TAG, "contents was " + (contentsUnchanged ? "unchanged" : "changed")); if (DEBUG) Slog.d(TAG, "order was " + (orderUnchanged ? "unchanged" : "changed")); if (DEBUG) Slog.d(TAG, "notification is " + (isTopAnyway ? "top" : "not top")); + final boolean wasExpanded = oldEntry.userExpanded(); removeNotificationViews(key); addNotificationViews(key, notification); + if (wasExpanded) { + final NotificationData.Entry newEntry = mNotificationData.findByKey(key); + expandView(newEntry, true); + newEntry.setUserExpanded(true); + } } // Update the veto button accordingly (and as a result, whether this row is diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java index 1a07ed3..dfd8cf8 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<Entry> mEntries = new ArrayList<Entry>(); private final Comparator<Entry> mEntryCmp = new Comparator<Entry>() { 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 5cab636..f947369 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -1658,6 +1658,7 @@ public class TabletStatusBar extends BaseStatusBar implements @Override protected boolean isTopNotification(ViewGroup parent, NotificationData.Entry entry) { + if (parent == null || entry == null) return false; return parent.indexOfChild(entry.row) == parent.getChildCount()-1; } |