Lines Matching refs:mContext
45 @Mock Context mContext;
64 SystemStateProvider systemStateProvider = new SystemStateProvider(mContext);
74 when(mContext.getSystemService(Context.UI_MODE_SERVICE)).thenReturn(mUiModeManager);
76 assertTrue(new SystemStateProvider(mContext).isCarMode());
81 when(mContext.getSystemService(Context.UI_MODE_SERVICE)).thenReturn(mUiModeManager);
83 assertFalse(new SystemStateProvider(mContext).isCarMode());
89 new SystemStateProvider(mContext);
90 verify(mContext).registerReceiver(any(BroadcastReceiver.class), intentFilter.capture());
101 new SystemStateProvider(mContext).addListener(mSystemStateListener);
103 verify(mContext).registerReceiver(receiver.capture(), any(IntentFilter.class));
106 receiver.getValue().onReceive(mContext, mIntentEnter);
110 receiver.getValue().onReceive(mContext, mIntentExit);
113 receiver.getValue().onReceive(mContext, new Intent("invalid action"));