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

Commit 0e212f06 authored by Valentin Iftime's avatar Valentin Iftime
Browse files

Mock AM.getCurrentUserId for hsum devices

 Fixes testCallNotificationListener_NotifiedOnPostCallStyle when running on HSUM devices.

Test: atest com.android.server.notification.NotificationManagerServiceTest#testCallNotificationListener_NotifiedOnPostCallStyle
Bug: 305095040
Bug: 315780402
Change-Id: I3025258f70513ff49386f63420a36923108be213
parent e48ea8e7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -594,6 +594,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
                .thenReturn(INVALID_TASK_ID);
        mContext.addMockSystemService(AppOpsManager.class, mock(AppOpsManager.class));
        when(mUm.getProfileIds(eq(mUserId), eq(false))).thenReturn(new int[] { mUserId });
        when(mAmi.getCurrentUserId()).thenReturn(mUserId);
        when(mPackageManagerClient.hasSystemFeature(FEATURE_TELECOM)).thenReturn(true);