Home
last modified time | relevance | path

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

/packages/apps/Nfc/tests/unit/src/com/android/nfc/
DForegroundUtilsTest.java48 private ForegroundUtils mForegroundUtils; field in ForegroundUtilsTest
68 () -> mForegroundUtils = new ForegroundUtils(mActivityManager)); in setUp()
69 Assert.assertNotNull(mForegroundUtils); in setUp()
86 boolean isRegistered = mForegroundUtils.registerUidToBackgroundCallback(callback, 0); in testRegisterUidToBackgroundCallback()
96 boolean isInForegroundTrue = mForegroundUtils.isInForeground(0); in testIsInForeground()
98 isInForegroundTrue = mForegroundUtils.isInForeground(10); in testIsInForeground()
106 mForegroundUtils.clearForegroundlist(); in testOnUidImportance()
107 mForegroundUtils.onUidImportance(0, in testOnUidImportance()
109 List<Integer> uids = mForegroundUtils.getForegroundUids(); in testOnUidImportance()
112 mForegroundUtils.onUidImportance(0, in testOnUidImportance()
[all …]
DEnableNfcFServiceTest.java59 private ForegroundUtils mForegroundUtils; field in EnableNfcFServiceTest
84 mForegroundUtils = mock(ForegroundUtils.class); in setUp()
86 mockContext.getSystemService(ActivityManager.class))).thenReturn(mForegroundUtils); in setUp()
146 when(mForegroundUtils.registerUidToBackgroundCallback(mEnabledNfcFServices, 1)).thenReturn( in testRegisterEnabledForegroundService()
/packages/apps/Nfc/src/com/android/nfc/cardemulation/
DEnabledNfcFServices.java44 final ForegroundUtils mForegroundUtils; field in EnabledNfcFServices
68 mForegroundUtils = ForegroundUtils.getInstance( in EnabledNfcFServices()
141 if (mForegroundUtils.registerUidToBackgroundCallback(this, callingUid)) { in registerEnabledForegroundService()
174 if (mForegroundUtils.isInForeground(callingUid)) { in unregisteredEnabledForegroundService()
DPreferredServices.java79 final ForegroundUtils mForegroundUtils; field in PreferredServices
123 mForegroundUtils = ForegroundUtils.getInstance( in PreferredServices()
411 if (mForegroundUtils.registerUidToBackgroundCallback(this, callingUid)) { in registerPreferredForegroundService()
446 if (mForegroundUtils.isInForeground(callingUid)) { in unregisteredPreferredForegroundService()
DCardEmulationManager.java119 final ForegroundUtils mForegroundUtils; field in CardEmulationManager
131 mForegroundUtils = ForegroundUtils.getInstance( in CardEmulationManager()
170 mForegroundUtils = foregroundUtils; in CardEmulationManager()
861 if (!mForegroundUtils in overrideRoutingTable()
886 if (!mForegroundUtils.isInForeground(Binder.getCallingUid())) { in recoverRoutingTable()
/packages/apps/Nfc/tests/unit/src/com/android/nfc/cardemulation/
DPreferredServicesTest.java83 private ForegroundUtils mForegroundUtils; field in PreferredServicesTest
147 when(ForegroundUtils.getInstance(any(ActivityManager.class))).thenReturn(mForegroundUtils); in setUp()
184 assertThat(services.mForegroundUtils).isEqualTo(mForegroundUtils); in testConstructorWhenWalletRoleFeatureIsNotEnabled()
201 assertThat(services.mForegroundUtils).isEqualTo(mForegroundUtils); in testConstructorWhenWalletRoleFeatureIsEnabled()
428 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(true); in testRegisterPreferredForegroundServiceWithSuccess()
441 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())).thenReturn(false); in testRegisterPreferredForegroundServiceWithFailure()
454 when(mForegroundUtils.isInForeground(anyInt())).thenReturn(true); in testUnregisteredPreferredForegroundServiceInForeground_ReturnsSuccess()
467 when(mForegroundUtils.isInForeground(anyInt())).thenReturn(true); in testUnregisteredPreferredForegroundServiceInForeground_ReturnsFailure()
480 when(mForegroundUtils.isInForeground(anyInt())).thenReturn(false); in testUnregisteredPreferredForegroundServiceNotInForeground_ReturnsFailure()
DCardEmulationManagerTest.java95 private ForegroundUtils mForegroundUtils; field in CardEmulationManagerTest
1354 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())) in testCardEmulationOverrideRoutingTable_callerNotForeground()
1373 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())) in testCardEmulationOverrideRoutingTable_callerForegroundRouteNull()
1393 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())) in testCardEmulationOverrideRoutingTable_callerForegroundRouteDH()
1415 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())) in testCardEmulationOverrideRoutingTable_callerForegroundRouteeSE()
1437 when(mForegroundUtils.registerUidToBackgroundCallback(any(), anyInt())) in testCardEmulationOverrideRoutingTable_callerForegroundRouteSIM()
1459 when(mForegroundUtils.isInForeground(anyInt())) in testCardEmulationRecoverRoutingTable_callerForeground()
1478 when(mForegroundUtils.isInForeground(anyInt())) in testCardEmulationRecoverRoutingTable_callerNotForeground()
2026 return new CardEmulationManager(mContext, mForegroundUtils, mWalletRoleObserver, in createInstanceWithMockParams()
/packages/apps/Nfc/src/com/android/nfc/
DNfcInjector.java77 private final ForegroundUtils mForegroundUtils; field in NfcInjector
103 mForegroundUtils = in NfcInjector()
175 return mForegroundUtils; in getForegroundUtils()
DNfcDispatcher.java111 private ForegroundUtils mForegroundUtils; field in NfcDispatcher
128 mForegroundUtils = ForegroundUtils.getInstance( in NfcDispatcher()
171 mForegroundUtils.registerUidToBackgroundCallback(mForegroundCallback, callingUid); in setForegroundDispatch()
DNfcService.java446 private ForegroundUtils mForegroundUtils; field in NfcService
816 mForegroundUtils = mNfcInjector.getForegroundUtils(); in NfcService()
1779 if (mForegroundUtils.isInForeground(callingUid)) { in setObserveMode()
1907 if (!mForegroundUtils.isInForeground(Binder.getCallingUid())) { in setForegroundDispatch()
2044 if (!mForegroundUtils.registerUidToBackgroundCallback( in updateDiscoveryTechnology()
2138 && !mForegroundUtils.registerUidToBackgroundCallback( in setReaderMode()