Add forceFinishCurrentTransition and hook it up to screen power state.

The upcoming debug.sf.no_vsyncs_on_screen_off flag will prevent animator frames from emitting while the screen is off, so we need to make sure KTF transitions finish when the screen turns off.

This does not affect transitions to/from AOD, where the screen never actually turns off.

Bug: 331636736
Test: atest KeyguardTransitionRepositoryTest
Flag: com.android.systemui.keyguard_transition_force_finish_on_screen_off
Change-Id: I8e33c7e9dd6c5545d48a51dd27487b296e50eb89
7 files changed