From 18bafeb26194e819bb7c89975fdac8685fdccfad Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Fri, 8 Mar 2024 13:10:42 +0000 Subject: [PATCH] Fix overview live tile flickers when clicking on overview action buttons When a Live Tile is present on overview and an action is triggered (e.g., Split, Select, Screenshot), the live tile flickers due to a competing snapshot modification and animation on UI thread. The live tile is updated to switch to screenshot and at the same time the finishRecentsAnimation is triggered. This CL bumps the number of frames to wait after the view is updated to run the Runnable code. Bumping back the mDeferFrameCount to 2 solves the sync between rendering the snapshot and hiding the Live Tile. Fix: 327380570 Flag: N/A Test: Manual. Open an App -> Swipe to Overview (Live title) -> Click on Split. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:024a1018e4c96b43d8f122bb1c614c3e3ea5bab7) Merged-In: Ibd22a58580b2e5e5b866deb4e7dc87945c7e38c4 Change-Id: Ibd22a58580b2e5e5b866deb4e7dc87945c7e38c4 --- quickstep/src/com/android/quickstep/ViewUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/ViewUtils.java b/quickstep/src/com/android/quickstep/ViewUtils.java index b1320674e6..3b58dfcb39 100644 --- a/quickstep/src/com/android/quickstep/ViewUtils.java +++ b/quickstep/src/com/android/quickstep/ViewUtils.java @@ -56,7 +56,7 @@ public class ViewUtils { boolean mSurfaceCallbackRegistered = false; boolean mFinished; - int mDeferFrameCount = 1; + int mDeferFrameCount = 2; FrameHandler(View view, Runnable finishCallback, BooleanSupplier cancelled) { mViewRoot = view.getViewRootImpl();