Fix some additional tests registering real receivers

Test: atest SnoozeHelperTest
Test: atest RoleObserverTest
Test: with some temp logging in ContextImpl
Fixes: 274705714
Change-Id: Id0352fd8d2aae47f588b47b3c45cdc5ed4e3fe3d
This commit is contained in:
Julia Reynolds
2023-04-06 11:48:40 -04:00
parent 3a221ed5bc
commit b51fa3a707
2 changed files with 1 additions and 2 deletions

View File

@@ -87,6 +87,7 @@ public class UiServiceTestCase {
Mockito.doReturn(new Intent()).when(mContext).registerReceiverAsUser(
any(), any(), any(), any(), any());
Mockito.doReturn(new Intent()).when(mContext).registerReceiver(any(), any());
Mockito.doReturn(new Intent()).when(mContext).registerReceiver(any(), any(), anyInt());
Mockito.doNothing().when(mContext).unregisterReceiver(any());
}

View File

@@ -96,8 +96,6 @@ public class RoleObserverTest extends UiServiceTestCase {
private TestableNotificationManagerService mService;
private NotificationManagerService.RoleObserver mRoleObserver;
private TestableContext mContext = spy(getContext());
@Mock
private PreferencesHelper mPreferencesHelper;
@Mock