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

Commit a4b48f4d authored by Tony Huang's avatar Tony Huang
Browse files

Initialize Task surface as invisible

While app cold launch and combine to split, sometimes race happend
and cause child task surface still hidden.
Fix this issue by initializing task as invisible so it would not
set surface as hide when first prepareSurface.

Fix: 262478804
Test: manual
Test: pass existing tests
Change-Id: Iaa93fee162fc8bc4b60aac9ff8faea6943cd01d5
parent 02358a56
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -609,7 +609,7 @@ class Task extends TaskFragment {
     */
    ActivityRecord mChildPipActivity;

    boolean mLastSurfaceShowing = true;
    boolean mLastSurfaceShowing;

    /**
     * Tracks if a back gesture is in progress.
@@ -4170,13 +4170,7 @@ class Task extends TaskFragment {

    @Override
    boolean showSurfaceOnCreation() {
        if (mCreatedByOrganizer) {
            // Tasks created by the organizer are default visible because they can synchronously
            // update the leash before new children are added to the task.
            return true;
        }
        // Organized tasks handle their own surface visibility
        return !canBeOrganized();
        return false;
    }

    @Override