Loading android/app/src/com/android/bluetooth/Utils.java +13 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,19 @@ public final class Utils { return identity != null ? identity : address; } /** * Returns the correct device address to be used for connections over BR/EDR transport. * * @param device the device for which to obtain the connection address * @param service the adapter service to make the identity address retrieval call * @return either identity address or device address in String format */ public static String getBrEdrAddress(BluetoothDevice device, AdapterService service) { final String address = device.getAddress(); String identity = service.getIdentityAddress(address); return identity != null ? identity : address; } /** * Returns the correct device address to be used for connections over BR/EDR transport. * Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +2 −2 Original line number Diff line number Diff line Loading @@ -672,7 +672,7 @@ class AdapterProperties { String currentAddress = currentDevice.getAddress(); String currentBrEdrAddress = Flags.identityAddressNullIfUnknown() ? Utils.getBrEdrAddress(currentDevice) ? Utils.getBrEdrAddress(currentDevice, mService) : mService.getIdentityAddress(currentAddress); debugLog("cleanupPrevBondRecordsFor: " + currentDevice); if (currentBrEdrAddress == null) { Loading @@ -683,7 +683,7 @@ class AdapterProperties { String address = device.getAddress(); String brEdrAddress = Flags.identityAddressNullIfUnknown() ? Utils.getBrEdrAddress(device) ? Utils.getBrEdrAddress(device, mService) : mService.getIdentityAddress(address); if (currentBrEdrAddress.equals(brEdrAddress) && !currentAddress.equals(address)) { if (mService.getNative() Loading Loading
android/app/src/com/android/bluetooth/Utils.java +13 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,19 @@ public final class Utils { return identity != null ? identity : address; } /** * Returns the correct device address to be used for connections over BR/EDR transport. * * @param device the device for which to obtain the connection address * @param service the adapter service to make the identity address retrieval call * @return either identity address or device address in String format */ public static String getBrEdrAddress(BluetoothDevice device, AdapterService service) { final String address = device.getAddress(); String identity = service.getIdentityAddress(address); return identity != null ? identity : address; } /** * Returns the correct device address to be used for connections over BR/EDR transport. * Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +2 −2 Original line number Diff line number Diff line Loading @@ -672,7 +672,7 @@ class AdapterProperties { String currentAddress = currentDevice.getAddress(); String currentBrEdrAddress = Flags.identityAddressNullIfUnknown() ? Utils.getBrEdrAddress(currentDevice) ? Utils.getBrEdrAddress(currentDevice, mService) : mService.getIdentityAddress(currentAddress); debugLog("cleanupPrevBondRecordsFor: " + currentDevice); if (currentBrEdrAddress == null) { Loading @@ -683,7 +683,7 @@ class AdapterProperties { String address = device.getAddress(); String brEdrAddress = Flags.identityAddressNullIfUnknown() ? Utils.getBrEdrAddress(device) ? Utils.getBrEdrAddress(device, mService) : mService.getIdentityAddress(address); if (currentBrEdrAddress.equals(brEdrAddress) && !currentAddress.equals(address)) { if (mService.getNative() Loading