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

Commit 1cf475b5 authored by Sherry Zhou's avatar Sherry Zhou
Browse files

Fix shape effects move with notifications in shade on lockscreen

Bug: 394529738
Test: manual test pulling down shade in lockscreen with shape effects,
observe that shape effects remain in the correct position
Flag: com.android.systemui.shared.extended_wallpaper_effects

Change-Id: I8c2b2b2e7340790e3f9101369769f8cc277a992f
parent 45d73de7
Loading
Loading
Loading
Loading
+19 −11
Original line number Diff line number Diff line
@@ -102,6 +102,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() {