summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Nick Chameyev <nickchameyev@google.com> 2024-10-15 17:17:09 +0100
committer Nick Chameyev <nickchameyev@google.com> 2024-10-16 10:54:41 +0100
commit2037735004f508088b9597a53410408c0e935387 (patch)
treea60cc2666cca7cbd5a1b62c28bb57103123f593d /libs/androidfw/FileStream.cpp
parenta7bb06b8305a99733e151374c18a531d35fdfc85 (diff)
Fix finishing unfold shell transition immediately after folding
This CL addresses an issue with UnfoldTransitionHandler that sometimes it finishes the animation immediately when the following events happen: - [folded the device] - onFoldedStateChanged(true) -> mAnimationFinished is set to 'false' - onStateChangeFinished() -> mAnimationFinished is set to 'true' (the order is not guaranteed between the last two events) - [unfolded the device] - handleRequest(unfold transition) - startAnimation() -> immediately finishes the animation because mAnimationFinished is set to true, but it should have animated it This is fixed by setting mAnimationFinished to false in onStateChangeFinished based on the last animation progress. It is guaranteed that we will receive onTransitionProgress with 0f value when folding and then onStateChangeFinished(), so we can use this signal instead of onFoldedStateChanged to reset the flag. Bug: 372319646 Test: atest UnfoldTransitionHandlerTest Test: fold multiple times => verify unfold transition is not finished immediately Flag: EXEMPT bugfix Change-Id: I2dc2f578b6132361c09cd8fe7e8ebc8fe586f5e4
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions