Loading quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +16 −2 Original line number Diff line number Diff line Loading @@ -2041,8 +2041,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, if (!hasTargets() || mRecentsAnimationController == null) { // If there are no targets or the animation not started, then there is nothing to finish mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED); maybeAbortSwipePipToHome(); } else { maybeFinishSwipeToHome(); maybeFinishSwipePipToHome(); finishRecentsControllerToHome( () -> mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED)); } Loading @@ -2053,12 +2054,25 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, doLogGesture(HOME, mRecentsView == null ? null : mRecentsView.getCurrentPageTaskView()); } /** * Notifies SysUI that transition is aborted if applicable and also pass leash transactions * from Launcher to WM. */ private void maybeAbortSwipePipToHome() { if (mIsSwipingPipToHome && mSwipePipToHomeAnimators[0] != null) { SystemUiProxy.INSTANCE.get(mContext).abortSwipePipToHome( mSwipePipToHomeAnimator.getTaskId(), mSwipePipToHomeAnimator.getComponentName()); mIsSwipingPipToHome = false; } } /** * Notifies SysUI that transition is finished if applicable and also pass leash transactions * from Launcher to WM. * This should happen before {@link #finishRecentsControllerToHome(Runnable)}. */ private void maybeFinishSwipeToHome() { private void maybeFinishSwipePipToHome() { if (mIsSwipingPipToHome && mSwipePipToHomeAnimators[0] != null) { SystemUiProxy.INSTANCE.get(mContext).stopSwipePipToHome( mSwipePipToHomeAnimator.getTaskId(), Loading quickstep/src/com/android/quickstep/SystemUiProxy.java +14 −0 Original line number Diff line number Diff line Loading @@ -564,6 +564,20 @@ public class SystemUiProxy implements ISystemUiProxy { } } /** * Notifies WM Shell that launcher has aborted all the animation for swipe to home. WM Shell * can use this callback to clean up its internal states. */ public void abortSwipePipToHome(int taskId, ComponentName componentName) { if (mPip != null) { try { mPip.abortSwipePipToHome(taskId, componentName); } catch (RemoteException e) { Log.w(TAG, "Failed call abortSwipePipToHome"); } } } /** * Sets the next pip animation type to be the alpha animation. */ Loading Loading
quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +16 −2 Original line number Diff line number Diff line Loading @@ -2041,8 +2041,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, if (!hasTargets() || mRecentsAnimationController == null) { // If there are no targets or the animation not started, then there is nothing to finish mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED); maybeAbortSwipePipToHome(); } else { maybeFinishSwipeToHome(); maybeFinishSwipePipToHome(); finishRecentsControllerToHome( () -> mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED)); } Loading @@ -2053,12 +2054,25 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, doLogGesture(HOME, mRecentsView == null ? null : mRecentsView.getCurrentPageTaskView()); } /** * Notifies SysUI that transition is aborted if applicable and also pass leash transactions * from Launcher to WM. */ private void maybeAbortSwipePipToHome() { if (mIsSwipingPipToHome && mSwipePipToHomeAnimators[0] != null) { SystemUiProxy.INSTANCE.get(mContext).abortSwipePipToHome( mSwipePipToHomeAnimator.getTaskId(), mSwipePipToHomeAnimator.getComponentName()); mIsSwipingPipToHome = false; } } /** * Notifies SysUI that transition is finished if applicable and also pass leash transactions * from Launcher to WM. * This should happen before {@link #finishRecentsControllerToHome(Runnable)}. */ private void maybeFinishSwipeToHome() { private void maybeFinishSwipePipToHome() { if (mIsSwipingPipToHome && mSwipePipToHomeAnimators[0] != null) { SystemUiProxy.INSTANCE.get(mContext).stopSwipePipToHome( mSwipePipToHomeAnimator.getTaskId(), Loading
quickstep/src/com/android/quickstep/SystemUiProxy.java +14 −0 Original line number Diff line number Diff line Loading @@ -564,6 +564,20 @@ public class SystemUiProxy implements ISystemUiProxy { } } /** * Notifies WM Shell that launcher has aborted all the animation for swipe to home. WM Shell * can use this callback to clean up its internal states. */ public void abortSwipePipToHome(int taskId, ComponentName componentName) { if (mPip != null) { try { mPip.abortSwipePipToHome(taskId, componentName); } catch (RemoteException e) { Log.w(TAG, "Failed call abortSwipePipToHome"); } } } /** * Sets the next pip animation type to be the alpha animation. */ Loading