diff options
| author | 2022-11-04 10:19:28 +0000 | |
|---|---|---|
| committer | 2022-11-04 10:19:28 +0000 | |
| commit | 314f5b050827c20f3c8e3ec187fee1eb09ac48d2 (patch) | |
| tree | 0ad31c3835657c4834d32f0773961e32ce54f059 | |
| parent | 53c4b18732f43601a75942b3091513822540ac65 (diff) | |
| parent | 9ac39f2d1e78087b002aa0c703e5d24daed9ab4d (diff) | |
Merge "Remove unused removeAllChildren() from ExpandableNotificationRow" into tm-qpr-dev am: 9ac39f2d1e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20345975
Change-Id: I8bf3deae65acd076a92879a6d9e8d9469d34a6f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 files changed, 4 insertions, 21 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index 9e7717caf69c..de158c4d017e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -1341,21 +1341,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView return mOnKeyguard; } - public void removeAllChildren() { - List<ExpandableNotificationRow> notificationChildren = - mChildrenContainer.getAttachedChildren(); - ArrayList<ExpandableNotificationRow> clonedList = new ArrayList<>(notificationChildren); - for (int i = 0; i < clonedList.size(); i++) { - ExpandableNotificationRow row = clonedList.get(i); - if (row.keepInParent()) { - continue; - } - mChildrenContainer.removeNotification(row); - row.setIsChildInGroup(false, null); - } - onAttachedChildrenCountChanged(); - } - @Override public void dismiss(boolean refocusOnDismiss) { super.dismiss(refocusOnDismiss); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java index 137842ef314f..12cc11450ede 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java @@ -232,7 +232,6 @@ public class ExpandableNotificationRowTest extends SysuiTestCase { @Test public void testUserLockedResetEvenWhenNoChildren() { mGroupRow.setUserLocked(true); - mGroupRow.removeAllChildren(); mGroupRow.setUserLocked(false); assertFalse("The childrencontainer should not be userlocked but is, the state " + "seems out of sync.", mGroupRow.getChildrenContainer().isUserLocked()); @@ -240,12 +239,11 @@ public class ExpandableNotificationRowTest extends SysuiTestCase { @Test public void testReinflatedOnDensityChange() { - mGroupRow.setUserLocked(true); - mGroupRow.removeAllChildren(); - mGroupRow.setUserLocked(false); NotificationChildrenContainer mockContainer = mock(NotificationChildrenContainer.class); - mGroupRow.setChildrenContainer(mockContainer); - mGroupRow.onDensityOrFontScaleChanged(); + mNotifRow.setChildrenContainer(mockContainer); + + mNotifRow.onDensityOrFontScaleChanged(); + verify(mockContainer).reInflateViews(any(), any()); } |