mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-01 12:05:37 +02:00
Fix crash on manual heart rate
This commit is contained in:
parent
5a6a39d059
commit
c72420281a
@ -65,7 +65,7 @@ public class HeartRateDialog extends Dialog {
|
||||
setMeasurementResults(intent.getSerializableExtra(DeviceService.EXTRA_REALTIME_SAMPLE));
|
||||
break;
|
||||
default:
|
||||
LOG.info("ignoring intent action " + intent.getAction());
|
||||
LOG.info("ignoring intent action {}", intent.getAction());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -132,12 +132,8 @@ public class HeartRateDialog extends Dialog {
|
||||
heart_rate_dialog_results_layout.setVisibility(View.GONE);
|
||||
heart_rate_dialog_loading_layout.setVisibility(View.VISIBLE);
|
||||
|
||||
setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialogInterface) {
|
||||
setOnCancelListener(dialogInterface -> {
|
||||
LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(mReceiver);
|
||||
getContext().unregisterReceiver(mReceiver);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user