Make sure updateSurfaceSize gets applied after changing config

Otherwise we'll apply the old size.

Test: Rotate screen, make sure size is correct.
Test: go/wm-smoke
Change-Id: Ic9474952801241a16c344175104ec2b5d45e7ec8
This commit is contained in:
Jorim Jaggi
2018-01-08 16:23:00 +01:00
parent ab4c1eaa41
commit 1a6d98bfd4

View File

@@ -716,10 +716,11 @@ public class TaskStack extends WindowContainer<Task> implements
@Override
public void onConfigurationChanged(Configuration newParentConfig) {
final int prevWindowingMode = getWindowingMode();
super.onConfigurationChanged(newParentConfig);
// Only need to update surface size here since the super method will handle updating
// surface position.
updateSurfaceSize(getPendingTransaction());
super.onConfigurationChanged(newParentConfig);
final int windowingMode = getWindowingMode();
if (mDisplayContent == null || prevWindowingMode == windowingMode) {