Add missed lock for startHomeOnDisplay

Missing mGlobalLock while calling to RootActivityContainer.

Bug: 128955176
Bug: 127348870
Test: atest ActivityManagerMultiDisplayTests
Test: atest ActivityManagerActivityVisibilityTests
Test: atest ActivityManagerSplitScreenTests#testMinimizeAndUnminimizeThenGoingHome
Test: atest ActivityMetricsLoggerTests#testAppHotLaunchSetsWaitResultDelayData
Change-Id: I1fefaabc0c5ad2b38be4bd3b02b998cad93cdd20
(cherry picked from commit 5fd56547d0d1e105d930909b1beaf2512a5e0f01)
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 118eb5b..c91ee8e 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -6493,8 +6493,10 @@
         @Override
         public boolean startHomeOnDisplay(int userId, String reason, int displayId,
                 boolean fromHomeKey) {
-            return mRootActivityContainer.startHomeOnDisplay(userId, reason, displayId,
-                    fromHomeKey);
+            synchronized (mGlobalLock) {
+                return mRootActivityContainer.startHomeOnDisplay(userId, reason, displayId,
+                        fromHomeKey);
+            }
         }
 
         @Override