Remove canStartRecentsAnimation logics

Since we won't cancel recent animation during task switching as we
still keeps the connection to reparent the new task animation target
with onTaskAppeared, so we don't need to care about the next recents
animation starts timing if the next task transition is set.

Bug: 152480470
Test: swipe to next task, see if any flickring when swipped.
Change-Id: I5abfbefa9b05751b08c2b235609270977ae55292
This commit is contained in:
Ming-Shin Lu
2020-04-10 01:48:23 +08:00
parent 04bceb99f1
commit d7ccead88f
3 changed files with 0 additions and 24 deletions

View File

@@ -165,17 +165,6 @@ class RecentsAnimation implements RecentsAnimationCallbacks,
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "startRecentsActivity(): intent=%s", mTargetIntent);
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "RecentsAnimation#startRecentsActivity");
// TODO(multi-display) currently only support recents animation in default display.
final DisplayContent dc =
mService.mRootWindowContainer.getDefaultDisplay().mDisplayContent;
if (!mWindowManager.canStartRecentsAnimation()) {
notifyAnimationCancelBeforeStart(recentsAnimationRunner);
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS,
"Can't start recents animation, nextAppTransition=%s",
dc.mAppTransition.getAppTransition());
return;
}
// If the activity is associated with the recents stack, then try and get that first
ActivityStack targetStack = mDefaultTaskDisplayArea.getStack(WINDOWING_MODE_UNDEFINED,
mTargetActivityType);

View File

@@ -2755,18 +2755,6 @@ public class WindowManagerService extends IWindowManager.Stub
return mRecentsAnimationController;
}
/**
* @return Whether the next recents animation can continue to start. Called from
* {@link RecentsAnimation#startRecentsActivity}.
*/
boolean canStartRecentsAnimation() {
// TODO(multi-display): currently only default display support recent activity
if (getDefaultDisplayContentLocked().mAppTransition.isTransitionSet()) {
return false;
}
return true;
}
void cancelRecentsAnimation(
@RecentsAnimationController.ReorderMode int reorderMode, String reason) {
if (mRecentsAnimationController != null) {

View File

@@ -79,7 +79,6 @@ public class RecentsAnimationTest extends ActivityTestsBase {
mService.mWindowManager.setRecentsAnimationController(mRecentsAnimationController);
doNothing().when(mService.mWindowManager).initializeRecentsAnimation(
anyInt(), any(), any(), anyInt(), any(), any());
doReturn(true).when(mService.mWindowManager).canStartRecentsAnimation();
final RecentTasks recentTasks = mService.getRecentTasks();
spyOn(recentTasks);