summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
author Jordan Demeulenaere <jdemeulenaere@google.com> 2023-09-19 17:35:41 +0200
committer Jordan Demeulenaere <jdemeulenaere@google.com> 2023-09-21 11:05:53 +0200
commitdf830e17f80b4d1e1f9d2334aa164baa31c49f85 (patch)
treea5d0411528163d319aa7ba2456244566d3a372b5 /cmds/bootanimation/BootAnimation.cpp
parent742e559d2630d56579d8997bb245d1333659234f (diff)
Post ActivityLaunchAnimator timeout on Looper.mainLooper()
This CL fixes weird shade state bugs that can happen during Activity launches animated by the ActivityLaunchAnimator. Before this CL, if a WindowManager timeout happened (i.e. WM never starts or cancels the remote animation) *and* that the launchContainer (the ViewRootImpl where the launch started) was detached, then the timeout would never be triggered, leaving our UI in an invalid state. This bug is currently easily reproducible using the steps from b/300056100#comment4, where we incorrectly animate an activity launch from a dialog then instantly dismiss that dialog. This CL fixes this bug by posting the timeout on Looper.getMainLooper() instead of using launchContainer.postDelayed(). That way, the timeout is always called after 1s if WM didn't start or cancel the remote animation. I suspect that this is somehow what is also happening with b/288507023, but I was not able to confirm this theory yet. Bug: b/300056100 Bug: b/288507023 Test: Manual, made sure that b/300056100#comment4 is not reproducible with this CL. Unfortunately ActivityLaunchAnimator is in a separate library so it can't use our DelayableExecutor (that is testable), so I don't think there is a good way to write a unit test for this. Change-Id: Iaa019d6d0aabdf97af0cb6995ad81270f275f3e7
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
0 files changed, 0 insertions, 0 deletions