diff options
| author | 2016-06-03 11:46:56 -0700 | |
|---|---|---|
| committer | 2016-06-03 12:12:04 -0700 | |
| commit | 38d429f4395b3bac933ad8a77ab224659f9bb2e5 (patch) | |
| tree | 8e16781e39cf80a665e15740d81c3dd0bdf686d7 | |
| parent | ddf1b399d85ca417301625a55b2a3c7acab2633c (diff) | |
Handled expandability and swiping while guts are exposed
Also fixed a bug where the wrong guts were selected with groups.
Change-Id: I3677ce549b2a90e2dc225470cff4e2548ddca81a
Fixes: 29046865
2 files changed, 9 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 4c242ccf691c..f67e285a1b5b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -868,7 +868,8 @@ public class NotificationStackScrollLayout extends ViewGroup ExpandableNotificationRow row = (ExpandableNotificationRow) child; ExpandableNotificationRow parent = row.getNotificationParent(); if (parent != null && parent.areChildrenExpanded() - && (mGearExposedView == parent + && (parent.areGutsExposed() + || mGearExposedView == parent || (parent.getNotificationChildren().size() == 1 && parent.isClearable()))) { // In this case the group is expanded and showing the gear for the @@ -956,6 +957,7 @@ public class NotificationStackScrollLayout extends ViewGroup public boolean canChildBeExpanded(View v) { return v instanceof ExpandableNotificationRow && ((ExpandableNotificationRow) v).isExpandable() + && !((ExpandableNotificationRow) v).areGutsExposed() && (mIsExpanded || !((ExpandableNotificationRow) v).isPinned()); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java index 5d2698898e30..c8c7d3d4c7cb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java @@ -171,6 +171,12 @@ public class StackScrollAlgorithm { } public static boolean canChildBeDismissed(View v) { + if (v instanceof ExpandableNotificationRow) { + ExpandableNotificationRow row = (ExpandableNotificationRow) v; + if (row.areGutsExposed()) { + return false; + } + } final View veto = v.findViewById(R.id.veto); return (veto != null && veto.getVisibility() != View.GONE); } |