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

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

Merge "[Notification Content Cut Off] Messaging child requestLayout" into main

parents af9c0cfd fc64eee9
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -47,3 +47,13 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
  name: "messaging_child_request_layout"
  namespace: "systemui"
  description: "MessagingChild always needs to be measured during MessagingLinearLayout onMeasure."
  bug: "324537506"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+6 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.internal.widget;

import static android.widget.flags.Flags.messagingChildRequestLayout;

import android.annotation.Nullable;
import android.annotation.Px;
import android.content.Context;
@@ -92,6 +94,10 @@ public class MessagingLinearLayout extends ViewGroup {
            final View child = getChildAt(i);
            final LayoutParams lp = (LayoutParams) child.getLayoutParams();
            lp.hide = true;
            // Child always needs to be measured to calculate hide property correctly in onMeasure.
            if (messagingChildRequestLayout()) {
                child.requestLayout();
            }
            if (child instanceof MessagingChild) {
                MessagingChild messagingChild = (MessagingChild) child;
                // Whenever we encounter the message first, it's always first in the layout