Loading core/java/android/view/IRecentsAnimationController.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -120,4 +120,10 @@ interface IRecentsAnimationController { * @see IRecentsAnimationRunner#onCancelled */ void setDeferCancelUntilNextTransition(boolean defer, boolean screenshot); /** * Sets a state for controller to decide which surface is the destination when the recents * animation is cancelled through fail safe mechanism. */ void setWillFinishToHome(boolean willFinishToHome); } packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java +11 −0 Original line number Diff line number Diff line Loading @@ -115,4 +115,15 @@ public class RecentsAnimationControllerCompat { Log.e(TAG, "Failed to clean up screenshot of recents animation", e); } } /** * @see {{@link IRecentsAnimationController#setWillFinishToHome(boolean)}}. */ public void setWillFinishToHome(boolean willFinishToHome) { try { mAnimationController.setWillFinishToHome(willFinishToHome); } catch (RemoteException e) { Log.e(TAG, "Failed to set overview reached state", e); } } } No newline at end of file services/core/java/com/android/server/wm/RecentsAnimationController.java +11 −2 Original line number Diff line number Diff line Loading @@ -98,8 +98,10 @@ public class RecentsAnimationController implements DeathRecipient { private final ArrayList<WallpaperAnimationAdapter> mPendingWallpaperAnimations = new ArrayList<>(); private final int mDisplayId; private final Runnable mFailsafeRunnable = () -> cancelAnimation(REORDER_MOVE_TO_ORIGINAL_POSITION, "failSafeRunnable"); private boolean mWillFinishToHome = false; private final Runnable mFailsafeRunnable = () -> cancelAnimation( mWillFinishToHome ? REORDER_MOVE_TO_TOP : REORDER_MOVE_TO_ORIGINAL_POSITION, "failSafeRunnable"); // The recents component app token that is shown behind the visibile tasks private AppWindowToken mTargetAppToken; Loading Loading @@ -326,6 +328,13 @@ public class RecentsAnimationController implements DeathRecipient { } } } @Override public void setWillFinishToHome(boolean willFinishToHome) { synchronized (mService.getWindowManagerLock()) { mWillFinishToHome = willFinishToHome; } } }; /** Loading Loading
core/java/android/view/IRecentsAnimationController.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -120,4 +120,10 @@ interface IRecentsAnimationController { * @see IRecentsAnimationRunner#onCancelled */ void setDeferCancelUntilNextTransition(boolean defer, boolean screenshot); /** * Sets a state for controller to decide which surface is the destination when the recents * animation is cancelled through fail safe mechanism. */ void setWillFinishToHome(boolean willFinishToHome); }
packages/SystemUI/shared/src/com/android/systemui/shared/system/RecentsAnimationControllerCompat.java +11 −0 Original line number Diff line number Diff line Loading @@ -115,4 +115,15 @@ public class RecentsAnimationControllerCompat { Log.e(TAG, "Failed to clean up screenshot of recents animation", e); } } /** * @see {{@link IRecentsAnimationController#setWillFinishToHome(boolean)}}. */ public void setWillFinishToHome(boolean willFinishToHome) { try { mAnimationController.setWillFinishToHome(willFinishToHome); } catch (RemoteException e) { Log.e(TAG, "Failed to set overview reached state", e); } } } No newline at end of file
services/core/java/com/android/server/wm/RecentsAnimationController.java +11 −2 Original line number Diff line number Diff line Loading @@ -98,8 +98,10 @@ public class RecentsAnimationController implements DeathRecipient { private final ArrayList<WallpaperAnimationAdapter> mPendingWallpaperAnimations = new ArrayList<>(); private final int mDisplayId; private final Runnable mFailsafeRunnable = () -> cancelAnimation(REORDER_MOVE_TO_ORIGINAL_POSITION, "failSafeRunnable"); private boolean mWillFinishToHome = false; private final Runnable mFailsafeRunnable = () -> cancelAnimation( mWillFinishToHome ? REORDER_MOVE_TO_TOP : REORDER_MOVE_TO_ORIGINAL_POSITION, "failSafeRunnable"); // The recents component app token that is shown behind the visibile tasks private AppWindowToken mTargetAppToken; Loading Loading @@ -326,6 +328,13 @@ public class RecentsAnimationController implements DeathRecipient { } } } @Override public void setWillFinishToHome(boolean willFinishToHome) { synchronized (mService.getWindowManagerLock()) { mWillFinishToHome = willFinishToHome; } } }; /** Loading