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

Commit 0d6a0179 authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Allow onTaskInfoChanged dispatch immediately" into tm-dev am: da1c40fd

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

Change-Id: I6d655db543cfff9a595ed1286ec1b6690ae7852c
parents 13f7cbde da1c40fd
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -729,6 +729,16 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub {
            // Skip if task still not appeared.
            return;
        }
        if (force && mPendingTaskEvents.isEmpty()) {
            // There are task-info changed events do not result in
            // - RootWindowContainer#performSurfacePlacementNoTrace OR
            // - WindowAnimator#animate
            // For instance, when an app requesting aspect ratio change when in PiP mode.
            // To solve this, we directly dispatch the pending event if there are no events queued (
            // otherwise, all pending events should be dispatched on next drawn).
            dispatchTaskInfoChanged(task, true /* force */);
            return;
        }

        // Defer task info reporting while layout is deferred. This is because layout defer
        // blocks tend to do lots of re-ordering which can mess up animations in receivers.