Loading packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt +4 −5 Original line number Diff line number Diff line Loading @@ -479,9 +479,8 @@ private fun CutoutAwareShadeHeader( check(measurables[1].size == 1) val screenWidth = constraints.maxWidth val cutoutWidthPx = cutoutWidth val height = max(cutoutHeight + (cutoutTop * 2), statusBarHeight.roundToPx()) val childConstraints = Constraints.fixed((screenWidth - cutoutWidthPx) / 2, height) val childConstraints = Constraints.fixed((screenWidth - cutoutWidth) / 2, height) val startMeasurable = measurables[0][0] val endMeasurable = measurables[1][0] Loading @@ -498,11 +497,11 @@ private fun CutoutAwareShadeHeader( } CutoutLocation.CENTER -> { startPlaceable.placeRelative(x = 0, y = 0) endPlaceable.placeRelative(x = startPlaceable.width + cutoutWidthPx, y = 0) endPlaceable.placeRelative(x = startPlaceable.width + cutoutWidth, y = 0) } CutoutLocation.LEFT -> { startPlaceable.placeRelative(x = cutoutWidthPx, y = 0) endPlaceable.placeRelative(x = startPlaceable.width + cutoutWidthPx, y = 0) startPlaceable.placeRelative(x = cutoutWidth, y = 0) endPlaceable.placeRelative(x = startPlaceable.width + cutoutWidth, y = 0) } } } Loading packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt +2 −3 Original line number Diff line number Diff line Loading @@ -233,7 +233,7 @@ private fun ContentScope.SingleShade( modifier: Modifier = Modifier, shadeSession: SaveableSession, ) { val cutout = LocalDisplayCutout.current val cutoutLocation = LocalDisplayCutout.current().location val cutoutInsets = WindowInsets.Companion.displayCutout var maxNotifScrimTop by remember { mutableIntStateOf(0) } Loading @@ -258,8 +258,7 @@ private fun ContentScope.SingleShade( val shadeHorizontalPadding = dimensionResource(id = R.dimen.notification_panel_margin_horizontal) val shadeMeasurePolicy = remember(cutout, cutoutInsets) { val cutoutLocation = cutout().location remember(cutoutLocation, cutoutInsets) { SingleShadeMeasurePolicy( onNotificationsTopChanged = { maxNotifScrimTop = it }, cutoutInsetsProvider = { Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt +4 −5 Original line number Diff line number Diff line Loading @@ -479,9 +479,8 @@ private fun CutoutAwareShadeHeader( check(measurables[1].size == 1) val screenWidth = constraints.maxWidth val cutoutWidthPx = cutoutWidth val height = max(cutoutHeight + (cutoutTop * 2), statusBarHeight.roundToPx()) val childConstraints = Constraints.fixed((screenWidth - cutoutWidthPx) / 2, height) val childConstraints = Constraints.fixed((screenWidth - cutoutWidth) / 2, height) val startMeasurable = measurables[0][0] val endMeasurable = measurables[1][0] Loading @@ -498,11 +497,11 @@ private fun CutoutAwareShadeHeader( } CutoutLocation.CENTER -> { startPlaceable.placeRelative(x = 0, y = 0) endPlaceable.placeRelative(x = startPlaceable.width + cutoutWidthPx, y = 0) endPlaceable.placeRelative(x = startPlaceable.width + cutoutWidth, y = 0) } CutoutLocation.LEFT -> { startPlaceable.placeRelative(x = cutoutWidthPx, y = 0) endPlaceable.placeRelative(x = startPlaceable.width + cutoutWidthPx, y = 0) startPlaceable.placeRelative(x = cutoutWidth, y = 0) endPlaceable.placeRelative(x = startPlaceable.width + cutoutWidth, y = 0) } } } Loading
packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt +2 −3 Original line number Diff line number Diff line Loading @@ -233,7 +233,7 @@ private fun ContentScope.SingleShade( modifier: Modifier = Modifier, shadeSession: SaveableSession, ) { val cutout = LocalDisplayCutout.current val cutoutLocation = LocalDisplayCutout.current().location val cutoutInsets = WindowInsets.Companion.displayCutout var maxNotifScrimTop by remember { mutableIntStateOf(0) } Loading @@ -258,8 +258,7 @@ private fun ContentScope.SingleShade( val shadeHorizontalPadding = dimensionResource(id = R.dimen.notification_panel_margin_horizontal) val shadeMeasurePolicy = remember(cutout, cutoutInsets) { val cutoutLocation = cutout().location remember(cutoutLocation, cutoutInsets) { SingleShadeMeasurePolicy( onNotificationsTopChanged = { maxNotifScrimTop = it }, cutoutInsetsProvider = { Loading