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

Commit e32c8fb9 authored by Jerry Chang's avatar Jerry Chang
Browse files

Fix wrong layout after quick switch back to a split pair

The remote animation for entering split screen will be canceled if it's
triggering by quick-switch gesture. Add back logic to update surface
bounds after animation got canceled which were accidently removed by
Icaabf2e1.

Fix: 244671191
Test: won't have any side empty after quick siwtched to a split pair
Test: atest WMShellFlickerTests
Change-Id: I520e594188e03fda2619be3fb22455e7d8b06d41
parent 76395aec
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -579,8 +579,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    IRemoteAnimationFinishedCallback finishedCallback,
                    SurfaceControl.Transaction t) {
                if (apps == null || apps.length == 0) {
                    onRemoteAnimationFinished(apps);
                    updateSurfaceBounds(mSplitLayout, t, false /* applyResizingOffset */);
                    setDividerVisibility(true, t);
                    t.apply();
                    onRemoteAnimationFinished(apps);
                    try {
                        adapter.getRunner().onAnimationCancelled(mKeyguardShowing);
                    } catch (RemoteException e) {
@@ -593,7 +595,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                nonApps = ArrayUtils.appendElement(RemoteAnimationTarget.class, nonApps,
                        getDividerBarLegacyTarget());

                updateSurfaceBounds(mSplitLayout, t, false);
                updateSurfaceBounds(mSplitLayout, t, false /* applyResizingOffset */);
                setDividerVisibility(true, t);
                for (int i = 0; i < apps.length; ++i) {
                    if (apps[i].mode == MODE_OPENING) {