Fixes a usability issue where groups were clearable
If any child is not dismissable the summary now also becomes non-dismissable. Change-Id: I4a7b64dc6cd2151f46b4034195b895bfb868a990 Fixes: 30182606
This commit is contained in:
@@ -1175,7 +1175,20 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
|
||||
* @see #canViewBeDismissed()
|
||||
*/
|
||||
public boolean isClearable() {
|
||||
return mStatusBarNotification != null && mStatusBarNotification.isClearable();
|
||||
if (mStatusBarNotification == null || !mStatusBarNotification.isClearable()) {
|
||||
return false;
|
||||
}
|
||||
if (mIsSummaryWithChildren) {
|
||||
List<ExpandableNotificationRow> notificationChildren =
|
||||
mChildrenContainer.getNotificationChildren();
|
||||
for (int i = 0; i < notificationChildren.size(); i++) {
|
||||
ExpandableNotificationRow child = notificationChildren.get(i);
|
||||
if (!child.isClearable()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user