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

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

Merge "Fix some visibility issues with tasks & task overlays" into tm-qpr-dev...

Merge "Fix some visibility issues with tasks & task overlays" into tm-qpr-dev am: 3dcd9ed2 am: b4d6f235

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



Change-Id: I3924239eb5b4c96af539f5f0e3bc4b8f0347a3ee
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9728be46 b4d6f235
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -114,7 +114,9 @@ public class FullscreenTaskListener implements ShellTaskOrganizer.TaskListener {
                t.setPosition(leash, positionInParent.x, positionInParent.y);
                t.setAlpha(leash, 1f);
                t.setMatrix(leash, 1, 0, 0, 1);
                if (taskInfo.isVisible) {
                    t.show(leash);
                }
            });
        }
    }
+6 −1
Original line number Diff line number Diff line
@@ -3271,12 +3271,17 @@ class Task extends TaskFragment {
        // We intend to let organizer manage task visibility but it doesn't
        // have enough information until we finish shell transitions.
        // In the mean time we do an easy fix here.
        final boolean show = isVisible() || isAnimating(TRANSITION | PARENTS | CHILDREN);
        final boolean visible = isVisible();
        final boolean show = visible || isAnimating(TRANSITION | PARENTS | CHILDREN);
        if (mSurfaceControl != null) {
            if (show != mLastSurfaceShowing) {
                t.setVisibility(mSurfaceControl, show);
            }
        }
        // Only show the overlay if the task has other visible children
        if (mOverlayHost != null) {
            mOverlayHost.setVisibility(t, visible);
        }
        mLastSurfaceShowing = show;
    }

+6 −0
Original line number Diff line number Diff line
@@ -80,6 +80,12 @@ class TrustedOverlayHost {
        }
    }

    void setVisibility(SurfaceControl.Transaction t, boolean visible) {
        if (mSurfaceControl != null) {
            t.setVisibility(mSurfaceControl, visible);
        }
    }

    void addOverlay(SurfaceControlViewHost.SurfacePackage p, SurfaceControl currentParent) {
        requireOverlaySurfaceControl();
        mOverlays.add(p);