Merge "Cancel the existing recents animation before any initialization" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cebca176d7
@@ -164,6 +164,13 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan
|
|||||||
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "startRecentsActivity(): intent=%s", mTargetIntent);
|
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "startRecentsActivity(): intent=%s", mTargetIntent);
|
||||||
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "RecentsAnimation#startRecentsActivity");
|
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "RecentsAnimation#startRecentsActivity");
|
||||||
|
|
||||||
|
// Cancel any existing recents animation running synchronously (do not hold the
|
||||||
|
// WM lock) before starting the newly requested recents animation as they can not coexist
|
||||||
|
if (mWindowManager.getRecentsAnimationController() != null) {
|
||||||
|
mWindowManager.getRecentsAnimationController().forceCancelAnimation(
|
||||||
|
REORDER_MOVE_TO_ORIGINAL_POSITION, "startRecentsActivity");
|
||||||
|
}
|
||||||
|
|
||||||
// If the activity is associated with the root recents task, then try and get that first
|
// If the activity is associated with the root recents task, then try and get that first
|
||||||
Task targetRootTask = mDefaultTaskDisplayArea.getRootTask(WINDOWING_MODE_UNDEFINED,
|
Task targetRootTask = mDefaultTaskDisplayArea.getRootTask(WINDOWING_MODE_UNDEFINED,
|
||||||
mTargetActivityType);
|
mTargetActivityType);
|
||||||
@@ -237,12 +244,7 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan
|
|||||||
targetActivity.intent.replaceExtras(mTargetIntent);
|
targetActivity.intent.replaceExtras(mTargetIntent);
|
||||||
|
|
||||||
// Fetch all the surface controls and pass them to the client to get the animation
|
// Fetch all the surface controls and pass them to the client to get the animation
|
||||||
// started. Cancel any existing recents animation running synchronously (do not hold the
|
// started
|
||||||
// WM lock)
|
|
||||||
if (mWindowManager.getRecentsAnimationController() != null) {
|
|
||||||
mWindowManager.getRecentsAnimationController().forceCancelAnimation(
|
|
||||||
REORDER_MOVE_TO_ORIGINAL_POSITION, "startRecentsActivity");
|
|
||||||
}
|
|
||||||
mWindowManager.initializeRecentsAnimation(mTargetActivityType, recentsAnimationRunner,
|
mWindowManager.initializeRecentsAnimation(mTargetActivityType, recentsAnimationRunner,
|
||||||
this, mDefaultTaskDisplayArea.getDisplayId(),
|
this, mDefaultTaskDisplayArea.getDisplayId(),
|
||||||
mTaskSupervisor.mRecentTasks.getRecentTaskIds(), targetActivity);
|
mTaskSupervisor.mRecentTasks.getRecentTaskIds(), targetActivity);
|
||||||
|
|||||||
Reference in New Issue
Block a user