From 11de66f8e4c76932870c30621b1366c07c02e097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Sat, 14 Oct 2023 21:33:03 +0100 Subject: [PATCH] Fossil/Skagen Hybrids: Fix some preference crashes on the nightly --- .../gadgetbridge/devices/qhybrid/CalibrationActivity.java | 6 ++++-- app/src/main/res/xml/devicesettings_fossilhybridhr.xml | 4 ++-- .../main/res/xml/devicesettings_fossilhybridhr_pre_fw20.xml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/CalibrationActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/CalibrationActivity.java index 87d23e2ed..8121b76b9 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/CalibrationActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/CalibrationActivity.java @@ -150,7 +150,9 @@ public class CalibrationActivity extends AbstractGBActivity { @Override protected void onDestroy() { super.onDestroy(); - localBroadcastManager.sendBroadcast(new Intent(QHybridSupport.QHYBRID_COMMAND_SAVE_CALIBRATION)); - localBroadcastManager.sendBroadcast(new Intent(QHybridSupport.QHYBRID_COMMAND_UNCONTROL)); + if (localBroadcastManager != null) { + localBroadcastManager.sendBroadcast(new Intent(QHybridSupport.QHYBRID_COMMAND_SAVE_CALIBRATION)); + localBroadcastManager.sendBroadcast(new Intent(QHybridSupport.QHYBRID_COMMAND_UNCONTROL)); + } } } diff --git a/app/src/main/res/xml/devicesettings_fossilhybridhr.xml b/app/src/main/res/xml/devicesettings_fossilhybridhr.xml index 8af465e73..2d0d49a05 100644 --- a/app/src/main/res/xml/devicesettings_fossilhybridhr.xml +++ b/app/src/main/res/xml/devicesettings_fossilhybridhr.xml @@ -119,7 +119,7 @@ android:icon="@drawable/ic_pending_actions" android:summary="@string/qhybrid_pref_summary_actions"> @@ -161,7 +161,7 @@ android:title="@string/qhybrid_title_file_management" android:summary="@string/qhybrid_summary_file_management"> diff --git a/app/src/main/res/xml/devicesettings_fossilhybridhr_pre_fw20.xml b/app/src/main/res/xml/devicesettings_fossilhybridhr_pre_fw20.xml index e8d784c06..8f749d970 100644 --- a/app/src/main/res/xml/devicesettings_fossilhybridhr_pre_fw20.xml +++ b/app/src/main/res/xml/devicesettings_fossilhybridhr_pre_fw20.xml @@ -7,7 +7,7 @@ android:icon="@drawable/ic_watch" android:summary="@string/qhybrid_watchface_configuration_old_firmware">