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
This commit is contained in:
Tony Huang
2022-12-21 07:59:56 +00:00
parent 02358a560e
commit a4b48f4da8

View File

@@ -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