1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-22 06:41:06 +02:00

Fix crash when opening Gadgetbridge from the notification

intent.getAction() can be null, which would throw a NPE.
This commit is contained in:
José Rebelo 2022-10-03 15:54:31 +01:00
parent 96a8785ed5
commit 088b0098b5

View File

@ -553,7 +553,7 @@ public class ControlCenterv2 extends AppCompatActivity
}
private void handleShortcut(Intent intent) {
if(intent.getAction().equals(ACTION_CONNECT)) {
if (ACTION_CONNECT.equals(intent.getAction())) {
String btDeviceAddress = intent.getStringExtra("device");
if (btDeviceAddress!=null) {
GBDevice candidate = DeviceHelper.getInstance().findAvailableDevice(btDeviceAddress, this);