Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebeb6ced authored by bkchoi's avatar bkchoi
Browse files

Exclude a private display from getDisplayIdsForStartingVisibleBackgroundUsers

A private display (e.g. cluster dipslay in Automotive) may not be used
for starting a visible background user, so should be exlcuded from the
results of
ActivityManagerService#getDisplayIdsForStartingVisibleBackgroundUsers.

Bug: 284489759

Test: adb shell cmd activity list-displays-for-starting-users
      atest ActivityManagerServiceTest

Change-Id: Ic34c10cf8736e6870e4a8b9be2eb17ce280a44b3
parent 3f21f5a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19520,7 +19520,7 @@ public class ActivityManagerService extends IActivityManager.Stub
            for (Display display : allDisplays) {
                int displayId = display.getDisplayId();
                // TODO(b/247592632): check other properties like isSecure or proper display type
                if (display.isValid()
                if (display.isValid() && ((display.getFlags() & Display.FLAG_PRIVATE) == 0)
                        && (allowOnDefaultDisplay || displayId != Display.DEFAULT_DISPLAY)) {
                    displayIds[numberValidDisplays++] = displayId;
                }