Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +14 −11 Original line number Diff line number Diff line Loading @@ -392,13 +392,16 @@ public class A2dpService extends ProfileService { } // Check connectionPolicy and accept or reject the connection. int connectionPolicy = getConnectionPolicy(device); if (!Flags.donotValidateBondStateFromProfiles()) { int bondState = mAdapterService.getBondState(device); // Allow this connection only if the device is bonded. Any attempt to connect while // bonding would potentially lead to an unauthorized connection. if (bondState != BluetoothDevice.BOND_BONDED) { Log.w(TAG, "okToConnect: return false, bondState=" + bondState); return false; } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN } } if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) { if (!isOutgoingRequest) { HeadsetService headsetService = HeadsetService.getHeadsetService(); Loading android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java +10 −7 Original line number Diff line number Diff line Loading @@ -368,13 +368,16 @@ public class HearingAidService extends ProfileService { } // Check connection policy and accept or reject the connection. int connectionPolicy = getConnectionPolicy(device); if (!Flags.donotValidateBondStateFromProfiles()) { int bondState = mAdapterService.getBondState(device); // Allow this connection only if the device is bonded. Any attempt to connect while // bonding would potentially lead to an unauthorized connection. if (bondState != BluetoothDevice.BOND_BONDED) { Log.w(TAG, "okToConnect: return false, bondState=" + bondState); return false; } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN } } if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) { // Otherwise, reject the connection if connectionPolicy is not valid. Log.w(TAG, "okToConnect: return false, connectionPolicy=" + connectionPolicy); Loading android/app/src/com/android/bluetooth/hfp/HeadsetService.java +11 −8 Original line number Diff line number Diff line Loading @@ -2426,13 +2426,16 @@ public class HeadsetService extends ProfileService { } // Check connection policy and accept or reject the connection. int connectionPolicy = getConnectionPolicy(device); if (!Flags.donotValidateBondStateFromProfiles()) { int bondState = mAdapterService.getBondState(device); // Allow this connection only if the device is bonded. Any attempt to connect while // bonding would potentially lead to an unauthorized connection. if (bondState != BluetoothDevice.BOND_BONDED) { Log.w(TAG, "okToAcceptConnection: return false, bondState=" + bondState); return false; } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN } } if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) { // Otherwise, reject the connection if connection policy is not valid. if (!isOutgoingRequest) { Loading android/app/src/com/android/bluetooth/hid/HidHostService.java +11 −7 Original line number Diff line number Diff line Loading @@ -1469,13 +1469,17 @@ public class HidHostService extends ProfileService { } // Check connection policy and accept or reject the connection. int connectionPolicy = getConnectionPolicy(device); if (!Flags.donotValidateBondStateFromProfiles()) { int bondState = mAdapterService.getBondState(device); // Allow this connection only if the device is bonded. Any attempt to connect while // bonding would potentially lead to an unauthorized connection. // Allow this connection only if the device is bonded. Any attempt to connect // while bonding would potentially lead to an unauthorized connection. if (bondState != BluetoothDevice.BOND_BONDED) { Log.w(TAG, "okToConnect: return false, device=" + device + " bondState=" + bondState); Log.w(TAG, "okToConnect: return false, device=" + device + " bondState=" + bondState); return false; } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN } } if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) { // Otherwise, reject the connection if connectionPolicy is not valid. Log.w( Loading flags/btif_dm.aconfig +0 −10 Original line number Diff line number Diff line package: "com.android.bluetooth.flags" container: "com.android.btservices" flag { name: "do_not_replace_existing_cod_with_uncategorized_cod" namespace: "bluetooth" description: "Don't replace an existing stored class of device with one determined to be uncategorized" bug: "335909751" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "read_model_num_fix" namespace: "bluetooth" Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +14 −11 Original line number Diff line number Diff line Loading @@ -392,13 +392,16 @@ public class A2dpService extends ProfileService { } // Check connectionPolicy and accept or reject the connection. int connectionPolicy = getConnectionPolicy(device); if (!Flags.donotValidateBondStateFromProfiles()) { int bondState = mAdapterService.getBondState(device); // Allow this connection only if the device is bonded. Any attempt to connect while // bonding would potentially lead to an unauthorized connection. if (bondState != BluetoothDevice.BOND_BONDED) { Log.w(TAG, "okToConnect: return false, bondState=" + bondState); return false; } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN } } if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) { if (!isOutgoingRequest) { HeadsetService headsetService = HeadsetService.getHeadsetService(); Loading
android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java +10 −7 Original line number Diff line number Diff line Loading @@ -368,13 +368,16 @@ public class HearingAidService extends ProfileService { } // Check connection policy and accept or reject the connection. int connectionPolicy = getConnectionPolicy(device); if (!Flags.donotValidateBondStateFromProfiles()) { int bondState = mAdapterService.getBondState(device); // Allow this connection only if the device is bonded. Any attempt to connect while // bonding would potentially lead to an unauthorized connection. if (bondState != BluetoothDevice.BOND_BONDED) { Log.w(TAG, "okToConnect: return false, bondState=" + bondState); return false; } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN } } if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) { // Otherwise, reject the connection if connectionPolicy is not valid. Log.w(TAG, "okToConnect: return false, connectionPolicy=" + connectionPolicy); Loading
android/app/src/com/android/bluetooth/hfp/HeadsetService.java +11 −8 Original line number Diff line number Diff line Loading @@ -2426,13 +2426,16 @@ public class HeadsetService extends ProfileService { } // Check connection policy and accept or reject the connection. int connectionPolicy = getConnectionPolicy(device); if (!Flags.donotValidateBondStateFromProfiles()) { int bondState = mAdapterService.getBondState(device); // Allow this connection only if the device is bonded. Any attempt to connect while // bonding would potentially lead to an unauthorized connection. if (bondState != BluetoothDevice.BOND_BONDED) { Log.w(TAG, "okToAcceptConnection: return false, bondState=" + bondState); return false; } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN } } if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) { // Otherwise, reject the connection if connection policy is not valid. if (!isOutgoingRequest) { Loading
android/app/src/com/android/bluetooth/hid/HidHostService.java +11 −7 Original line number Diff line number Diff line Loading @@ -1469,13 +1469,17 @@ public class HidHostService extends ProfileService { } // Check connection policy and accept or reject the connection. int connectionPolicy = getConnectionPolicy(device); if (!Flags.donotValidateBondStateFromProfiles()) { int bondState = mAdapterService.getBondState(device); // Allow this connection only if the device is bonded. Any attempt to connect while // bonding would potentially lead to an unauthorized connection. // Allow this connection only if the device is bonded. Any attempt to connect // while bonding would potentially lead to an unauthorized connection. if (bondState != BluetoothDevice.BOND_BONDED) { Log.w(TAG, "okToConnect: return false, device=" + device + " bondState=" + bondState); Log.w(TAG, "okToConnect: return false, device=" + device + " bondState=" + bondState); return false; } else if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN } } if (connectionPolicy != BluetoothProfile.CONNECTION_POLICY_UNKNOWN && connectionPolicy != BluetoothProfile.CONNECTION_POLICY_ALLOWED) { // Otherwise, reject the connection if connectionPolicy is not valid. Log.w( Loading
flags/btif_dm.aconfig +0 −10 Original line number Diff line number Diff line package: "com.android.bluetooth.flags" container: "com.android.btservices" flag { name: "do_not_replace_existing_cod_with_uncategorized_cod" namespace: "bluetooth" description: "Don't replace an existing stored class of device with one determined to be uncategorized" bug: "335909751" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "read_model_num_fix" namespace: "bluetooth" Loading