Fix synchronization error for Seamless rotation.
Missing synchronized block in timeout codepath. Bug: 28823590 Change-Id: I38cff63b559b5f8cd65698af27a1100208ff2600
This commit is contained in:
@@ -8690,19 +8690,21 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
case SEAMLESS_ROTATION_TIMEOUT: {
|
||||
// Rotation only supported on primary display.
|
||||
// TODO(multi-display)
|
||||
final DisplayContent displayContent = getDefaultDisplayContentLocked();
|
||||
final WindowList windows = displayContent.getWindowList();
|
||||
boolean layoutNeeded = false;
|
||||
for (int i = windows.size() - 1; i >= 0; i--) {
|
||||
WindowState w = windows.get(i);
|
||||
if (w.mSeamlesslyRotated) {
|
||||
layoutNeeded = true;
|
||||
w.setDisplayLayoutNeeded();
|
||||
synchronized(mWindowMap) {
|
||||
final DisplayContent displayContent = getDefaultDisplayContentLocked();
|
||||
final WindowList windows = displayContent.getWindowList();
|
||||
boolean layoutNeeded = false;
|
||||
for (int i = windows.size() - 1; i >= 0; i--) {
|
||||
WindowState w = windows.get(i);
|
||||
if (w.mSeamlesslyRotated) {
|
||||
layoutNeeded = true;
|
||||
w.setDisplayLayoutNeeded();
|
||||
}
|
||||
w.mSeamlesslyRotated = false;
|
||||
}
|
||||
if (layoutNeeded) {
|
||||
mWindowPlacerLocked.performSurfacePlacement();
|
||||
}
|
||||
w.mSeamlesslyRotated = false;
|
||||
}
|
||||
if (layoutNeeded) {
|
||||
mWindowPlacerLocked.performSurfacePlacement();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user