Merge "Remove the user assignment to the current user for the overlay display in ExtraDisplayMonitor." into main
diff --git a/updatableServices/src/com/android/internal/car/updatable/ExtraDisplayMonitor.java b/updatableServices/src/com/android/internal/car/updatable/ExtraDisplayMonitor.java
index 3b1ce27..ed2a7d0 100644
--- a/updatableServices/src/com/android/internal/car/updatable/ExtraDisplayMonitor.java
+++ b/updatableServices/src/com/android/internal/car/updatable/ExtraDisplayMonitor.java
@@ -64,9 +64,7 @@
         @Override
         public void onDisplayAdded(int displayId) {
             int userId = USER_NULL;
-            if (mHelper.isPublicOverlayDisplay(displayId)) {
-                userId = mCurrentUserId;
-            } else if (mHelper.isPublicVirtualDisplay(displayId)) {
+            if (mHelper.isPublicVirtualDisplay(displayId)) {
                 userId = mHelper.getOwnerUserIdForDisplay(displayId);
             }
             if (userId != USER_NULL) {
diff --git a/updatableServices/tests/src/com/android/internal/car/updatable/ExtraDisplayMonitorTest.java b/updatableServices/tests/src/com/android/internal/car/updatable/ExtraDisplayMonitorTest.java
index a702021..4e3eff0 100644
--- a/updatableServices/tests/src/com/android/internal/car/updatable/ExtraDisplayMonitorTest.java
+++ b/updatableServices/tests/src/com/android/internal/car/updatable/ExtraDisplayMonitorTest.java
@@ -68,15 +68,6 @@
     }
 
     @Test
-    public void onDisplayAdded_overlayDisplay_assignsOverlayDisplayToDriver() {
-        when(mHelper.isPublicOverlayDisplay(mTestDisplayId)).thenReturn(true);
-
-        mDisplayListenerCaptor.getValue().onDisplayAdded(mTestDisplayId);
-
-        verify(mHelper, times(1)).assignUserToExtraDisplay(mTestUserId, mTestDisplayId);
-    }
-
-    @Test
     public void onDisplayAdded_nonOverlayDisplay_doesNotAssignNonOverlayDisplayToDriver() {
         when(mHelper.isPublicOverlayDisplay(mTestDisplayId)).thenReturn(false);
 
@@ -86,17 +77,6 @@
     }
 
     @Test
-    public void onDisplayRemoved_overlayDisplay_unassignsOverlayDisplayFromDriver() {
-        when(mHelper.isPublicOverlayDisplay(mTestDisplayId)).thenReturn(true);
-        when(mHelper.assignUserToExtraDisplay(mTestUserId, mTestDisplayId)).thenReturn(true);
-
-        mDisplayListenerCaptor.getValue().onDisplayAdded(mTestDisplayId);
-        mDisplayListenerCaptor.getValue().onDisplayRemoved(mTestDisplayId);
-
-        verify(mHelper, times(1)).unassignUserFromExtraDisplay(mTestUserId, mTestDisplayId);
-    }
-
-    @Test
     public void onDisplayRemoved_nonOverlayDisplay_doesNotUnassignsNonOverlayDisplayFromDriver() {
         when(mHelper.isPublicOverlayDisplay(mTestDisplayId)).thenReturn(false);
         when(mHelper.assignUserToExtraDisplay(mTestUserId, mTestDisplayId)).thenReturn(true);