Fix modeOnCanceled for LOCKSCREEN <=> AOD transitions

The condition was recently refactored in ag/26333297 and can't become
true as it is.

Test: atest SystemUITests
Bug: 307976454
Flag: ACONFIG com.android.systemui.keyguard_wm_state_refactor DEVELOPMENT
Change-Id: Ic528375627d01c5166e5c44a37f1f431987b5043
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt
index bcad332..12b27eb 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt
@@ -357,7 +357,8 @@
                 from = KeyguardState.LOCKSCREEN,
                 modeOnCanceledFromStartedStep = { startedStep ->
                     if (
-                        startedStep.to == KeyguardState.AOD && startedStep.from == KeyguardState.AOD
+                        transitionInteractor.asleepKeyguardState.value == KeyguardState.AOD &&
+                            startedStep.from == KeyguardState.AOD
                     ) {
                         TransitionModeOnCanceled.REVERSE
                     } else {