Loading android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,8 @@ static void remote_device_properties_callback(bt_status_t status, CallbackEnv sCallbackEnv(__func__); if (!sCallbackEnv.valid()) return; log::verbose("Status is: {}, Properties: {}", bt_status_text(status), log::verbose("Device: {}, Status: {}, Properties: {}", ADDRESS_TO_LOGGABLE_STR(*bd_addr), bt_status_text(status), num_properties); if (status != BT_STATUS_SUCCESS) { Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +14 −4 Original line number Diff line number Diff line Loading @@ -1282,13 +1282,21 @@ class AdapterProperties { StringBuilder sb = new StringBuilder(); for (BluetoothDevice device : mBondedDevices) { String address = device.getAddress(); BluetoothClass cod = device.getBluetoothClass(); int codInt = cod != null ? cod.getClassOfDevice() : 0; String brEdrAddress = Flags.identityAddressNullIfUnknown() ? Utils.getBrEdrAddress(device) : mService.getIdentityAddress(address); if (brEdrAddress.equals(address)) { writer.println(" " + address + " [" + dumpDeviceType(device.getType()) + "] " writer.println( " " + address + " [" + dumpDeviceType(device.getType()) + "][ 0x" + String.format("%06X", codInt) + " ] " + Utils.getName(device)); } else { sb.append( Loading @@ -1298,6 +1306,8 @@ class AdapterProperties { + brEdrAddress + " [" + dumpDeviceType(device.getType()) + "][ 0x" + String.format("%06X", codInt) + " ] " + Utils.getName(device) + "\n"); Loading android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +12 −4 Original line number Diff line number Diff line Loading @@ -862,7 +862,7 @@ public class RemoteDevices { BluetoothDevice bdDevice = getDevice(address); DeviceProperties deviceProperties; if (bdDevice == null) { debugLog("Added new device property"); debugLog("Added new device property, device=" + bdDevice); deviceProperties = addDeviceProperties(address); bdDevice = getDevice(address); } else { Loading @@ -879,7 +879,7 @@ public class RemoteDevices { val = values[j]; if (val.length > 0) { synchronized (mObject) { debugLog("Property type: " + type); debugLog("Update property, device=" + bdDevice + ", type: " + type); switch (type) { case AbstractionLayer.BT_PROPERTY_BDNAME: final String newName = new String(val); Loading Loading @@ -911,7 +911,11 @@ public class RemoteDevices { case AbstractionLayer.BT_PROPERTY_CLASS_OF_DEVICE: final int newBluetoothClass = Utils.byteArrayToInt(val); if (newBluetoothClass == deviceProperties.getBluetoothClass()) { debugLog("Skip class update for " + bdDevice); debugLog( "Skip class update, device=" + bdDevice + ", cod=0x" + Integer.toHexString(newBluetoothClass)); break; } deviceProperties.setBluetoothClass(newBluetoothClass); Loading @@ -924,7 +928,11 @@ public class RemoteDevices { intent, BLUETOOTH_CONNECT, Utils.getTempBroadcastOptions().toBundle()); debugLog("Remote class is:" + newBluetoothClass); debugLog( "Remote class update, device=" + bdDevice + ", cod=0x" + Integer.toHexString(newBluetoothClass)); break; case AbstractionLayer.BT_PROPERTY_UUIDS: final ParcelUuid[] newUuids = Utils.byteArrayToUuid(val); Loading Loading
android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -219,7 +219,8 @@ static void remote_device_properties_callback(bt_status_t status, CallbackEnv sCallbackEnv(__func__); if (!sCallbackEnv.valid()) return; log::verbose("Status is: {}, Properties: {}", bt_status_text(status), log::verbose("Device: {}, Status: {}, Properties: {}", ADDRESS_TO_LOGGABLE_STR(*bd_addr), bt_status_text(status), num_properties); if (status != BT_STATUS_SUCCESS) { Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +14 −4 Original line number Diff line number Diff line Loading @@ -1282,13 +1282,21 @@ class AdapterProperties { StringBuilder sb = new StringBuilder(); for (BluetoothDevice device : mBondedDevices) { String address = device.getAddress(); BluetoothClass cod = device.getBluetoothClass(); int codInt = cod != null ? cod.getClassOfDevice() : 0; String brEdrAddress = Flags.identityAddressNullIfUnknown() ? Utils.getBrEdrAddress(device) : mService.getIdentityAddress(address); if (brEdrAddress.equals(address)) { writer.println(" " + address + " [" + dumpDeviceType(device.getType()) + "] " writer.println( " " + address + " [" + dumpDeviceType(device.getType()) + "][ 0x" + String.format("%06X", codInt) + " ] " + Utils.getName(device)); } else { sb.append( Loading @@ -1298,6 +1306,8 @@ class AdapterProperties { + brEdrAddress + " [" + dumpDeviceType(device.getType()) + "][ 0x" + String.format("%06X", codInt) + " ] " + Utils.getName(device) + "\n"); Loading
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +12 −4 Original line number Diff line number Diff line Loading @@ -862,7 +862,7 @@ public class RemoteDevices { BluetoothDevice bdDevice = getDevice(address); DeviceProperties deviceProperties; if (bdDevice == null) { debugLog("Added new device property"); debugLog("Added new device property, device=" + bdDevice); deviceProperties = addDeviceProperties(address); bdDevice = getDevice(address); } else { Loading @@ -879,7 +879,7 @@ public class RemoteDevices { val = values[j]; if (val.length > 0) { synchronized (mObject) { debugLog("Property type: " + type); debugLog("Update property, device=" + bdDevice + ", type: " + type); switch (type) { case AbstractionLayer.BT_PROPERTY_BDNAME: final String newName = new String(val); Loading Loading @@ -911,7 +911,11 @@ public class RemoteDevices { case AbstractionLayer.BT_PROPERTY_CLASS_OF_DEVICE: final int newBluetoothClass = Utils.byteArrayToInt(val); if (newBluetoothClass == deviceProperties.getBluetoothClass()) { debugLog("Skip class update for " + bdDevice); debugLog( "Skip class update, device=" + bdDevice + ", cod=0x" + Integer.toHexString(newBluetoothClass)); break; } deviceProperties.setBluetoothClass(newBluetoothClass); Loading @@ -924,7 +928,11 @@ public class RemoteDevices { intent, BLUETOOTH_CONNECT, Utils.getTempBroadcastOptions().toBundle()); debugLog("Remote class is:" + newBluetoothClass); debugLog( "Remote class update, device=" + bdDevice + ", cod=0x" + Integer.toHexString(newBluetoothClass)); break; case AbstractionLayer.BT_PROPERTY_UUIDS: final ParcelUuid[] newUuids = Utils.byteArrayToUuid(val); Loading