Home
last modified time | relevance | path

Searched refs:STATE_ON (Results 1 – 25 of 96) sorted by relevance

1234

/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
DAdapterServiceTest.java193 Assert.assertFalse(mAdapterService.getState() == BluetoothAdapter.STATE_ON); in doEnable()
206 mAdapterService.onProfileServiceStateChanged(mMockGattService, BluetoothAdapter.STATE_ON); in doEnable()
222 mAdapterService.onProfileServiceStateChanged(mMockService, BluetoothAdapter.STATE_ON); in doEnable()
223 mAdapterService.onProfileServiceStateChanged(mMockService2, BluetoothAdapter.STATE_ON); in doEnable()
226 verifyStateChange(BluetoothAdapter.STATE_TURNING_ON, BluetoothAdapter.STATE_ON, in doEnable()
234 Assert.assertTrue(mAdapterService.getState() == BluetoothAdapter.STATE_ON); in doEnable()
238 Assert.assertTrue(mAdapterService.getState() == BluetoothAdapter.STATE_ON); in doDisable()
244 verifyStateChange(BluetoothAdapter.STATE_ON, BluetoothAdapter.STATE_TURNING_OFF, in doDisable()
271 Assert.assertFalse(mAdapterService.getState() == BluetoothAdapter.STATE_ON); in doDisable()
325 Assert.assertFalse(mAdapterService.getState() == BluetoothAdapter.STATE_ON); in testGattStartTimeout()
[all …]
DProfileServiceTest.java125 setAllProfilesState(BluetoothAdapter.STATE_ON, 1); in testEnableDisable()
135 setAllProfilesState(BluetoothAdapter.STATE_ON, 1); in testEnableDisableTwice()
137 setAllProfilesState(BluetoothAdapter.STATE_ON, 2); in testEnableDisableTwice()
148 setProfileState(profile, BluetoothAdapter.STATE_ON); in testEnableDisableInterleaved()
156 starts.capture(), eq(BluetoothAdapter.STATE_ON)); in testEnableDisableInterleaved()
180 setProfileState(profile, BluetoothAdapter.STATE_ON); in testRepeatedEnableDisableSingly()
185 start.capture(), eq(BluetoothAdapter.STATE_ON)); in testRepeatedEnableDisableSingly()
206 setProfileState(profile, BluetoothAdapter.STATE_ON); in testProfileServiceRegisterUnregister()
DPhonePolicyTest.java147 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testAdapterOnAutoConnect()
163 intent.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_ON); in testAdapterOnAutoConnect()
177 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testDisconnectNoAutoConnect()
278 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testReconnectOnPartialConnect()
319 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testReconnectOnPartialConnect_PreviousPartialFail()
414 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testAutoConnectMultipleDevices()
496 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testSetConnectionPolicyMultipleDevices()
608 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testNoReconnectOnNoConnect()
658 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testNoReconnectOnNoConnect_MultiDevice()
713 when(mAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testReconnectOnPartialConnect_MultiDevice()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/
DBluetoothSettingsFragmentTest.java20 import static android.bluetooth.BluetoothAdapter.STATE_ON;
97 getShadowBluetoothAdapter().setState(STATE_ON); in onStart_initializesSwitchState()
123 getShadowBluetoothAdapter().setState(STATE_ON); in switchCheckedOff_disablesAdapter()
155 sendStateChangedIntent(STATE_ON); in stateChanged_on_setsSwitchChecked()
164 sendStateChangedIntent(STATE_ON); in stateChanged_on_setsSwitchEnabled()
175 sendStateChangedIntent(STATE_ON); in stateChanged_on_userRestricted_setsSwitchDisabled()
DBluetoothRequestPermissionActivityTest.java135 getShadowLocalBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in onCreate_bluetoothOn_requestDisableIntent_startsDialog()
159 getShadowLocalBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in onCreate_bluetoothOn_requestDiscoverableIntent_startsDialog()
183 getShadowLocalBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in onCreate_bluetoothOn_requestEnableIntent_noDialog()
194 getShadowLocalBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in onPositiveClick_disableDialog_disables()
209 getShadowLocalBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in onPositiveClick_discoverableDialog_scanModeSet()
DBluetoothPreferenceControllerTest.java130 getShadowBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in getAvailabilityStatus_available()
141 getShadowBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in onStart_registersEventListener()
152 getShadowBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in onStop_unregistersEventListener()
DLocalRenameDialogFragmentTest.java20 import static android.bluetooth.BluetoothAdapter.STATE_ON;
57 getShadowBluetoothAdapter().setState(STATE_ON); in setUp()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowBluetoothAdapter.java20 import static android.bluetooth.BluetoothAdapter.STATE_ON;
67 if (getState() != STATE_ON) { in setName()
76 if (getState() != STATE_ON) { in getScanMode()
84 if (getState() != STATE_ON) { in setScanMode()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/bluetooth/
DRequestPermissionActivity.java92 case BluetoothAdapter.STATE_ON: in onCreate()
134 case BluetoothAdapter.STATE_ON: { in onCreate()
206 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onActivityResult()
384 if (currentState == BluetoothAdapter.STATE_ON) { in onReceive()
DBluetoothPairingDetail.java149 case BluetoothAdapter.STATE_ON: in updateContent()
171 if (bluetoothState == BluetoothAdapter.STATE_ON) { in onBluetoothStateChanged()
/packages/apps/Settings/src/com/android/settings/bluetooth/
DRequestPermissionActivity.java92 case BluetoothAdapter.STATE_ON: in onCreate()
134 case BluetoothAdapter.STATE_ON: { in onCreate()
206 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onActivityResult()
384 if (currentState == BluetoothAdapter.STATE_ON) { in onReceive()
DBluetoothPairingDetail.java149 case BluetoothAdapter.STATE_ON: in updateContent()
171 if (bluetoothState == BluetoothAdapter.STATE_ON) { in onBluetoothStateChanged()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DBluetoothAdapterHelper.java140 waitForAdapterState(BluetoothAdapter.STATE_ON); in waitForAdapterOn()
182 forceAdapterState(BluetoothAdapter.STATE_ON, true); in forceAdapterOn()
206 if (desiredState == BluetoothAdapter.STATE_ON) { in forceAdapterState()
/packages/services/Telecomm/src/com/android/server/telecom/
DInCallTonePlayer.java179 private static final int STATE_ON = 1; field in InCallTonePlayer
387 mState = STATE_ON; in playToneGeneratorTone()
414 mState = STATE_ON; in playMediaTone()
485 if (mState == STATE_ON) { in stopTone()
/packages/services/Car/service/src/com/android/car/
DBluetoothDeviceConnectionPolicy.java68 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) {
114 if (state == BluetoothAdapter.STATE_ON) { in onReceive()
183 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in init()
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DBluetoothRequestPermissionActivity.java108 case BluetoothAdapter.STATE_ON: in onCreate()
127 case BluetoothAdapter.STATE_ON: in onCreate()
151 case BluetoothAdapter.STATE_ON: in onCreate()
326 int desiredState = BluetoothAdapter.STATE_ON; in onConfirmEnableBluetooth()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothPairingDetailTest.java128 mFragment.updateContent(BluetoothAdapter.STATE_ON); in updateContent_stateOn_addDevices()
171 mFragment.updateContent(BluetoothAdapter.STATE_ON); in onScanningStateChanged_restartScanAfterInitialScanning()
215 mFragment.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in onBluetoothStateChanged_whenTurnedOnBTShowToast()
DBluetoothEnablerTest.java200 mShadowBluetoothAdapter.setState(BluetoothAdapter.STATE_ON); in startWithBluetoothOn_switchIsOn()
212 mShadowBluetoothAdapter.setState(BluetoothAdapter.STATE_ON); in bluetoothTurnsOff_switchTurnsOff()
247 on.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_ON); in bluetoothTurnsOn_switchTurnsOn()
DBluetoothSummaryUpdaterTest.java146 mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in onBluetoothStateChanged_btEnabled_connected_shouldSendConnectedSummary()
161 mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in onBluetoothStateChanged_btEnabled_connectedMisMatch_shouldSendNotConnected()
209 mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in onBluetoothStateChanged_ConnectedDisabledEnabled_shouldSendDisconnectedSummary()
/packages/apps/Settings/tests/robotests/src/com/android/settings/nfc/
DNfcPreferenceControllerTest.java103 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_ON); in isNfcEnable_nfcStateNotTurning_shouldReturnTrue()
127 when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_ON); in isNfcChecked_nfcStateOn_shouldReturnTrue()
265 triggerIntent.putExtra(NfcAdapter.EXTRA_ADAPTER_STATE, NfcAdapter.STATE_ON); in ncfSliceWorker_nfcBroadcast_nfcOn_sliceUpdates()
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
DProfileService.java150 } else if (state == BluetoothAdapter.STATE_ON) { in onStartCommand()
268 mAdapterService.onProfileServiceStateChanged(this, BluetoothAdapter.STATE_ON); in doStart()
DPhonePolicy.java138 if (newState == BluetoothAdapter.STATE_ON) {
397 if (mAdapterService.getState() != BluetoothAdapter.STATE_ON) { in autoConnect()
472 if (mAdapterService.getState() != BluetoothAdapter.STATE_ON) { in processConnectOtherProfiles()
/packages/apps/Bluetooth/src/com/android/bluetooth/
DObexServerSockets.java151 != BluetoothAdapter.STATE_ON)) { in create()
235 if ((mAdapter != null) && (mAdapter.getState() == BluetoothAdapter.STATE_ON)) { in onAcceptFailed()
/packages/apps/Settings/src/com/android/settings/network/
DTetherPreferenceController.java129 mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onCreate()
210 && mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in updateSummary()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/
DTetherPreferenceController.java129 mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onCreate()
210 && mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in updateSummary()

1234