Merge "Make sure that the device name is not null before returning it"
This commit is contained in:
@@ -103,7 +103,7 @@ public final class CachedBluetoothDeviceManager {
|
||||
*/
|
||||
public String getName(BluetoothDevice device) {
|
||||
CachedBluetoothDevice cachedDevice = findDevice(device);
|
||||
if (cachedDevice != null) {
|
||||
if (cachedDevice != null && cachedDevice.getName() != null) {
|
||||
return cachedDevice.getName();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user