[Unfold animation] Do not preemptively start the animation if it has run already

Currently if we open an app, unfold the device and then go to home
screen we will start the unfold animation preemptively in Launcher
because Launcher activity will receive updated configuration change
(where isTablet = true) only after going back to home screen, not
when unfolding the device.

This causes a problem because SystemUI won't send the unfold animation
events after going back home as the animation has already run, so we
end up with wrongly started animation in Launcher.

This CL fixes the issues by checking if SystemUI has finished the
animation (or if it is currently running) to avoid preemptive animation
start in this case. This is done by subscribing to the original
unfold transition progress provider which emits progress events
sent through IPC from SystemUI.

Bug: 285150685
Bug: 293131586
Test: open an app on folded screen, unfold, go to home screen =>
  check that icons are not squished
Test: fold/unfold when launcher is open
(cherry picked from commit 6d756970e77e99ed434c58b815a6eaac1a023a4c)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2e53f5ef97a02d25f508774e82985e24dc2f4d2d)
Merged-In: Ic437ff4d19cbd5764635f3007d99880622150f5b
Change-Id: Ic437ff4d19cbd5764635f3007d99880622150f5b
3 files changed