Home
last modified time | relevance | path

Searched refs:mForegroundUtils (Results 1 – 11 of 11) sorted by relevance

/packages/modules/Nfc/NfcNci/tests/unit/src/com/android/nfc/
DForegroundUtilsTest.java47 private ForegroundUtils mForegroundUtils; field in ForegroundUtilsTest
58 () -> mForegroundUtils = new ForegroundUtils(mActivityManager)); in setUp()
59 Assert.assertNotNull(mForegroundUtils); in setUp()
74 boolean isRegistered = mForegroundUtils.registerUidToBackgroundCallback(callback, 0); in testRegisterUidToBackgroundCallback()
82 boolean isInForegroundTrue = mForegroundUtils.isInForeground(0); in testIsInForeground()
84 isInForegroundTrue = mForegroundUtils.isInForeground(10); in testIsInForeground()
90 mForegroundUtils.clearForegroundlist(); in testOnUidImportance()
91 mForegroundUtils.onUidImportance(0, in testOnUidImportance()
93 List<Integer> uids = mForegroundUtils.getForegroundUids(); in testOnUidImportance()
96 mForegroundUtils.onUidImportance(0, in testOnUidImportance()
[all …]
DEnableNfcFServiceTest.java66 private ForegroundUtils mForegroundUtils; field in EnableNfcFServiceTest
83 mForegroundUtils = mock(ForegroundUtils.class); in setUp()
85 mockContext.getSystemService(ActivityManager.class))).thenReturn(mForegroundUtils); in setUp()
138 when(mForegroundUtils.registerUidToBackgroundCallback(mEnabledNfcFServices, 1)).thenReturn( in testRegisterEnabledForegroundService()
232 when(mForegroundUtils.isInForeground(callingId)).thenReturn(true); in testUnregisteredEnabledForegroundService()
236 verify(mForegroundUtils).isInForeground(callingId); in testUnregisteredEnabledForegroundService()
242 when(mForegroundUtils.isInForeground(callingId)).thenReturn(false); in testUnregisteredEnabledForegroundServiceNonForegroundUid()
245 verify(mForegroundUtils).isInForeground(callingId); in testUnregisteredEnabledForegroundServiceNonForegroundUid()
DNfcDispatcherTest.java116 ForegroundUtils mForegroundUtils; field in NfcDispatcherTest
144 when(ForegroundUtils.getInstance(mActivityManager)).thenReturn(mForegroundUtils); in setUp()
295 verify(mForegroundUtils).registerUidToBackgroundCallback(any(), callingUid.capture()); in testDecodeNfcBarcodeUri()
/packages/modules/Nfc/NfcNci/src/com/android/nfc/cardemulation/
DEnabledNfcFServices.java45 final ForegroundUtils mForegroundUtils; field in EnabledNfcFServices
69 mForegroundUtils = ForegroundUtils.getInstance( in EnabledNfcFServices()
145 if (mForegroundUtils.registerUidToBackgroundCallback(this, callingUid)) { in registerEnabledForegroundService()
179 if (mForegroundUtils.isInForeground(callingUid)) { in unregisteredEnabledForegroundService()
DPreferredServices.java79 final ForegroundUtils mForegroundUtils; field in PreferredServices
123 mForegroundUtils = ForegroundUtils.getInstance( in PreferredServices()
423 if (mForegroundUtils.registerUidToBackgroundCallback(this, callingUid)) { in registerPreferredForegroundService()
460 if (mForegroundUtils.isInForeground(callingUid)) { in unregisteredPreferredForegroundService()
DCardEmulationManager.java148 final ForegroundUtils mForegroundUtils; field in CardEmulationManager
171 mForegroundUtils = ForegroundUtils.getInstance( in CardEmulationManager()
228 mForegroundUtils = foregroundUtils; in CardEmulationManager()
1193 if (!mForegroundUtils in overrideRoutingTable()
1227 if (!mForegroundUtils.isInForeground(Binder.getCallingUid())) { in recoverRoutingTable()
/packages/modules/Nfc/NfcNci/tests/unit/src/com/android/nfc/cardemulation/
DPreferredServicesTest.java85 @Mock private ForegroundUtils mForegroundUtils; field in PreferredServicesTest
144 when(ForegroundUtils.getInstance(any(ActivityManager.class))).thenReturn(mForegroundUtils); in setUp()
188 assertThat(services.mForegroundUtils).isEqualTo(mForegroundUtils); in testConstructorWhenWalletRoleFeatureIsNotEnabled()
205 assertThat(services.mForegroundUtils).isEqualTo(mForegroundUtils); in testConstructorWhenWalletRoleFeatureIsEnabled()
458 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(true); in testRegisterPreferredForegroundServiceWithSuccess()
471 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(false); in testRegisterPreferredForegroundServiceWithFailure()
484 when(mForegroundUtils.isInForeground(anyInt())).thenReturn(true); in testUnregisteredPreferredForegroundServiceInForeground_ReturnsSuccess()
497 when(mForegroundUtils.isInForeground(anyInt())).thenReturn(true); in testUnregisteredPreferredForegroundServiceInForeground_ReturnsFailure()
510 when(mForegroundUtils.isInForeground(anyInt())).thenReturn(false); in testUnregisteredPreferredForegroundServiceNotInForeground_ReturnsFailure()
DCardEmulationManagerTest.java155 private ForegroundUtils mForegroundUtils; field in CardEmulationManagerTest
1582 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(false); in testCardEmulationOverrideRoutingTable_callerNotForeground()
1605 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(true); in testCardEmulationOverrideRoutingTable_callerForegroundRouteNull()
1625 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(true); in testCardEmulationOverrideRoutingTable_callerForegroundRouteDH()
1647 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(true); in testCardEmulationOverrideRoutingTable_callerForegroundRouteeSE()
1670 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(true); in testCardEmulationOverrideRoutingTable_callerForegroundRouteSIM()
1692 when(mForegroundUtils.isInForeground(anyInt())).thenReturn(true); in testCardEmulationRecoverRoutingTable_callerForeground()
1708 when(mForegroundUtils.isInForeground(anyInt())).thenReturn(false); in testCardEmulationRecoverRoutingTable_callerNotForeground()
2265 mForegroundUtils, in createInstanceWithMockParams()
2562 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())) in testOverrideRoutingTable()
[all …]
/packages/modules/Nfc/NfcNci/src/com/android/nfc/
DNfcInjector.java85 private final ForegroundUtils mForegroundUtils; field in NfcInjector
122 mForegroundUtils = in NfcInjector()
213 return mForegroundUtils; in getForegroundUtils()
DNfcDispatcher.java125 private ForegroundUtils mForegroundUtils; field in NfcDispatcher
146 mForegroundUtils = ForegroundUtils.getInstance( in NfcDispatcher()
197 mForegroundUtils.registerUidToBackgroundCallback(mForegroundCallback, callingUid); in setForegroundDispatch()
DNfcService.java515 private ForegroundUtils mForegroundUtils; field in NfcService
1240 mForegroundUtils = mNfcInjector.getForegroundUtils(); in NfcService()
2391 if (mForegroundUtils.isInForeground(callingUid)) { in setObserveMode()
2557 if (!mForegroundUtils.isInForeground(Binder.getCallingUid())) { in setForegroundDispatch()
2699 if (!mForegroundUtils.registerUidToBackgroundCallback( in updateDiscoveryTechnology()
2830 && !mForegroundUtils.registerUidToBackgroundCallback( in setReaderMode()