Code example for BluetoothAdapter

Methods: closeProfileProxy

0
    /** 
     * Stop all threads 
     */ 
    public synchronized void stop() { 
        if (D) Log.d(TAG, "stop");
        mAdapter.closeProfileProxy(BluetoothProfile.HEADSET,mBluetoothHeadset);
         
        if (mConnectThread != null) {
            mConnectThread.cancel();
            mConnectThread = null;
        } 
 
        if (mConnectedThread != null) {
            mConnectedThread.cancel();
            mConnectedThread = null;
        } 
 
        if (mSecureAcceptThread != null) {
            mSecureAcceptThread.cancel();
            mSecureAcceptThread = null;
        }