1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-28 11:35:48 +01:00

Avoid NPEs when BluetoothDevice.getName() returns null

This commit is contained in:
cpfeiffer 2016-07-05 21:03:30 +02:00
parent 9881b6c281
commit 9ae69eac55

View File

@ -59,7 +59,7 @@ public class GBDevice implements Parcelable {
public GBDevice(String address, String name, DeviceType deviceType) {
mAddress = address;
mName = name;
mName = (name != null) ? name : mAddress;
mDeviceType = deviceType;
validate();
}