Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java +17 −1 Original line number Diff line number Diff line Loading @@ -96,6 +96,11 @@ public class NotificationChildrenContainer extends ViewGroup } }.setDuration(200); private static final SourceType FROM_PARENT = SourceType.from("FromParent(NCC)"); /** * Temporary "flag" for a hack that works around an issue where isRemoved is always false for * rows. */ private static final boolean USE_IS_CHANGING_POSITION_TO_RESTORE = true; private final List<View> mDividers = new ArrayList<>(); private final List<ExpandableNotificationRow> mAttachedChildren = new ArrayList<>(); Loading Loading @@ -418,7 +423,7 @@ public class NotificationChildrenContainer extends ViewGroup row.setSystemChildExpanded(false); row.setNotificationFaded(false); row.setUserLocked(false); if (!row.isRemoved()) { if (shouldRestoreChild(row)) { mGroupingUtil.restoreChildNotification(row); } Loading @@ -426,6 +431,17 @@ public class NotificationChildrenContainer extends ViewGroup applyRoundnessAndInvalidate(); } private static boolean shouldRestoreChild(ExpandableNotificationRow row) { // TODO: b/417457086 - We're only checking for isChangingPosition here as a quick-and-dirty // fix for b/415665263, but the real issue is that isRemoved is currently ALWAYS false. // We need to fix that behind a flag, so this hack is temporary. if (USE_IS_CHANGING_POSITION_TO_RESTORE) { return !row.isRemoved() && row.isChangingPosition(); } else { return !row.isRemoved(); } } /** * @return The number of notification children in the container. */ Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java +17 −1 Original line number Diff line number Diff line Loading @@ -96,6 +96,11 @@ public class NotificationChildrenContainer extends ViewGroup } }.setDuration(200); private static final SourceType FROM_PARENT = SourceType.from("FromParent(NCC)"); /** * Temporary "flag" for a hack that works around an issue where isRemoved is always false for * rows. */ private static final boolean USE_IS_CHANGING_POSITION_TO_RESTORE = true; private final List<View> mDividers = new ArrayList<>(); private final List<ExpandableNotificationRow> mAttachedChildren = new ArrayList<>(); Loading Loading @@ -418,7 +423,7 @@ public class NotificationChildrenContainer extends ViewGroup row.setSystemChildExpanded(false); row.setNotificationFaded(false); row.setUserLocked(false); if (!row.isRemoved()) { if (shouldRestoreChild(row)) { mGroupingUtil.restoreChildNotification(row); } Loading @@ -426,6 +431,17 @@ public class NotificationChildrenContainer extends ViewGroup applyRoundnessAndInvalidate(); } private static boolean shouldRestoreChild(ExpandableNotificationRow row) { // TODO: b/417457086 - We're only checking for isChangingPosition here as a quick-and-dirty // fix for b/415665263, but the real issue is that isRemoved is currently ALWAYS false. // We need to fix that behind a flag, so this hack is temporary. if (USE_IS_CHANGING_POSITION_TO_RESTORE) { return !row.isRemoved() && row.isChangingPosition(); } else { return !row.isRemoved(); } } /** * @return The number of notification children in the container. */ Loading