Lines Matching defs:headset
50 * Provides Bluetooth Headset and Handsfree profile, as a service in
171 HeadsetBase headset;
176 headset = new HeadsetBase(mPowerManager, mAdapter,
180 headset.disconnect();
200 // headset connecting us, lets join
213 // different headset, ignoring
217 headset = new HeadsetBase(mPowerManager, mAdapter,
221 headset.disconnect();
225 // Incoming and Outgoing connections to the same headset.
249 HeadsetBase headset = new HeadsetBase(mPowerManager, mAdapter,
251 headset.disconnect();
328 // Bluetooth Headset Connect
355 private int waitForConnect(HeadsetBase headset) {
360 result = headset.waitForAsyncConnect(500, mConnectedStatusHandler);
362 headset.disconnect();
374 HeadsetBase headset = new HeadsetBase(mPowerManager, mAdapter,
377 int result = waitForConnect(headset);
395 result = waitForConnect(headset);
403 headset.disconnect();
407 Log.w(TAG, "headset.waitForAsyncConnect() error: " + result);
415 mConnectingStatusHandler.obtainMessage(RFCOMM_CONNECTED, headset).sendToTarget();
441 HeadsetBase headset = (HeadsetBase)msg.obj;
444 mRemoteHeadsets.get(device).mHeadset = headset;
445 mBtHandsfree.connectHeadset(headset, mRemoteHeadsets.get(device).mHeadsetType);
474 " Headset state" + prevState + " -> " + state);
476 // Headset is disconnecting, stop the parser.
497 mBluetoothService.sendConnectionStateChange(device, BluetoothProfile.HEADSET,
590 BluetoothRemoteHeadset headset = mRemoteHeadsets.get(device);
591 if (headset == null) {
594 return headset.mState;
629 BluetoothRemoteHeadset headset = mRemoteHeadsets.get(device);
630 if (headset == null ||
631 headset.mState == BluetoothProfile.STATE_DISCONNECTED ||
632 headset.mState == BluetoothProfile.STATE_DISCONNECTING) {
721 HeadsetBase headset;
725 headset = new HeadsetBase(mPowerManager, mAdapter,
730 mRemoteHeadsets.get(device).mHeadset = headset;
732 mConnectingStatusHandler.obtainMessage(RFCOMM_CONNECTED, headset).sendToTarget();
765 BluetoothRemoteHeadset headset = mRemoteHeadsets.get(device);
766 if (headset != null) {
767 IncomingConnectionInfo info = headset.mIncomingInfo;
770 Log.e(TAG, "Error no record of remote headset");
778 headset;
781 Log.e(TAG, "Cached Headset is Null in acceptIncomingConnect");
785 headset = new HeadsetBase(mPowerManager, mAdapter,
792 cachedHeadset.mHeadset = headset;
793 mBtHandsfree.connectHeadset(headset, cachedHeadset.mHeadsetType);
820 BluetoothRemoteHeadset headset = new BluetoothRemoteHeadset();
821 mRemoteHeadsets.put(device, headset);
838 " with headset " + currDevice);
850 // Send a dummy battery level message to force headset
859 HeadsetBase headset = remoteHeadset.mHeadset;
861 headset.sendURC("+CIEV: 7,3");
864 if (headset != null) {
865 headset.disconnect();
866 headset = null;
901 BluetoothRemoteHeadset headset = mRemoteHeadsets.get(device);
902 if (headset == null) return BluetoothHeadset.STATE_AUDIO_DISCONNECTED;
904 return headset.mAudioState;