Loading core/java/android/app/notification.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,16 @@ flag { is_fixed_read_only: true } flag { name: "notification_top_line_margin_fix" namespace: "systemui" description: "Fixes a small bug where the timestamp had an unnecessary margin in grouped notifications." bug: "417196998" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "api_metric_style" is_exported: true Loading core/java/android/view/NotificationTopLineView.java +9 −1 Original line number Diff line number Diff line Loading @@ -183,11 +183,13 @@ public class NotificationTopLineView extends ViewGroup { // Only used when mGravityY is CENTER_VERTICAL int baselineY = mPaddingTop + ((childSpace - (mMaxAscent + mMaxDescent)) / 2) + mMaxAscent; boolean isFirstVisibleChild = true; for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if (child.getVisibility() == GONE) { continue; } int childHeight = child.getMeasuredHeight(); MarginLayoutParams params = (MarginLayoutParams) child.getLayoutParams(); Loading Loading @@ -228,13 +230,19 @@ public class NotificationTopLineView extends ViewGroup { if (mViewsToDisappear.contains(child)) { child.layout(start, childTop, start, childTop + childHeight); } else { // If this is the first child, don't include the start margin. The children will // generally have a 2dp start margin by default to space them out, but if the child // is first we don't need that. if (!android.app.Flags.notificationTopLineMarginFix() || !isFirstVisibleChild) { start += params.getMarginStart(); } int end = start + child.getMeasuredWidth(); int layoutLeft = isRtl ? width - end : start; int layoutRight = isRtl ? width - start : end; start = end + params.getMarginEnd(); child.layout(layoutLeft, childTop, layoutRight, childTop + childHeight); } isFirstVisibleChild = false; } updateTouchListener(); } Loading Loading
core/java/android/app/notification.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,16 @@ flag { is_fixed_read_only: true } flag { name: "notification_top_line_margin_fix" namespace: "systemui" description: "Fixes a small bug where the timestamp had an unnecessary margin in grouped notifications." bug: "417196998" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "api_metric_style" is_exported: true Loading
core/java/android/view/NotificationTopLineView.java +9 −1 Original line number Diff line number Diff line Loading @@ -183,11 +183,13 @@ public class NotificationTopLineView extends ViewGroup { // Only used when mGravityY is CENTER_VERTICAL int baselineY = mPaddingTop + ((childSpace - (mMaxAscent + mMaxDescent)) / 2) + mMaxAscent; boolean isFirstVisibleChild = true; for (int i = 0; i < childCount; i++) { View child = getChildAt(i); if (child.getVisibility() == GONE) { continue; } int childHeight = child.getMeasuredHeight(); MarginLayoutParams params = (MarginLayoutParams) child.getLayoutParams(); Loading Loading @@ -228,13 +230,19 @@ public class NotificationTopLineView extends ViewGroup { if (mViewsToDisappear.contains(child)) { child.layout(start, childTop, start, childTop + childHeight); } else { // If this is the first child, don't include the start margin. The children will // generally have a 2dp start margin by default to space them out, but if the child // is first we don't need that. if (!android.app.Flags.notificationTopLineMarginFix() || !isFirstVisibleChild) { start += params.getMarginStart(); } int end = start + child.getMeasuredWidth(); int layoutLeft = isRtl ? width - end : start; int layoutRight = isRtl ? width - start : end; start = end + params.getMarginEnd(); child.layout(layoutLeft, childTop, layoutRight, childTop + childHeight); } isFirstVisibleChild = false; } updateTouchListener(); } Loading