From 9efb2fb0a08123017fc86f6c8016f043efd0c86b Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Tue, 9 Jan 2024 20:09:13 -0800 Subject: [PATCH] Sync split dismiss anim scrim fadee timing with taskbar to home anim duration * We sync the scrim fade with the taskbar animation duration to avoid any flickers fortaskbar icons disappearing before hotseat icons show up. * Layer wise taskbarIcons > scrim > hotseat as taskbarIcons are translating into place, the frame where they fade out the scrim should also fade out so they get seamlessly replaced by hotseat icons * In our case the scrim was staying on too long so the scrim would show before the hotseat, making it look like a flicker. * Now we fade away the scrim sooner Bug: 318747712 Test: Flicker no longer occurs Flag: None Change-Id: I779af1826ee55bfcbced3e972f14f5f299e9aaeb --- .../uioverrides/states/QuickstepAtomicAnimationFactory.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java index 6651c7399e..0650f9d8b8 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java @@ -110,10 +110,13 @@ public class QuickstepAtomicAnimationFactory extends clampToProgress(LINEAR, 0, 0.33f)); } + // We sync the scrim fade with the taskbar animation duration to avoid any flickers for + // taskbar icons disappearing before hotseat icons show up. + float scrimUpperBoundFromSplit = TASKBAR_TO_HOME_DURATION / (float) config.duration; config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, clampToProgress(LINEAR, 0, 0.25f)); config.setInterpolator(ANIM_SCRIM_FADE, fromState == OVERVIEW_SPLIT_SELECT - ? clampToProgress(LINEAR, 0.33f, 1) + ? clampToProgress(LINEAR, 0.33f, scrimUpperBoundFromSplit) : LINEAR); config.setInterpolator(ANIM_WORKSPACE_SCALE, DECELERATE); config.setInterpolator(ANIM_WORKSPACE_FADE, ACCELERATE);