From 041e95aef6de89837c8fd3d8a03b86ec7000f767 Mon Sep 17 00:00:00 2001 From: Navid Date: Tue, 16 Jul 2024 11:50:07 -0400 Subject: [PATCH 1/3] Disable "Restart Sensor" when incompatible --- .../eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java b/app/src/main/java/com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java index 1488d74b7c..7773743958 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java @@ -1725,6 +1725,12 @@ public static void evaluateG6Settings() { UserError.Log.uel(TAG, "Dex Native mode enabled. For your device, non-native mode is either not possible or not recommended."); JoH.showNotification("Enabled Native", "Native mode enabled", null, Constants.G6_DEFAULTS_MESSAGE, false, true, false); } + if (FirmwareCapability.isTransmitterRawIncapable(getTransmitterID())) { // If we are using a G7 or G6 Firefly (mod or not) + if (Pref.getBooleanDefaultFalse("ob1_g5_restart_sensor") && !Home.get_engineering_mode()) { // If restart is enabled, not in engineering mode + Pref.setBoolean("ob1_g5_restart_sensor", false); // Disable restart + UserError.Log.uel(TAG, "Restart sensor disabled. You cannot simply restart sensor with your device."); + } + } } } } From 6676e990fc3ba4de48634c1e60ccdf0c1f0628a6 Mon Sep 17 00:00:00 2001 From: Navid Date: Wed, 17 Jul 2024 06:55:56 -0400 Subject: [PATCH 2/3] Higher level logs for better visibility --- .../com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java b/app/src/main/java/com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java index 7773743958..20cd393e50 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/g5model/Ob1G5StateMachine.java @@ -1722,13 +1722,13 @@ public static void evaluateG6Settings() { } else if (!onlyUsingNativeMode() && !Home.get_engineering_mode()) { // TODO revisit this now that there is scaling setG6Defaults(); - UserError.Log.uel(TAG, "Dex Native mode enabled. For your device, non-native mode is either not possible or not recommended."); + UserError.Log.wtf(TAG, "Dex Native mode enabled. For your device, non-native mode is either not possible or not recommended."); JoH.showNotification("Enabled Native", "Native mode enabled", null, Constants.G6_DEFAULTS_MESSAGE, false, true, false); } if (FirmwareCapability.isTransmitterRawIncapable(getTransmitterID())) { // If we are using a G7 or G6 Firefly (mod or not) if (Pref.getBooleanDefaultFalse("ob1_g5_restart_sensor") && !Home.get_engineering_mode()) { // If restart is enabled, not in engineering mode Pref.setBoolean("ob1_g5_restart_sensor", false); // Disable restart - UserError.Log.uel(TAG, "Restart sensor disabled. You cannot simply restart sensor with your device."); + UserError.Log.wtf(TAG, "Restart sensor disabled. You cannot simply restart sensor with your device."); } } } From f4907b1fccfd1a5ffbba5f615e76c40a4c24c832 Mon Sep 17 00:00:00 2001 From: Navid Date: Wed, 11 Sep 2024 16:52:08 -0400 Subject: [PATCH 3/3] Dex Share cleanup --- .../dexdrip/utils/Preferences.java | 14 +++++++------- app/src/main/res/values/strings.xml | 18 +++++++++--------- app/src/main/res/xml/pref_data_sync.xml | 10 ---------- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java b/app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java index d86da4ce00..45e9ec497a 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java @@ -1901,13 +1901,13 @@ public void onClick(DialogInterface dialog, int which) { } } - - if (!engineering_mode) { - try { - ((PreferenceScreen) findPreference("dexcom_server_upload_screen")).removePreference(findPreference("share_test_key")); - } catch (Exception e) { - // - } + // Hide receiver serial number settings + // Hiding a setting without deleting it makes it invisible to the user while it can still define the setting value. + try { + ((PreferenceScreen) findPreference("dexcom_server_upload_screen")).removePreference(findPreference("share_test_key")); + ((PreferenceScreen) findPreference("dexcom_server_upload_screen")).removePreference(findPreference("share_key")); + } catch (Exception e) { + // } //if (engineering_mode) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9d16251821..36a95847e0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -312,8 +312,8 @@ Use Excessive Wakelocks Speak Readings Extra Status Line - Dexcom Share Server Upload - Upload data to Dexcoms Servers so you can use your data with Dexcoms apps + Dex Share + Upload data to Dex Share Servers Manage Followers Manage your existing followers and invite new ones. Invite a Follower @@ -759,15 +759,15 @@ InfluxDB database name User Password - Enable this to upload to Dexcom\'s servers - Upload BG values as Dexcom Share + Enable this to upload to Dex Share servers + Upload BG values to Dex Share Disabled = Your account and follower apps are from outside the USA Enabled = Your account and follower apps are from the USA - Dexcom USA based account - Your login for Dexcom\'s Website - Dexcom Account Login - Your password for Dexcom\'s Website - Dexcom Account Password + Dex USA based account + Your login for Dex share + Dex Account Login + Your password for Dex share + Dex Account Password 10-Character Dexcom Receiver serial number 10-Character Test Mode serial number Glucose Meters diff --git a/app/src/main/res/xml/pref_data_sync.xml b/app/src/main/res/xml/pref_data_sync.xml index e5e99bcc47..8adf428449 100644 --- a/app/src/main/res/xml/pref_data_sync.xml +++ b/app/src/main/res/xml/pref_data_sync.xml @@ -259,16 +259,6 @@ android:key="share_test_key" android:shouldDisableView="true" android:title="@string/dexcom_test_mode_serial" /> - - -