Loading src/com/android/bluetooth/a2dp/A2dpSinkStateMachine.java +10 −1 Original line number Diff line number Diff line Loading @@ -849,13 +849,22 @@ final class A2dpSinkStateMachine extends StateMachine { boolean okToConnect(BluetoothDevice device) { AdapterService adapterService = AdapterService.getAdapterService(); boolean ret = true; int priority = mService.getPriority(device); boolean ret = false; //check if this is an incoming connection in Quiet mode. if((adapterService == null) || ((adapterService.isQuietModeEnabled() == true) && (mTargetDevice == null))){ ret = false; } // check priority and accept or reject the connection. if priority is undefined // it is likely that our SDP has not completed and peer is initiating the // connection. Allow this connection, provided the device is bonded else if((BluetoothProfile.PRIORITY_OFF < priority) || ((BluetoothProfile.PRIORITY_UNDEFINED == priority) && (device.getBondState() != BluetoothDevice.BOND_NONE))){ ret= true; } return ret; } Loading Loading
src/com/android/bluetooth/a2dp/A2dpSinkStateMachine.java +10 −1 Original line number Diff line number Diff line Loading @@ -849,13 +849,22 @@ final class A2dpSinkStateMachine extends StateMachine { boolean okToConnect(BluetoothDevice device) { AdapterService adapterService = AdapterService.getAdapterService(); boolean ret = true; int priority = mService.getPriority(device); boolean ret = false; //check if this is an incoming connection in Quiet mode. if((adapterService == null) || ((adapterService.isQuietModeEnabled() == true) && (mTargetDevice == null))){ ret = false; } // check priority and accept or reject the connection. if priority is undefined // it is likely that our SDP has not completed and peer is initiating the // connection. Allow this connection, provided the device is bonded else if((BluetoothProfile.PRIORITY_OFF < priority) || ((BluetoothProfile.PRIORITY_UNDEFINED == priority) && (device.getBondState() != BluetoothDevice.BOND_NONE))){ ret= true; } return ret; } Loading