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

Commit 9ecb8db6 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge changes from topic "notification_widget_flag_removal" into main

* changes:
  Remove drop_non_existing_messages flag
  Remove call_style_set_data_async
parents f51ffa27 ed8e38eb
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
package: "android.widget.flags"
container: "system"
flag {
  name: "call_style_set_data_async"
  namespace: "systemui"
  description: "Offloads caller icon drawable loading to the background thread"
  bug: "293961072"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

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
+0 −13
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import android.util.AttributeSet;
import android.view.RemotableViewMethod;
import android.widget.FrameLayout;
import android.widget.RemoteViews;
import android.widget.flags.Flags;

import com.android.internal.R;

@@ -114,10 +113,6 @@ public class CallLayout extends FrameLayout {
     * async version of {@link CallLayout#setLayoutColor}
     */
    public Runnable setLayoutColorAsync(int color) {
        if (!Flags.callStyleSetDataAsync()) {
            return () -> setLayoutColor(color);
        }

        mLayoutColor = color;
        return () -> {};
    }
@@ -139,10 +134,6 @@ public class CallLayout extends FrameLayout {
     * async version of {@link CallLayout#setLargeIcon}
     */
    public Runnable setLargeIconAsync(Icon largeIcon) {
        if (!Flags.callStyleSetDataAsync()) {
            return () -> setLargeIcon(largeIcon);
        }

        mLargeIcon = largeIcon;
        return () -> {};
    }
@@ -168,10 +159,6 @@ public class CallLayout extends FrameLayout {
     * Async implementation for setData
     */
    public Runnable setDataAsync(Bundle extras) {
        if (!Flags.callStyleSetDataAsync()) {
            return () -> setData(extras);
        }

        final Person person = getPerson(extras);
        setUser(person);

+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,