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

Commit 80f3eae5 authored by Jerry Chang's avatar Jerry Chang Committed by Automerger Merge Worker
Browse files

Merge "Prevent updating invlid child task surfaces in the sync queue" into...

Merge "Prevent updating invlid child task surfaces in the sync queue" into tm-qpr-dev am: 3d8e5f7e am: a5f2118f

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



Change-Id: I1aa35044151037fbf685eb7a6ce70bfb1cf171f8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ebb78f9c a5f2118f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.IBinder;
import android.util.Slog;
import android.util.SparseArray;
import android.view.RemoteAnimationTarget;
import android.view.SurfaceControl;
@@ -376,7 +377,13 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
            SurfaceControl leash, boolean firstAppeared) {
        final Point taskPositionInParent = taskInfo.positionInParent;
        mSyncQueue.runInSync(t -> {
            t.setWindowCrop(leash, null);
            // The task surface might be released before running in the sync queue for the case like
            // trampoline launch, so check if the surface is valid before processing it.
            if (!leash.isValid()) {
                Slog.w(TAG, "Skip updating invalid child task surface of task#" + taskInfo.taskId);
                return;
            }
            t.setCrop(leash, null);
            t.setPosition(leash, taskPositionInParent.x, taskPositionInParent.y);
            if (firstAppeared && !ENABLE_SHELL_TRANSITIONS) {
                t.setAlpha(leash, 1f);