mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-02-13 19:05:39 +01:00
Fix NPE on activity card for devices that do not report steps
This commit is contained in:
parent
84ac168494
commit
0fe05fe9b8
@ -264,7 +264,7 @@ public class DevicesFragment extends Fragment {
|
||||
private void updateDevice(final DBHandler db, final GBDevice gbDevice) {
|
||||
final DeviceCoordinator coordinator = gbDevice.getDeviceCoordinator();
|
||||
final boolean showActivityCard = GBApplication.getDevicePrefs(gbDevice).getBoolean(DeviceSettingsPreferenceConst.PREFS_ACTIVITY_IN_DEVICE_CARD, true);
|
||||
if (coordinator.supportsActivityTracking() && showActivityCard) {
|
||||
if ((coordinator.supportsStepCounter() || coordinator.supportsSleepMeasurement()) && showActivityCard) {
|
||||
final DailyTotals stepsAndSleepData = getSteps(gbDevice, db);
|
||||
deviceActivityHashMap.put(gbDevice.getAddress(), stepsAndSleepData);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user