Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt +44 −35 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.viewinterop.AndroidView import androidx.core.view.isVisible import androidx.tracing.trace import com.android.app.tracing.traceSection import com.android.internal.R import com.android.internal.widget.BigPictureNotificationImageView Loading Loading @@ -171,6 +172,7 @@ private class FrameLayoutWithMaxHeight(maxHeight: Int, context: Context) : Frame // This mirrors the logic in NotificationContentView.onMeasure. override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { trace("AODPromotedNotif#onMeasure") { if (childCount != 1) { Log.wtf(TAG, "Should contain exactly one child.") return super.onMeasure(widthMeasureSpec, heightMeasureSpec) Loading @@ -197,7 +199,13 @@ private class FrameLayoutWithMaxHeight(maxHeight: Int, context: Context) : Frame .takeIf { it >= 0 } ?.let { makeMeasureSpec(availableHeight.coerceAtMost(it), EXACTLY) } ?: run { makeMeasureSpec(availableHeight, AT_MOST) } measureChildWithMargins(child, childWidthSpec, horizPadding, childHeightSpec, vertPadding) measureChildWithMargins( child, childWidthSpec, horizPadding, childHeightSpec, vertPadding, ) val childMeasuredHeight = child.measuredHeight val ownMeasuredWidth = MeasureSpec.getSize(widthMeasureSpec) Loading @@ -210,6 +218,7 @@ private class FrameLayoutWithMaxHeight(maxHeight: Int, context: Context) : Frame setMeasuredDimension(ownMeasuredWidth, ownMeasuredHeight) } } } private val PromotedNotificationContentModel.layoutResource: Int? get() { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt +44 −35 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.viewinterop.AndroidView import androidx.core.view.isVisible import androidx.tracing.trace import com.android.app.tracing.traceSection import com.android.internal.R import com.android.internal.widget.BigPictureNotificationImageView Loading Loading @@ -171,6 +172,7 @@ private class FrameLayoutWithMaxHeight(maxHeight: Int, context: Context) : Frame // This mirrors the logic in NotificationContentView.onMeasure. override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { trace("AODPromotedNotif#onMeasure") { if (childCount != 1) { Log.wtf(TAG, "Should contain exactly one child.") return super.onMeasure(widthMeasureSpec, heightMeasureSpec) Loading @@ -197,7 +199,13 @@ private class FrameLayoutWithMaxHeight(maxHeight: Int, context: Context) : Frame .takeIf { it >= 0 } ?.let { makeMeasureSpec(availableHeight.coerceAtMost(it), EXACTLY) } ?: run { makeMeasureSpec(availableHeight, AT_MOST) } measureChildWithMargins(child, childWidthSpec, horizPadding, childHeightSpec, vertPadding) measureChildWithMargins( child, childWidthSpec, horizPadding, childHeightSpec, vertPadding, ) val childMeasuredHeight = child.measuredHeight val ownMeasuredWidth = MeasureSpec.getSize(widthMeasureSpec) Loading @@ -210,6 +218,7 @@ private class FrameLayoutWithMaxHeight(maxHeight: Int, context: Context) : Frame setMeasuredDimension(ownMeasuredWidth, ownMeasuredHeight) } } } private val PromotedNotificationContentModel.layoutResource: Int? get() { Loading