Merge "Include all not occluded leaf tasks while wrapping animation target" into tm-dev
This commit is contained in:
@@ -1951,12 +1951,6 @@
|
|||||||
"group": "WM_DEBUG_ORIENTATION",
|
"group": "WM_DEBUG_ORIENTATION",
|
||||||
"at": "com\/android\/server\/wm\/ScreenRotationAnimation.java"
|
"at": "com\/android\/server\/wm\/ScreenRotationAnimation.java"
|
||||||
},
|
},
|
||||||
"-172900257": {
|
|
||||||
"message": "addTaskToTargets, target: %s",
|
|
||||||
"level": "DEBUG",
|
|
||||||
"group": "WM_DEBUG_RECENTS_ANIMATIONS",
|
|
||||||
"at": "com\/android\/server\/wm\/RecentsAnimationController.java"
|
|
||||||
},
|
|
||||||
"-172326720": {
|
"-172326720": {
|
||||||
"message": "Saving icicle of %s: %s",
|
"message": "Saving icicle of %s: %s",
|
||||||
"level": "INFO",
|
"level": "INFO",
|
||||||
@@ -3319,6 +3313,12 @@
|
|||||||
"group": "WM_DEBUG_WINDOW_ORGANIZER",
|
"group": "WM_DEBUG_WINDOW_ORGANIZER",
|
||||||
"at": "com\/android\/server\/wm\/DisplayAreaOrganizerController.java"
|
"at": "com\/android\/server\/wm\/DisplayAreaOrganizerController.java"
|
||||||
},
|
},
|
||||||
|
"1151072840": {
|
||||||
|
"message": "collectTaskRemoteAnimations, target: %s",
|
||||||
|
"level": "DEBUG",
|
||||||
|
"group": "WM_DEBUG_RECENTS_ANIMATIONS",
|
||||||
|
"at": "com\/android\/server\/wm\/RecentsAnimationController.java"
|
||||||
|
},
|
||||||
"1164325516": {
|
"1164325516": {
|
||||||
"message": "onExitAnimationDone in %s: exiting=%b remove=%b selfAnimating=%b anim=%s",
|
"message": "onExitAnimationDone in %s: exiting=%b remove=%b selfAnimating=%b anim=%s",
|
||||||
"level": "VERBOSE",
|
"level": "VERBOSE",
|
||||||
|
|||||||
@@ -707,13 +707,7 @@ public class RecentsAnimationController implements DeathRecipient {
|
|||||||
if (isAnimatingTask(task) || skipAnimation(task)) {
|
if (isAnimatingTask(task) || skipAnimation(task)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final RemoteAnimationTarget target = createTaskRemoteAnimation(task, MODE_OPENING,
|
collectTaskRemoteAnimations(task, MODE_OPENING, finishedCallback);
|
||||||
finishedCallback);
|
|
||||||
if (target == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "addTaskToTargets, target: %s", target);
|
|
||||||
mPendingTaskAppears.add(target);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -729,19 +723,30 @@ public class RecentsAnimationController implements DeathRecipient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private RemoteAnimationTarget createTaskRemoteAnimation(Task task, int mode,
|
private void collectTaskRemoteAnimations(Task task, int mode,
|
||||||
OnAnimationFinishedCallback finishedCallback) {
|
OnAnimationFinishedCallback finishedCallback) {
|
||||||
final SparseBooleanArray recentTaskIds =
|
final SparseBooleanArray recentTaskIds =
|
||||||
mService.mAtmService.getRecentTasks().getRecentTaskIds();
|
mService.mAtmService.getRecentTasks().getRecentTaskIds();
|
||||||
|
|
||||||
// The target must be built off the root task (the leaf task surface would be cropped
|
// The target must be built off the root task (the leaf task surface would be cropped
|
||||||
// within the root surface). However, recents only tracks leaf task ids, so we'll replace
|
// within the root surface). However, recents only tracks leaf task ids, so we'll traverse
|
||||||
// the task-id with the leaf id.
|
// and create animation target for all visible leaf tasks.
|
||||||
final Task leafTask = task.getTopLeafTask();
|
task.forAllLeafTasks(leafTask -> {
|
||||||
int taskId = leafTask.mTaskId;
|
if (!leafTask.shouldBeVisible(null /* starting */)) {
|
||||||
TaskAnimationAdapter adapter = addAnimation(task,
|
return;
|
||||||
|
}
|
||||||
|
final int taskId = leafTask.mTaskId;
|
||||||
|
TaskAnimationAdapter adapter = addAnimation(leafTask,
|
||||||
!recentTaskIds.get(taskId), true /* hidden */, finishedCallback);
|
!recentTaskIds.get(taskId), true /* hidden */, finishedCallback);
|
||||||
mPendingNewTaskTargets.add(taskId);
|
mPendingNewTaskTargets.add(taskId);
|
||||||
return adapter.createRemoteAnimationTarget(taskId, mode);
|
final RemoteAnimationTarget target =
|
||||||
|
adapter.createRemoteAnimationTarget(taskId, mode);
|
||||||
|
if (target != null) {
|
||||||
|
mPendingTaskAppears.add(target);
|
||||||
|
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS,
|
||||||
|
"collectTaskRemoteAnimations, target: %s", target);
|
||||||
|
}
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void logRecentsAnimationStartTime(int durationMs) {
|
void logRecentsAnimationStartTime(int durationMs) {
|
||||||
|
|||||||
Reference in New Issue
Block a user