Permalink
Browse files

Make sure that the device name is not null before returning it

Bug: 30948380
Test: Pair a device
Change-Id: I1b5610c85d6e74cec89fab0db3db281938a05a8c

Signed-off-by: xyyx <xyyx@mail.ru>
  • Loading branch information...
panickeraj authored and xlxfoxxlx committed Apr 3, 2017
1 parent 7476a40 commit 9b19e887892c6bd46481c9abc906e883e28b0a0a
@@ -103,7 +103,7 @@ public CachedBluetoothDevice addDevice(LocalBluetoothAdapter adapter,
*/
public String getName(BluetoothDevice device) {
CachedBluetoothDevice cachedDevice = findDevice(device);
if (cachedDevice != null) {
if (cachedDevice != null && cachedDevice.getName() != null) {
return cachedDevice.getName();
}

0 comments on commit 9b19e88

Please sign in to comment.