From 1fe2da0d5d4c3ee310c5b90e78c1f752a64aef8b Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Tue, 23 Jul 2024 13:56:03 -0700 Subject: [PATCH] Make settings/text alpha animation happen in parallelSet instead of when headerSetter starts. With the addition of floating mask views, settingsAlpha and textAlpha animation shouldn't be played in the beginning when animatorSet starts but more so during the parallel set. Otherwise, the text/settings alpha will start first before/same time as translationView. You can see this if you were to look at the video at the bottom of this commit message, specifically during the collapse case. bug:355042924 Test manually - before:https://drive.google.com/file/d/1BoCA5rlr9m3QDVfF5zfp9G12Ldst3kn0/view?usp=sharing after:https://drive.google.com/file/d/1y84uxmAfJ7_SNh26jT2O-m2xOFWCMkJm/view?usp=sharing Flag: com.android.launcher3.enable_private_space Change-Id: I98248f4b9aa2a4e1287183710ffdc66093cef022 --- .../launcher3/allapps/PrivateProfileManager.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/com/android/launcher3/allapps/PrivateProfileManager.java b/src/com/android/launcher3/allapps/PrivateProfileManager.java index c1264d6135..402f5808f8 100644 --- a/src/com/android/launcher3/allapps/PrivateProfileManager.java +++ b/src/com/android/launcher3/allapps/PrivateProfileManager.java @@ -660,10 +660,7 @@ public class PrivateProfileManager extends UserProfileManager { return; } attachFloatingMaskView(expand); - PropertySetter headerSetter = new AnimatedPropertySetter(); - headerSetter.add(updateSettingsGearAlpha(expand)); - headerSetter.add(updateLockTextAlpha(expand)); - AnimatorSet animatorSet = headerSetter.buildAnim(); + AnimatorSet animatorSet = new AnimatedPropertySetter().buildAnim(); animatorSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { @@ -708,12 +705,16 @@ public class PrivateProfileManager extends UserProfileManager { } })); if (expand) { - animatorSet.playTogether(animateAlphaOfIcons(true), + animatorSet.playTogether(updateSettingsGearAlpha(true), + updateLockTextAlpha(true), + animateAlphaOfIcons(true), animatePillTransition(true), translateFloatingMaskView(false)); } else { AnimatorSet parallelSet = new AnimatorSet(); - parallelSet.playTogether(animateAlphaOfIcons(false), + parallelSet.playTogether(updateSettingsGearAlpha(false), + updateLockTextAlpha(false), + animateAlphaOfIcons(false), animatePillTransition(false)); if (isPrivateSpaceHidden()) { animatorSet.playSequentially(parallelSet,