Update taskbar resume alignment anim if launcher state changes in the middle
One way to reproduce this issue is to run `adb shell input keyevent KEYCODE_HOME`, which happens to pause and immediately resume launcher. For example, let's say we run this while in All Apps. Because the isResumed=true comes before the state transition to Normal, we behave as if we are still going to All Apps, specifically goingToUnstashedState = false (since we stash in All Apps). To fix this, we now listen to state changes while the resume alignment animation is playing, and update it if necessary.
Also did the same correction for the gesture alignment animation, though I don't have a specific repo for that.
Finally, because there are now more triggers for alignment animations to play, we add a check to only play them if it's not animating to the same value it's already animating towards. One notable experience this improves is swiping down from All Apps to home; if you do it quick enough, the state animation ends before the taskbar unstash animation, and thus the unstash animation would cancel and start again with the full duration, making it look laggy/disjointed (this behavior existed before this change as well).
Test: TaplTestsQuickstep
Test: Go to All Apps, run `adb shell input keyevent KEYCODE_HOME`, open an app and ensure taskbar icons are visible
Test: Quick switch from home when taskbar is present in apps, but instead go to overview; ensure no jump when taskbar stashes
Test: Swipe down quickly from All Apps, ensure taskbar unstashing doesn't slow down when reaching the end of the state transition
Fixes: 214562370
Change-Id: Ie0c6140e14186e41c7e4748dc745f87349b084fe
2 files changed