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

Commit b3637447 authored by Felipe Leme's avatar Felipe Leme
Browse files

Added more test cases on NotificationManagerServiceTest

They exercise scenarios where a toast is enqueued on devices that
support visible background users.

Also created a mUserId, as it's associated with mUid.

Test: atest NotificationManagerServiceTest

Bug: 273314058

Change-Id: I2b0644ec3778a64b4d2a5ab2817869fa5a30cabb
parent 0d4546d1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3328,10 +3328,10 @@ public class NotificationManagerService extends SystemService {
            }
            if (!isUiContext && displayId == Display.DEFAULT_DISPLAY
                    && UserManager.isVisibleBackgroundUsersEnabled()) {
                // When the caller is a visible background user using a non-ui context (like the
                    && mUm.isVisibleBackgroundUsersSupported()) {
                // When the caller is a visible background user using a non-UI context (like the
                // application context), the Toast must be displayed in the display the user was
                // started visible on
                // started visible on.
                int userId = UserHandle.getUserId(callingUid);
                int userDisplayId = mUmInternal.getMainDisplayAssignedToUser(userId);
                if (displayId != userDisplayId) {
+159 −62

File changed.

Preview size limit exceeded, changes collapsed.