mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-12 18:57:36 +01: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…
x
Reference in New Issue
Block a user