/packages/apps/Settings/tests/robotests/src/com/android/settings/nfc/ |
D | NfcPreferenceControllerTest.java | 57 private NfcAdapter mNfcAdapter; field in NfcPreferenceControllerTest 77 when(NfcAdapter.getDefaultAdapter(mContext)).thenReturn(mNfcAdapter); in setUp() 88 when(mNfcAdapter.isEnabled()).thenReturn(true); in getAvailabilityStatus_hasNfc_shouldReturnAvailable() 103 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_ON); in isNfcEnable_nfcStateNotTurning_shouldReturnTrue() 107 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF); in isNfcEnable_nfcStateNotTurning_shouldReturnTrue() 115 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_ON); in isNfcEnable_nfcStateTurning_shouldReturnFalse() 119 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_OFF); in isNfcEnable_nfcStateTurning_shouldReturnFalse() 127 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_ON); in isNfcChecked_nfcStateOn_shouldReturnTrue() 131 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_ON); in isNfcChecked_nfcStateOn_shouldReturnTrue() 138 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF); in isNfcChecked_nfcStateOff_shouldReturnFalse() [all …]
|
D | AndroidBeamPreferenceControllerTest.java | 54 private NfcAdapter mNfcAdapter; field in AndroidBeamPreferenceControllerTest 77 when(NfcAdapter.getDefaultAdapter(mContext)).thenReturn(mNfcAdapter); in setUp() 98 when(mNfcAdapter.isEnabled()).thenReturn(true); in isAvailable_hasNfc_shouldReturnTrue() 104 when(mNfcAdapter.isEnabled()).thenReturn(true); in isAvailable_noNfcFeature_shouldReturnFalse() 117 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF); in isBeamEnable_disAllowBeam_shouldReturnFalse() 128 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_ON); in isBeamEnable_nfcStateOn_shouldReturnTrue() 140 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF); in isBeamEnable_nfcStateNotOn_shouldReturnFalse() 144 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_ON); in isBeamEnable_nfcStateNotOn_shouldReturnFalse() 148 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_OFF); in isBeamEnable_nfcStateNotOn_shouldReturnFalse() 155 when(mNfcAdapter.isEnabled()).thenReturn(true); in updateNonIndexableKeys_available_shouldNotUpdate()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/nfc/ |
D | SecureNfcPreferenceController.java | 32 private final NfcAdapter mNfcAdapter; field in SecureNfcPreferenceController 37 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in SecureNfcPreferenceController() 55 return mNfcAdapter.isSecureNfcEnabled(); in isChecked() 60 return mNfcAdapter.enableSecureNfc(isChecked); in setChecked() 66 if (mNfcAdapter == null) { in getAvailabilityStatus() 69 return mNfcAdapter.isSecureNfcSupported() in getAvailabilityStatus()
|
D | NfcPreferenceController.java | 42 private final NfcAdapter mNfcAdapter; field in NfcPreferenceController 49 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in NfcPreferenceController() 67 new NfcAirplaneModeObserver(mContext, mNfcAdapter, switchPreference); in displayPreference() 73 return mNfcAdapter.isEnabled(); in isChecked() 79 mNfcAdapter.enable(); in setChecked() 81 mNfcAdapter.disable(); in setChecked() 89 return mNfcAdapter != null in getAvailabilityStatus()
|
D | AndroidBeam.java | 48 private NfcAdapter mNfcAdapter; field in AndroidBeam 58 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in onCreate() 60 if (mNfcAdapter == null || !pm.hasSystemFeature(PackageManager.FEATURE_NFC_BEAM)) in onCreate() 107 mSwitchBar.setChecked(!mBeamDisallowedByBase && mNfcAdapter.isNdefPushEnabled()); in onActivityCreated() 133 success = mNfcAdapter.enableNdefPush(); in onSwitchChanged() 135 success = mNfcAdapter.disableNdefPush(); in onSwitchChanged()
|
D | BaseNfcEnabler.java | 31 protected final NfcAdapter mNfcAdapter; field in BaseNfcEnabler 47 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in BaseNfcEnabler() 61 handleNfcStateChanged(mNfcAdapter.getAdapterState()); in resume() 73 return mNfcAdapter != null; in isNfcAvailable()
|
D | NfcAirplaneModeObserver.java | 36 private final NfcAdapter mNfcAdapter; field in NfcAirplaneModeObserver 47 mNfcAdapter = nfcAdapter; in NfcAirplaneModeObserver() 76 mNfcAdapter.disable(); in updateNfcPreference()
|
D | AndroidBeamPreferenceController.java | 34 private final NfcAdapter mNfcAdapter; field in AndroidBeamPreferenceController 39 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in AndroidBeamPreferenceController() 61 return mNfcAdapter != null in getAvailabilityStatus()
|
D | AndroidBeamEnabler.java | 65 if (mNfcAdapter.isNdefPushEnabled() && mPreference.isEnabled()) { in handleNfcStateChanged()
|
/packages/apps/Settings/src/com/android/settings/nfc/ |
D | SecureNfcPreferenceController.java | 32 private final NfcAdapter mNfcAdapter; field in SecureNfcPreferenceController 37 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in SecureNfcPreferenceController() 55 return mNfcAdapter.isSecureNfcEnabled(); in isChecked() 60 return mNfcAdapter.enableSecureNfc(isChecked); in setChecked() 66 if (mNfcAdapter == null) { in getAvailabilityStatus() 69 return mNfcAdapter.isSecureNfcSupported() in getAvailabilityStatus()
|
D | NfcPreferenceController.java | 42 private final NfcAdapter mNfcAdapter; field in NfcPreferenceController 47 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in NfcPreferenceController() 66 return mNfcAdapter.isEnabled(); in isChecked() 72 mNfcAdapter.enable(); in setChecked() 74 mNfcAdapter.disable(); in setChecked() 82 return mNfcAdapter != null in getAvailabilityStatus()
|
D | AndroidBeam.java | 48 private NfcAdapter mNfcAdapter; field in AndroidBeam 58 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in onCreate() 60 if (mNfcAdapter == null || !pm.hasSystemFeature(PackageManager.FEATURE_NFC_BEAM)) in onCreate() 107 mSwitchBar.setChecked(!mBeamDisallowedByBase && mNfcAdapter.isNdefPushEnabled()); in onActivityCreated() 133 success = mNfcAdapter.enableNdefPush(); in onSwitchChanged() 135 success = mNfcAdapter.disableNdefPush(); in onSwitchChanged()
|
D | BaseNfcEnabler.java | 31 protected final NfcAdapter mNfcAdapter; field in BaseNfcEnabler 47 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in BaseNfcEnabler() 61 handleNfcStateChanged(mNfcAdapter.getAdapterState()); in resume() 73 return mNfcAdapter != null; in isNfcAvailable()
|
D | AndroidBeamPreferenceController.java | 34 private final NfcAdapter mNfcAdapter; field in AndroidBeamPreferenceController 39 mNfcAdapter = NfcAdapter.getDefaultAdapter(context); in AndroidBeamPreferenceController() 61 return mNfcAdapter != null in getAvailabilityStatus()
|
D | AndroidBeamEnabler.java | 65 if (mNfcAdapter.isNdefPushEnabled() && mPreference.isEnabled()) { in handleNfcStateChanged()
|
/packages/apps/Nfc/src/com/android/nfc/ |
D | BeamShareActivity.java | 64 NfcAdapter mNfcAdapter; field in BeamShareActivity 72 mNfcAdapter = NfcAdapter.getDefaultAdapter(this); in onCreate() 74 if (mNfcAdapter == null) { in onCreate() 78 if (!mNfcAdapter.isEnabled()) { in onCreate() 113 if (!mNfcAdapter.isEnabled()) { in showNfcDialogAndExit() 114 mNfcAdapter.enable(); in showNfcDialogAndExit() 258 mNfcAdapter.invokeBeam(shareData); in parseShareIntentAndFinish()
|
D | NfcService.java | 299 NfcAdapterService mNfcAdapter; field in NfcService 427 mNfcAdapter = new NfcAdapterService(); in NfcService() 526 mIsSecureNfcCapable = mNfcAdapter.deviceSupportsNfcSecure(); in NfcService() 554 ServiceManager.addService(SERVICE_NAME, mNfcAdapter); in NfcService() 2350 mNfcAdapter.resumePolling(); in handleMessage() 2732 mNfcAdapter.pausePolling(mPollDelay); in dispatchTagEndpoint()
|
/packages/apps/Nfc/src/com/android/nfc/handover/ |
D | PeripheralHandoverService.java | 72 NfcAdapter mNfcAdapter; field in PeripheralHandoverService 85 mNfcAdapter.pausePolling(PAUSE_POLLING_TIMEOUT_MS); in handleMessage() 139 mNfcAdapter = NfcAdapter.getDefaultAdapter(getApplicationContext()); in onCreate() 189 mNfcAdapter.resumePolling(); in doPeripheralHandover() 211 mNfcAdapter.resumePolling(); in handleBluetoothStateChanged() 236 mNfcAdapter.resumePolling(); in onBluetoothPeripheralHandoverComplete()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/specialaccess/ |
D | DefaultPaymentSettingsPreferenceController.java | 28 private final NfcAdapter mNfcAdapter; field in DefaultPaymentSettingsPreferenceController 37 mNfcAdapter = NfcAdapter.getDefaultAdapter(mContext); in DefaultPaymentSettingsPreferenceController() 50 if (mNfcAdapter == null || !mNfcAdapter.isEnabled()) { in getAvailabilityStatus()
|
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/ |
D | DefaultPaymentSettingsPreferenceController.java | 28 private final NfcAdapter mNfcAdapter; field in DefaultPaymentSettingsPreferenceController 37 mNfcAdapter = NfcAdapter.getDefaultAdapter(mContext); in DefaultPaymentSettingsPreferenceController() 50 if (mNfcAdapter == null || !mNfcAdapter.isEnabled()) { in getAvailabilityStatus()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/ |
D | DefaultPaymentSettingsPreferenceControllerTest.java | 41 private NfcAdapter mNfcAdapter; field in DefaultPaymentSettingsPreferenceControllerTest 59 ReflectionHelpers.setField(mController, "mNfcAdapter", mNfcAdapter); in setUp() 66 when(mNfcAdapter.isEnabled()).thenReturn(true); in isAvailable_hasNfc_shouldReturnTrue()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/ |
D | AdvancedConnectedDeviceDashboardFragmentTest.java | 49 private NfcAdapter mNfcAdapter; field in AdvancedConnectedDeviceDashboardFragmentTest 82 when(NfcAdapter.getDefaultAdapter(context)).thenReturn(mNfcAdapter); in testSearchIndexProvider_correctNonIndexables() 83 when(mNfcAdapter.isSecureNfcSupported()).thenReturn(true); in testSearchIndexProvider_correctNonIndexables()
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | ActionModeHandler.java | 70 private final NfcAdapter mNfcAdapter; field in ActionModeHandler 131 mNfcAdapter = NfcAdapter.getDefaultAdapter(mActivity.getAndroidContext()); in ActionModeHandler() 312 if (mNfcAdapter != null && ApiHelper.HAS_SET_BEAM_PUSH_URIS) { in setNfcBeamPushUris() 313 mNfcAdapter.setBeamPushUrisCallback(null, mActivity); in setNfcBeamPushUris() 314 mNfcAdapter.setBeamPushUris(uris, mActivity); in setNfcBeamPushUris()
|
/packages/apps/Gallery2/src/com/android/photos/ |
D | SelectionManager.java | 36 private NfcAdapter mNfcAdapter; field in SelectionManager 47 mNfcAdapter = NfcAdapter.getDefaultAdapter(mActivity); in SelectionManager() 48 mNfcAdapter.setBeamPushUrisCallback(new CreateBeamUrisCallback() { in SelectionManager()
|