Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed8e38eb authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

Remove drop_non_existing_messages flag

Fixes: 410615439
Flag: EXEMPT Flag removal
Old Flag: android.widget.flags.drop_non_existing_messages
Test: Presubmit

Change-Id: I95e022e20ae2dd2a7af73f5c0e951df5a5083b87
parent e8685112
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
package: "android.widget.flags"
container: "system"

flag {
  name: "drop_non_existing_messages"
  namespace: "systemui"
  description: "Drops all group and message entries that no longer exist."
  bug: "378101061"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
 No newline at end of file
+2 −5
Original line number Diff line number Diff line
@@ -1214,11 +1214,8 @@ public class ConversationLayout extends FrameLayout
            newGroup.setMessages(group, isShowingSummarization());
        }

        if (Flags.dropNonExistingMessages()) {
        // remove groups from mAddedGroups when they are no longer in mGroups.
            mAddedGroups.removeIf(
                    messagingGroup -> !mGroups.contains(messagingGroup));
        }
        mAddedGroups.removeIf(messagingGroup -> !mGroups.contains(messagingGroup));
    }

    /**
+2 −4
Original line number Diff line number Diff line
@@ -578,10 +578,8 @@ public class MessagingGroup extends NotificationOptimizedLinearLayout implements
        mIsolatedMessage = isolatedMessage;
        updateImageContainerVisibility();
        mMessages = group;
        if (android.widget.flags.Flags.dropNonExistingMessages()) {
        // remove messages from mAddedMessages when they are no longer in mMessages.
        mAddedMessages.removeIf(message -> !mMessages.contains(message));
        }
        updateMessageColor();
    }

+2 −5
Original line number Diff line number Diff line
@@ -685,11 +685,8 @@ public class MessagingLayout extends FrameLayout
            newGroup.setMessages(group, isShowingSummarization());
        }

        if (Flags.dropNonExistingMessages()) {
        // remove groups from mAddedGroups when they are no longer in mGroups.
            mAddedGroups.removeIf(
                    messagingGroup -> !mGroups.contains(messagingGroup));
        }
        mAddedGroups.removeIf(messagingGroup -> !mGroups.contains(messagingGroup));
    }

    private void findGroups(List<MessagingMessage> historicMessages,