Loading src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java +10 −4 Original line number Original line Diff line number Diff line Loading @@ -598,14 +598,20 @@ public class BluetoothRouteManager extends StateMachine { String actualAddress = matchingDevice.isPresent() String actualAddress = matchingDevice.isPresent() ? address : getActiveDeviceAddress(); ? address : getActiveDeviceAddress(); if (actualAddress == null) { Log.i(this, "No device specified and BT stack has no active device." + " Using arbitrary device"); if (deviceList.size() > 0) { actualAddress = deviceList.iterator().next().getAddress(); } else { Log.i(this, "No devices available at all. Not connecting."); return null; } } if (!matchingDevice.isPresent()) { if (!matchingDevice.isPresent()) { Log.i(this, "No device with address %s available. Using %s instead.", Log.i(this, "No device with address %s available. Using %s instead.", address, actualAddress); address, actualAddress); } } if (actualAddress == null) { Log.i(this, "No device specified and BT stack has no active device. Not connecting."); return null; } if (!connectAudio(actualAddress)) { if (!connectAudio(actualAddress)) { boolean shouldRetry = retryCount < MAX_CONNECTION_RETRIES; boolean shouldRetry = retryCount < MAX_CONNECTION_RETRIES; Log.w(LOG_TAG, "Could not connect to %s. Will %s", actualAddress, Log.w(LOG_TAG, "Could not connect to %s. Will %s", actualAddress, Loading Loading
src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java +10 −4 Original line number Original line Diff line number Diff line Loading @@ -598,14 +598,20 @@ public class BluetoothRouteManager extends StateMachine { String actualAddress = matchingDevice.isPresent() String actualAddress = matchingDevice.isPresent() ? address : getActiveDeviceAddress(); ? address : getActiveDeviceAddress(); if (actualAddress == null) { Log.i(this, "No device specified and BT stack has no active device." + " Using arbitrary device"); if (deviceList.size() > 0) { actualAddress = deviceList.iterator().next().getAddress(); } else { Log.i(this, "No devices available at all. Not connecting."); return null; } } if (!matchingDevice.isPresent()) { if (!matchingDevice.isPresent()) { Log.i(this, "No device with address %s available. Using %s instead.", Log.i(this, "No device with address %s available. Using %s instead.", address, actualAddress); address, actualAddress); } } if (actualAddress == null) { Log.i(this, "No device specified and BT stack has no active device. Not connecting."); return null; } if (!connectAudio(actualAddress)) { if (!connectAudio(actualAddress)) { boolean shouldRetry = retryCount < MAX_CONNECTION_RETRIES; boolean shouldRetry = retryCount < MAX_CONNECTION_RETRIES; Log.w(LOG_TAG, "Could not connect to %s. Will %s", actualAddress, Log.w(LOG_TAG, "Could not connect to %s. Will %s", actualAddress, Loading