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

Commit ce469ce5 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Skip updating the leash if a task is removed prior to sync completion"...

Merge "Skip updating the leash if a task is removed prior to sync completion" into tm-qpr-dev am: e2574c8d

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



Change-Id: Idaa283dc11441d2dbe743fe1b89374c414db6b30
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e3e99b2d e2574c8d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -108,6 +108,10 @@ public class FullscreenTaskListener implements ShellTaskOrganizer.TaskListener {
        }
        if (!createdWindowDecor) {
            mSyncQueue.runInSync(t -> {
                if (!leash.isValid()) {
                    // Task vanished before sync completion
                    return;
                }
                // Reset several properties back to fullscreen (PiP, for example, leaves all these
                // properties in a bad state).
                t.setWindowCrop(leash, null);
@@ -136,6 +140,10 @@ public class FullscreenTaskListener implements ShellTaskOrganizer.TaskListener {
        final Point positionInParent = state.mTaskInfo.positionInParent;
        if (!oldPositionInParent.equals(state.mTaskInfo.positionInParent)) {
            mSyncQueue.runInSync(t -> {
                if (!state.mLeash.isValid()) {
                    // Task vanished before sync completion
                    return;
                }
                t.setPosition(state.mLeash, positionInParent.x, positionInParent.y);
            });
        }