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
This commit is contained in:
Brandon Dayauon
2024-07-23 13:56:03 -07:00
parent d8d1532825
commit 1fe2da0d5d
@@ -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,