mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Fix crash in LiveActivityFragment that was introduced by 2398dd0fb
This commit is contained in:
parent
f9f3e8849b
commit
2618d54f94
@ -367,8 +367,15 @@ public class LiveActivityFragment extends AbstractActivityChartFragment<ChartsDa
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
GBApplication.deviceService(getChartsHost().getDevice()).onEnableRealtimeSteps(enable);
|
||||
GBApplication.deviceService(getChartsHost().getDevice()).onEnableRealtimeHeartRateMeasurement(enable);
|
||||
} catch (IllegalStateException e) {
|
||||
LOG.error("IllegalStateException catched, setting realtime tracking globally to {}", enable);
|
||||
GBApplication.deviceService().onEnableRealtimeSteps(enable);
|
||||
GBApplication.deviceService().onEnableRealtimeHeartRateMeasurement(enable);
|
||||
}
|
||||
|
||||
if (enable) {
|
||||
if (getActivity() != null) {
|
||||
getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
Loading…
Reference in New Issue
Block a user