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

Commit 182e1409 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Set minimum height for NotificationChildrenContainer" into main

parents 06261495 eec182fd
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -76,6 +76,16 @@ flag {
   }
   }
}
}


flag {
   name: "notification_children_container_min_height"
   namespace: "systemui"
   description: "Enforce a minimum height for the NotificationChildrenContainer"
   bug: "429118181"
   metadata {
        purpose: PURPOSE_BUGFIX
   }
}

flag {
flag {
   name: "notification_ambient_suppression_after_inflation"
   name: "notification_ambient_suppression_after_inflation"
   namespace: "systemui"
   namespace: "systemui"
+15 −2
Original line number Original line Diff line number Diff line
@@ -43,6 +43,7 @@ import androidx.compose.ui.platform.ComposeView;


import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.widget.NotificationExpandButton;
import com.android.internal.widget.NotificationExpandButton;
import com.android.systemui.Flags;
import com.android.systemui.res.R;
import com.android.systemui.res.R;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.statusbar.CrossFadeHelper;
import com.android.systemui.statusbar.CrossFadeHelper;
@@ -828,8 +829,14 @@ public class NotificationChildrenContainer extends ViewGroup
        } else if (!childrenExpanded) {
        } else if (!childrenExpanded) {
            intrinsicHeight += mCollapsedBottomPadding;
            intrinsicHeight += mCollapsedBottomPadding;
        }
        }

        if (Flags.notificationChildrenContainerMinHeight()) {
            // The height should at the very minimum be able to accommodate the header.
            return Math.max(mHeaderHeight, intrinsicHeight);
        } else {
            return intrinsicHeight;
            return intrinsicHeight;
        }
        }
    }


    /**
    /**
     * Update the state of all its children based on a linear layout algorithm.
     * Update the state of all its children based on a linear layout algorithm.
@@ -1616,8 +1623,14 @@ public class NotificationChildrenContainer extends ViewGroup
            visibleChildren++;
            visibleChildren++;
        }
        }
        minExpandHeight += mCollapsedBottomPadding;
        minExpandHeight += mCollapsedBottomPadding;

        if (Flags.notificationChildrenContainerMinHeight()) {
            // The height should at the very minimum be able to accommodate the header.
            return Math.max(minExpandHeight, mHeaderHeight);
        } else {
            return minExpandHeight;
            return minExpandHeight;
        }
        }
    }


    public boolean showingAsLowPriority() {
    public boolean showingAsLowPriority() {
        return mIsMinimized && !mContainingNotification.isExpanded();
        return mIsMinimized && !mContainingNotification.isExpanded();