Merge "Skip marking recents as pending top if it is already on top" into sc-dev
This commit is contained in:
@@ -952,7 +952,8 @@ public class RecentsAnimationController implements DeathRecipient {
|
|||||||
"cleanupAnimation(): Notify animation finished mPendingAnimations=%d "
|
"cleanupAnimation(): Notify animation finished mPendingAnimations=%d "
|
||||||
+ "reorderMode=%d",
|
+ "reorderMode=%d",
|
||||||
mPendingAnimations.size(), reorderMode);
|
mPendingAnimations.size(), reorderMode);
|
||||||
if (reorderMode != REORDER_MOVE_TO_ORIGINAL_POSITION) {
|
if (reorderMode != REORDER_MOVE_TO_ORIGINAL_POSITION
|
||||||
|
&& mTargetActivityRecord != mDisplayContent.topRunningActivity()) {
|
||||||
// Notify the state at the beginning because the removeAnimation may notify the
|
// Notify the state at the beginning because the removeAnimation may notify the
|
||||||
// transition is finished. This is a signal that there will be a next transition.
|
// transition is finished. This is a signal that there will be a next transition.
|
||||||
mDisplayContent.mFixedRotationTransitionListener.notifyRecentsWillBeTop();
|
mDisplayContent.mFixedRotationTransitionListener.notifyRecentsWillBeTop();
|
||||||
|
|||||||
@@ -701,6 +701,12 @@ public class RecentsAnimationControllerTest extends WindowTestsBase {
|
|||||||
// Continue the animation (simulating a call to cleanupScreenshot())
|
// Continue the animation (simulating a call to cleanupScreenshot())
|
||||||
mController.continueDeferredCancelAnimation();
|
mController.continueDeferredCancelAnimation();
|
||||||
verify(mAnimationCallbacks).onAnimationFinished(REORDER_MOVE_TO_TOP, false);
|
verify(mAnimationCallbacks).onAnimationFinished(REORDER_MOVE_TO_TOP, false);
|
||||||
|
|
||||||
|
// Assume home was moved to front so will-be-top callback should not be called.
|
||||||
|
homeActivity.moveFocusableActivityToTop("test");
|
||||||
|
spyOn(mDefaultDisplay.mFixedRotationTransitionListener);
|
||||||
|
mController.cleanupAnimation(REORDER_MOVE_TO_TOP);
|
||||||
|
verify(mDefaultDisplay.mFixedRotationTransitionListener, never()).notifyRecentsWillBeTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ActivityRecord createHomeActivity() {
|
private ActivityRecord createHomeActivity() {
|
||||||
|
|||||||
Reference in New Issue
Block a user