Merge "Just record initial task-order, don't collect the task" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ee20f05fe6
@@ -305,8 +305,8 @@ class BLASTSyncEngine {
|
||||
if (mActiveSyncs.size() != 0) {
|
||||
// We currently only support one sync at a time, so start a new SyncGroup when there is
|
||||
// another may cause issue.
|
||||
ProtoLog.w(WM_DEBUG_SYNC_ENGINE,
|
||||
"SyncGroup %d: Started when there is other active SyncGroup", s.mSyncId);
|
||||
Slog.e(TAG, "SyncGroup " + s.mSyncId
|
||||
+ ": Started when there is other active SyncGroup");
|
||||
}
|
||||
mActiveSyncs.put(s.mSyncId, s);
|
||||
ProtoLog.v(WM_DEBUG_SYNC_ENGINE, "SyncGroup %d: Started for listener: %s",
|
||||
|
||||
@@ -4687,7 +4687,7 @@ class Task extends TaskFragment {
|
||||
if (!isAttached()) {
|
||||
return;
|
||||
}
|
||||
mTransitionController.collect(this);
|
||||
mTransitionController.recordTaskOrder(this);
|
||||
|
||||
final TaskDisplayArea taskDisplayArea = getDisplayArea();
|
||||
|
||||
|
||||
@@ -521,10 +521,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
mChanges.put(wc, info);
|
||||
}
|
||||
mParticipants.add(wc);
|
||||
if (wc.getDisplayContent() != null && !mTargetDisplays.contains(wc.getDisplayContent())) {
|
||||
mTargetDisplays.add(wc.getDisplayContent());
|
||||
addOnTopTasks(wc.getDisplayContent(), mOnTopTasksStart);
|
||||
}
|
||||
recordDisplay(wc.getDisplayContent());
|
||||
if (info.mShowWallpaper) {
|
||||
// Collect the wallpaper token (for isWallpaper(wc)) so it is part of the sync set.
|
||||
final WindowState wallpaper =
|
||||
@@ -535,6 +532,20 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
}
|
||||
}
|
||||
|
||||
private void recordDisplay(DisplayContent dc) {
|
||||
if (dc == null || mTargetDisplays.contains(dc)) return;
|
||||
mTargetDisplays.add(dc);
|
||||
addOnTopTasks(dc, mOnTopTasksStart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Records information about the initial task order. This does NOT collect anything. Call this
|
||||
* before any ordering changes *could* occur, but it is not known yet if it will occur.
|
||||
*/
|
||||
void recordTaskOrder(WindowContainer from) {
|
||||
recordDisplay(from.getDisplayContent());
|
||||
}
|
||||
|
||||
/** Adds the top non-alwaysOnTop tasks within `task` to `out`. */
|
||||
private static void addOnTopTasks(Task task, ArrayList<Task> out) {
|
||||
for (int i = task.getChildCount() - 1; i >= 0; --i) {
|
||||
|
||||
@@ -605,6 +605,12 @@ class TransitionController {
|
||||
mCollectingTransition.collectExistenceChange(wc);
|
||||
}
|
||||
|
||||
/** @see Transition#recordTaskOrder */
|
||||
void recordTaskOrder(@NonNull WindowContainer wc) {
|
||||
if (mCollectingTransition == null) return;
|
||||
mCollectingTransition.recordTaskOrder(wc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Collects the window containers which need to be synced with the changing display area into
|
||||
* the current collecting transition.
|
||||
|
||||
Reference in New Issue
Block a user