Set the magnification when setting SC initial properties

When a WC stops being organized the SC is replaced to ensure the
previous organizer no longer has control over the states. When this
happens we need to set initial properties on the new SC. Currently any
magnification set on the previous SC is lost. This change applies the
magnification to the new SC

This fixes the issue when one handed mode is toggled. Since the toggling
cause the WC to stop being organized, we lose the magnification set on
it since we recreate the SC

Test: Toggle OHM from QS while magnified
Fixes: 208334240
Change-Id: I7e432bc5a072c137653dbefe3bc71636c8e454be
This commit is contained in:
chaviw
2022-04-26 18:00:22 -05:00
parent 6a6bcc483c
commit 6526f6db14

View File

@@ -620,6 +620,9 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
}
onSurfaceShown(getSyncTransaction());
updateSurfacePositionNonOrganized();
if (mLastMagnificationSpec != null) {
applyMagnificationSpec(getSyncTransaction(), mLastMagnificationSpec);
}
}
/**