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>
This commit is contained in:
@@ -1341,21 +1341,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
|||||||
return mOnKeyguard;
|
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
|
@Override
|
||||||
public void dismiss(boolean refocusOnDismiss) {
|
public void dismiss(boolean refocusOnDismiss) {
|
||||||
super.dismiss(refocusOnDismiss);
|
super.dismiss(refocusOnDismiss);
|
||||||
|
|||||||
@@ -232,7 +232,6 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
|
|||||||
@Test
|
@Test
|
||||||
public void testUserLockedResetEvenWhenNoChildren() {
|
public void testUserLockedResetEvenWhenNoChildren() {
|
||||||
mGroupRow.setUserLocked(true);
|
mGroupRow.setUserLocked(true);
|
||||||
mGroupRow.removeAllChildren();
|
|
||||||
mGroupRow.setUserLocked(false);
|
mGroupRow.setUserLocked(false);
|
||||||
assertFalse("The childrencontainer should not be userlocked but is, the state "
|
assertFalse("The childrencontainer should not be userlocked but is, the state "
|
||||||
+ "seems out of sync.", mGroupRow.getChildrenContainer().isUserLocked());
|
+ "seems out of sync.", mGroupRow.getChildrenContainer().isUserLocked());
|
||||||
@@ -240,12 +239,11 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReinflatedOnDensityChange() {
|
public void testReinflatedOnDensityChange() {
|
||||||
mGroupRow.setUserLocked(true);
|
|
||||||
mGroupRow.removeAllChildren();
|
|
||||||
mGroupRow.setUserLocked(false);
|
|
||||||
NotificationChildrenContainer mockContainer = mock(NotificationChildrenContainer.class);
|
NotificationChildrenContainer mockContainer = mock(NotificationChildrenContainer.class);
|
||||||
mGroupRow.setChildrenContainer(mockContainer);
|
mNotifRow.setChildrenContainer(mockContainer);
|
||||||
mGroupRow.onDensityOrFontScaleChanged();
|
|
||||||
|
mNotifRow.onDensityOrFontScaleChanged();
|
||||||
|
|
||||||
verify(mockContainer).reInflateViews(any(), any());
|
verify(mockContainer).reInflateViews(any(), any());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user