mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 13:26:50 +01:00
Based on Play Store crash reports and stack traces, add a null check to try and avoid crashes
This commit is contained in:
parent
82778c46a5
commit
788cb15500
@ -82,6 +82,7 @@ public class DeviceManager {
|
|||||||
case BLUETOOTH_DEVICE_ACTION_ALIAS_CHANGED:
|
case BLUETOOTH_DEVICE_ACTION_ALIAS_CHANGED:
|
||||||
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
||||||
String newName = intent.getStringExtra(BluetoothDevice.EXTRA_NAME);
|
String newName = intent.getStringExtra(BluetoothDevice.EXTRA_NAME);
|
||||||
|
if (device!=null)
|
||||||
updateDeviceName(device, newName);
|
updateDeviceName(device, newName);
|
||||||
break;
|
break;
|
||||||
case GBDevice.ACTION_DEVICE_CHANGED:
|
case GBDevice.ACTION_DEVICE_CHANGED:
|
||||||
|
Loading…
Reference in New Issue
Block a user