Finish unfold Shell transition if animation has finished already

We receive unfold animation progress updates
from SystemUI in UnfoldTransitionHandler using
onStateChangeStarted/Progress/Finished callbacks.

If Shell transition starts *after* unfold animation
has already finished (onStateChangeFinished callback
is called), then Shell transition will never be
finished.

This CL adds a flag that we set when animation is
finished already and it forces the Shell transition
to finish immediately if this flag is set.
The flag resets on folding the device, so next
time when unfolding it, it will be animated again.

Bug: 289783110
Test: atest UnfoldTransitionHandlerTest
Test: add a delay to start shell transition =>
  verify that it finishes
Change-Id: Ibd782aed71094b9f481f260799513ca7fc19f600
5 files changed