diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index f3630c187b..5837525506 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1010,8 +1010,8 @@ public abstract class AbsSwipeUpHandler, switch (endTarget) { case HOME: mStateCallback.setState(STATE_SCALED_CONTROLLER_HOME | STATE_CAPTURE_SCREENSHOT); - // Notify swipe-to-home (recents animation) is finished - SystemUiProxy.INSTANCE.get(mContext).notifySwipeToHomeFinished(); + // Notify the SysUI to use fade-in animation when entering PiP + SystemUiProxy.INSTANCE.get(mContext).setPipAnimationTypeToAlpha(); break; case RECENTS: mStateCallback.setState(STATE_SCALED_CONTROLLER_RECENTS | STATE_CAPTURE_SCREENSHOT diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index 3b2df315b1..35d73946f3 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -187,7 +187,7 @@ public class SystemUiProxy implements ISystemUiProxy { linkToDeath(); // re-attach the listeners once missing due to setProxy has not been initialized yet. if (mPipAnimationListener != null && mPip != null) { - setPinnedStackAnimationListener(mPipAnimationListener); + setPipAnimationListener(mPipAnimationListener); } if (mSplitScreenListener != null && mSplitScreen != null) { registerSplitScreenListener(mSplitScreenListener); @@ -357,20 +357,6 @@ public class SystemUiProxy implements ISystemUiProxy { } } - /** - * Notifies that swipe-to-home action is finished. - */ - @Override - public void notifySwipeToHomeFinished() { - if (mSystemUiProxy != null) { - try { - mSystemUiProxy.notifySwipeToHomeFinished(); - } catch (RemoteException e) { - Log.w(TAG, "Failed call notifySwipeToHomeFinished", e); - } - } - } - @Override public void notifyPrioritizedRotation(int rotation) { if (mSystemUiProxy != null) { @@ -475,12 +461,12 @@ public class SystemUiProxy implements ISystemUiProxy { } /** - * Sets listener to get pinned stack animation callbacks. + * Sets listener to get pip animation callbacks. */ - public void setPinnedStackAnimationListener(IPipAnimationListener listener) { + public void setPipAnimationListener(IPipAnimationListener listener) { if (mPip != null) { try { - mPip.setPinnedStackAnimationListener(listener); + mPip.setPipAnimationListener(listener); } catch (RemoteException e) { Log.w(TAG, "Failed call setPinnedStackAnimationListener", e); } @@ -522,6 +508,19 @@ public class SystemUiProxy implements ISystemUiProxy { } } + /** + * Sets the next pip animation type to be the alpha animation. + */ + public void setPipAnimationTypeToAlpha() { + if (mPip != null) { + try { + mPip.setPipAnimationTypeToAlpha(); + } catch (RemoteException e) { + Log.w(TAG, "Failed call setPipAnimationTypeToAlpha", e); + } + } + } + // // Splitscreen // diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 31e165db0c..34ec79dff9 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -941,7 +941,7 @@ public abstract class RecentsView