Don't use WMS.mWindowMap to synchronize WM critical section (36/n)
Use new field WMS.mGlobalLock instead. This will make it easier to
switch the lock to the same object used by ActivityTaskManagerService
in an upcoming CL.
Test: Existing tests pass
Bug: 80414790
Change-Id: I4202e9028395d79cc60b01ed795528b469a16bf1
diff --git a/services/core/java/com/android/server/wm/TaskPositioner.java b/services/core/java/com/android/server/wm/TaskPositioner.java
index d2696c0..66ebc9b 100644
--- a/services/core/java/com/android/server/wm/TaskPositioner.java
+++ b/services/core/java/com/android/server/wm/TaskPositioner.java
@@ -159,7 +159,7 @@
if (DEBUG_TASK_POSITIONING){
Slog.w(TAG, "ACTION_MOVE @ {" + newX + ", " + newY + "}");
}
- synchronized (mService.mWindowMap) {
+ synchronized (mService.mGlobalLock) {
mDragEnded = notifyMoveLocked(newX, newY);
mTask.getDimBounds(mTmpRect);
}
@@ -192,7 +192,7 @@
if (mDragEnded) {
final boolean wasResizing = mResizing;
- synchronized (mService.mWindowMap) {
+ synchronized (mService.mGlobalLock) {
endDragLocked();
mTask.getDimBounds(mTmpRect);
}
@@ -397,7 +397,7 @@
// bounds yet. This will guarantee that the app starts the backdrop renderer before
// configuration changes which could cause an activity restart.
if (mResizing) {
- synchronized (mService.mWindowMap) {
+ synchronized (mService.mGlobalLock) {
notifyMoveLocked(startX, startY);
}