Loading packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt +11 −8 Original line number Diff line number Diff line Loading @@ -152,15 +152,18 @@ private fun Modifier.panelPadding(): Modifier { /** Creates a union of [paddingValues] by using the max padding of each edge. */ @Composable private fun combinePaddings(vararg paddingValues: PaddingValues): PaddingValues { return if (paddingValues.isEmpty()) { PaddingValues(0.dp) } else { val layoutDirection = LocalLayoutDirection.current return PaddingValues( start = paddingValues.maxOfOrNull { it.calculateStartPadding(layoutDirection) } ?: 0.dp, top = paddingValues.maxOfOrNull { it.calculateTopPadding() } ?: 0.dp, end = paddingValues.maxOfOrNull { it.calculateEndPadding(layoutDirection) } ?: 0.dp, bottom = paddingValues.maxOfOrNull { it.calculateBottomPadding() } ?: 0.dp, PaddingValues( start = paddingValues.maxOf { it.calculateStartPadding(layoutDirection) }, top = paddingValues.maxOf { it.calculateTopPadding() }, end = paddingValues.maxOf { it.calculateEndPadding(layoutDirection) }, bottom = paddingValues.maxOf { it.calculateBottomPadding() }, ) } } object OverlayShade { object Elements { Loading packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt +6 −12 Original line number Diff line number Diff line Loading @@ -193,22 +193,16 @@ constructor( // We are in a session if either Shade or QuickSettings is on the back stack .map { backStack -> backStack.asIterable().any { // TODO(b/356596436): Include overlays in the back stack as well. it == Scenes.Shade || it == Scenes.QuickSettings } } .distinctUntilChanged(), sceneInteractor.transitionState .mapNotNull { state -> // We are also in a session if either Shade or QuickSettings is the // current scene when (state) { is ObservableTransitionState.Idle -> state.currentScene is ObservableTransitionState.Transition -> state.fromContent }.let { it == Scenes.Shade || it == Scenes.QuickSettings } } .distinctUntilChanged(), ) { inBackStack, isCurrentScene -> inBackStack || isCurrentScene // We are also in a session if either Notifications Shade or QuickSettings Shade // is currently shown (whether idle or animating). shadeInteractor.isAnyExpanded, ) { inBackStack, isShadeShown -> inBackStack || isShadeShown } // Once a session has ended, clear the session storage. .filter { inSession -> !inSession } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/OverlayShade.kt +11 −8 Original line number Diff line number Diff line Loading @@ -152,15 +152,18 @@ private fun Modifier.panelPadding(): Modifier { /** Creates a union of [paddingValues] by using the max padding of each edge. */ @Composable private fun combinePaddings(vararg paddingValues: PaddingValues): PaddingValues { return if (paddingValues.isEmpty()) { PaddingValues(0.dp) } else { val layoutDirection = LocalLayoutDirection.current return PaddingValues( start = paddingValues.maxOfOrNull { it.calculateStartPadding(layoutDirection) } ?: 0.dp, top = paddingValues.maxOfOrNull { it.calculateTopPadding() } ?: 0.dp, end = paddingValues.maxOfOrNull { it.calculateEndPadding(layoutDirection) } ?: 0.dp, bottom = paddingValues.maxOfOrNull { it.calculateBottomPadding() } ?: 0.dp, PaddingValues( start = paddingValues.maxOf { it.calculateStartPadding(layoutDirection) }, top = paddingValues.maxOf { it.calculateTopPadding() }, end = paddingValues.maxOf { it.calculateEndPadding(layoutDirection) }, bottom = paddingValues.maxOf { it.calculateBottomPadding() }, ) } } object OverlayShade { object Elements { Loading
packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt +6 −12 Original line number Diff line number Diff line Loading @@ -193,22 +193,16 @@ constructor( // We are in a session if either Shade or QuickSettings is on the back stack .map { backStack -> backStack.asIterable().any { // TODO(b/356596436): Include overlays in the back stack as well. it == Scenes.Shade || it == Scenes.QuickSettings } } .distinctUntilChanged(), sceneInteractor.transitionState .mapNotNull { state -> // We are also in a session if either Shade or QuickSettings is the // current scene when (state) { is ObservableTransitionState.Idle -> state.currentScene is ObservableTransitionState.Transition -> state.fromContent }.let { it == Scenes.Shade || it == Scenes.QuickSettings } } .distinctUntilChanged(), ) { inBackStack, isCurrentScene -> inBackStack || isCurrentScene // We are also in a session if either Notifications Shade or QuickSettings Shade // is currently shown (whether idle or animating). shadeInteractor.isAnyExpanded, ) { inBackStack, isShadeShown -> inBackStack || isShadeShown } // Once a session has ended, clear the session storage. .filter { inSession -> !inSession } Loading