Properly finish transition in ExitDesktopTaskTransitionHandler
Includes onTransitionFinished call to ensure transition is properly finished and future transitions aren't obstructed. Bug: 276773593 Test: Manual; repeatedly transition in and out of desktop mode via drag Change-Id: I3954d35456d50f3d8732aa5f09724d433dddc029
This commit is contained in:
@@ -18,6 +18,8 @@ package com.android.wm.shell.desktopmode;
|
||||
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
@@ -146,6 +148,13 @@ public class ExitDesktopTaskTransitionHandler implements Transitions.TransitionH
|
||||
t.setScale(sc, currentScaleX, currentScaleY);
|
||||
t.apply();
|
||||
});
|
||||
animator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
mTransitions.getMainExecutor().execute(
|
||||
() -> finishCallback.onTransitionFinished(null, null));
|
||||
}
|
||||
});
|
||||
animator.start();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user