Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbf1a116 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Just record initial task-order, don't collect the task" into udc-dev...

Merge "Just record initial task-order, don't collect the task" into udc-dev am: ee20f05f am: cf738b29

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22517702



Change-Id: I35c5156f485d6cdfef0ff3c9aaaa5769da5e5d17
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6fe5a854 cf738b29
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -305,8 +305,8 @@ class BLASTSyncEngine {
        if (mActiveSyncs.size() != 0) {
        if (mActiveSyncs.size() != 0) {
            // We currently only support one sync at a time, so start a new SyncGroup when there is
            // We currently only support one sync at a time, so start a new SyncGroup when there is
            // another may cause issue.
            // another may cause issue.
            ProtoLog.w(WM_DEBUG_SYNC_ENGINE,
            Slog.e(TAG, "SyncGroup " + s.mSyncId
                    "SyncGroup %d: Started when there is other active SyncGroup", s.mSyncId);
                    + ": Started when there is other active SyncGroup");
        }
        }
        mActiveSyncs.put(s.mSyncId, s);
        mActiveSyncs.put(s.mSyncId, s);
        ProtoLog.v(WM_DEBUG_SYNC_ENGINE, "SyncGroup %d: Started for listener: %s",
        ProtoLog.v(WM_DEBUG_SYNC_ENGINE, "SyncGroup %d: Started for listener: %s",
+1 −1
Original line number Original line Diff line number Diff line
@@ -4687,7 +4687,7 @@ class Task extends TaskFragment {
        if (!isAttached()) {
        if (!isAttached()) {
            return;
            return;
        }
        }
        mTransitionController.collect(this);
        mTransitionController.recordTaskOrder(this);


        final TaskDisplayArea taskDisplayArea = getDisplayArea();
        final TaskDisplayArea taskDisplayArea = getDisplayArea();


+15 −4
Original line number Original line Diff line number Diff line
@@ -521,10 +521,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
            mChanges.put(wc, info);
            mChanges.put(wc, info);
        }
        }
        mParticipants.add(wc);
        mParticipants.add(wc);
        if (wc.getDisplayContent() != null && !mTargetDisplays.contains(wc.getDisplayContent())) {
        recordDisplay(wc.getDisplayContent());
            mTargetDisplays.add(wc.getDisplayContent());
            addOnTopTasks(wc.getDisplayContent(), mOnTopTasksStart);
        }
        if (info.mShowWallpaper) {
        if (info.mShowWallpaper) {
            // Collect the wallpaper token (for isWallpaper(wc)) so it is part of the sync set.
            // Collect the wallpaper token (for isWallpaper(wc)) so it is part of the sync set.
            final WindowState wallpaper =
            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`. */
    /** Adds the top non-alwaysOnTop tasks within `task` to `out`. */
    private static void addOnTopTasks(Task task, ArrayList<Task> out) {
    private static void addOnTopTasks(Task task, ArrayList<Task> out) {
        for (int i = task.getChildCount() - 1; i >= 0; --i) {
        for (int i = task.getChildCount() - 1; i >= 0; --i) {
+6 −0
Original line number Original line Diff line number Diff line
@@ -605,6 +605,12 @@ class TransitionController {
        mCollectingTransition.collectExistenceChange(wc);
        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
     * Collects the window containers which need to be synced with the changing display area into
     * the current collecting transition.
     * the current collecting transition.