Fix surface offset issue when enter split from recents
The animation issue is cased by task surface has a offset while it is under animation leash. And this offset is a race condition which caused by split side set its bounds on same time. Fix this by applying bounds before animation start rather than on animation starting. Fix: 247466887 Test: manual Test: pass existing tests Change-Id: Id3de8358dbf3c1209e0e3986aca6dba854be17f4
This commit is contained in:
@@ -669,6 +669,12 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
mSplitLayout.init();
|
||||
mSplitLayout.setDivideRatio(splitRatio);
|
||||
|
||||
// Apply surface bounds before animation start.
|
||||
SurfaceControl.Transaction startT = mTransactionPool.acquire();
|
||||
updateSurfaceBounds(mSplitLayout, startT, false /* applyResizingOffset */);
|
||||
startT.apply();
|
||||
mTransactionPool.release(startT);
|
||||
|
||||
// Set false to avoid record new bounds with old task still on top;
|
||||
mShouldUpdateRecents = false;
|
||||
mIsDividerRemoteAnimating = true;
|
||||
@@ -742,7 +748,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
mSyncQueue.queue(wct);
|
||||
mSyncQueue.runInSync(t -> {
|
||||
setDividerVisibility(true, t);
|
||||
updateSurfaceBounds(mSplitLayout, t, false /* applyResizingOffset */);
|
||||
});
|
||||
|
||||
setEnterInstanceId(instanceId);
|
||||
|
||||
Reference in New Issue
Block a user