Fix TaplTestsQuickstep.testPressback failure (2)

Since anim is empty in the predictiveBack case, the animationEnd listener needs to be added to rectFSpringAnim instead

Bug: 318675970
Flag: ACONFIG com.android.systemui.predictive_back_system_animations STAGING
Test: TaplTestsQuickstep
Change-Id: Ibb3fd44c56b9d5370362f994762554eff02edbe6
This commit is contained in:
Johannes Gallmann
2024-01-09 12:04:49 +01:00
parent dacd86e053
commit f263e9d307

View File

@@ -1654,14 +1654,20 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
? Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK
: Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME);
anim.addListener(new AnimatorListenerAdapter() {
AnimatorListenerAdapter endListener = new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
AccessibilityManagerCompat.sendTestProtocolEventToTest(
mLauncher, WALLPAPER_OPEN_ANIMATION_FINISHED_MESSAGE);
}
});
};
if (fromPredictiveBack) {
rectFSpringAnim.addAnimatorListener(endListener);
} else {
anim.addListener(endListener);
}
// Only register the content animation for cancellation when state changes
mLauncher.getStateManager().setCurrentAnimation(anim);