Updating TaskbarStashController API

> Making the state animator nonNull to avoid null checks at caller
> Updating the methods names to explicitely indication animation
  being started or not

Bug: 265352919
Test: Verified on device
Change-Id: I1f5b47921f831ed0b202aced10825c8e1d39a4dc
This commit is contained in:
Sunny Goyal
2023-01-12 16:09:24 -08:00
parent bf69ef034a
commit a34521e434
3 changed files with 28 additions and 53 deletions

View File

@@ -184,7 +184,7 @@ import java.util.StringJoiner;
stashController.updateStateForFlag(FLAG_IN_APP, false);
updateStateForFlag(FLAG_RECENTS_ANIMATION_RUNNING, true);
animatorSet.play(stashController.applyStateWithoutStart(duration));
animatorSet.play(stashController.createApplyStateAnimator(duration));
animatorSet.play(applyState(duration, false));
if (mTaskBarRecentsAnimationListener != null) {
@@ -398,7 +398,7 @@ import java.util.StringJoiner;
boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher);
TaskbarStashController stashController = mControllers.taskbarStashController;
stashController.updateStateForFlag(FLAG_IN_STASHED_LAUNCHER_STATE, isInStashedState);
Animator stashAnimator = stashController.applyStateWithoutStart(duration);
Animator stashAnimator = stashController.createApplyStateAnimator(duration);
if (stashAnimator != null) {
stashAnimator.addListener(new AnimatorListenerAdapter() {
@Override