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

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

Merge "[flexiglass] Show notification icons on AOD" into main

parents db0a1f00 2df331c0
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.ui.composable.blueprint

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
@@ -26,6 +27,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.animation.scene.ContentScope
import com.android.systemui.keyguard.ui.composable.LockscreenTouchHandling
import com.android.systemui.keyguard.ui.composable.element.AmbientIndicationElement
import com.android.systemui.keyguard.ui.composable.element.AodNotificationIconsElement
import com.android.systemui.keyguard.ui.composable.element.AodPromotedNotificationAreaElement
import com.android.systemui.keyguard.ui.composable.element.ClockRegionElementProvider
import com.android.systemui.keyguard.ui.composable.element.IndicationAreaElement
@@ -67,6 +69,7 @@ constructor(
    private val settingsMenuElement: SettingsMenuElement,
    private val notificationsElement: NotificationElement,
    private val aodPromotedNotificationAreaElement: AodPromotedNotificationAreaElement,
    private val aodNotificationIconsElement: AodNotificationIconsElement,
    private val smartspaceElementProvider: SmartspaceElementProvider,
    private val clockRegionElementProvider: ClockRegionElementProvider,
    private val mediaCarouselElement: MediaCarouselElement,
@@ -138,7 +141,12 @@ constructor(
                },
                notifications = {
                    Box(modifier = Modifier.fillMaxHeight()) {
                        with(aodPromotedNotificationAreaElement) { AodPromotedNotificationArea() }
                        Column {
                            with(aodPromotedNotificationAreaElement) {
                                AodPromotedNotificationArea()
                            }
                            with(aodNotificationIconsElement) { AodNotificationIcons() }
                        }
                        with(notificationsElement) {
                            Notifications(areNotificationsVisible = true, burnInParams = null)
                        }
+5 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
@@ -84,6 +85,10 @@ constructor(
            modifier =
                modifier
                    .height(dimensionResource(R.dimen.notification_shelf_height))
                    .padding(
                        start = dimensionResource(R.dimen.below_clock_padding_start_icons),
                        end = dimensionResource(R.dimen.shelf_icon_container_padding),
                    )
                    .burnInAware(aodBurnInViewModel, burnIn.parameters),
        ) {
            val scope = rememberCoroutineScope()
+4 −11
Original line number Diff line number Diff line
@@ -419,26 +419,19 @@ constructor(
    val isNotifIconContainerVisible: StateFlow<AnimatedValue<Boolean>> =
        combine(
                goneToAodTransitionRunning,
                keyguardTransitionInteractor
                    .transitionValue(LOCKSCREEN)
                    .map { it > 0f }
                    .onStart { emit(false) },
                keyguardTransitionInteractor.isFinishedIn(
                    content = Scenes.Gone,
                    stateWithoutSceneContainer = GONE,
                ),
                deviceEntryBypassInteractor.isBypassEnabled,
                areNotifsFullyHiddenAnimated(),
                isPulseExpandingAnimated(),
                aodNotificationIconViewModel.icons.map { it.visibleIcons.isNotEmpty() },
            ) { flows ->
                val goneToAodTransitionRunning = flows[0] as Boolean
                val isOnLockscreen = flows[1] as Boolean
                val isOnGone = flows[2] as Boolean
                val isBypassEnabled = flows[3] as Boolean
                val notifsFullyHidden = flows[4] as AnimatedValue<Boolean>
                val pulseExpanding = flows[5] as AnimatedValue<Boolean>
                val hasAodIcons = flows[6] as Boolean
                val isOnGone = flows[1] as Boolean
                val notifsFullyHidden = flows[2] as AnimatedValue<Boolean>
                val pulseExpanding = flows[3] as AnimatedValue<Boolean>
                val hasAodIcons = flows[4] as Boolean

                when {
                    // Hide the AOD icons if we're not in the KEYGUARD state unless the screen off