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

Commit c6c026a7 authored by Sherry Zhou's avatar Sherry Zhou Committed by Android (Google) Code Review
Browse files

Merge "Fix shape effects move with notifications in shade on lockscreen" into main

parents 3c751e94 1cf475b5
Loading
Loading
Loading
Loading
+19 −11
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ import kotlinx.coroutines.flow.combineTransform
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.emptyFlow
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flow
@@ -796,7 +797,8 @@ constructor(
    }

    /**
     * Wallpaper needs the absolute bottom of notification stack to avoid occlusion
     * Wallpaper focal area needs the absolute bottom of notification stack to avoid occlusion. It
     * should not change with notifications in shade.
     *
     * @param calculateMaxNotifications is required by getMaxNotifications as calculateSpace by
     *   calling computeMaxKeyguardNotifications in NotificationStackSizeCalculator
@@ -820,9 +822,15 @@ constructor(
                    }
                },
                bounds.map { it.top },
        ) { height, top ->
                isOnLockscreenWithoutShade,
            ) { height, top, isOnLockscreenWithoutShade ->
                if (isOnLockscreenWithoutShade) {
                    top + height
                } else {
                    null
                }
            }
            .filterNotNull()
    }

    fun notificationStackChanged() {