Code example for BluetoothAdapter

Methods: closeProfileProxy

0
                        // change orientation or close with headset still turns on. 
                         mBluetoothHeadset.stopVoiceRecognition(mConnectedHeadset);
                         unregisterReceiver(mHeadsetBroadcastReceiver);
                         mCountDown.cancel();
                    } 
                    mBluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, mBluetoothHeadset);
                } 
                Log.d(TAG, "onDestroy"); //$NON-NLS-1$
            } 
 
            @SuppressLint("NewApi") 
			protected BluetoothProfile.ServiceListener mHeadsetProfileListener = new BluetoothProfile.ServiceListener()
            { 
 
                /** 
                 * This method is never called, even when we closeProfileProxy on onPause. 
                 * When or will it ever be called??? 
                 */ 
                @Override 
                public void onServiceDisconnected(int profile) 
                {