1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-09-27 16:56:57 +02:00

Fix huawei debug request

This commit is contained in:
Martin.JM 2024-01-17 14:55:13 +01:00
parent 3b8428e795
commit e6aa0afa7e
5 changed files with 1 additions and 25 deletions

View File

@ -67,7 +67,6 @@ public final class HuaweiConstants {
public static final String PREF_HUAWEI_WORKMODE = "workmode";
public static final String PREF_HUAWEI_TRUSLEEP = "trusleep";
public static final String PREF_HUAWEI_DND_LIFT_WRIST_TYPE = "dnd_lift_wrist_type"; // SharedPref for 0x01 0x1D
public static final String PREF_HUAWEI_DEBUG = "debug_huawei";
public static final String PREF_HUAWEI_DEBUG_REQUEST = "debug_huawei_request";
public static final String PKG_NAME = "com.huawei.devicegroupmanage";

View File

@ -37,7 +37,6 @@ import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
import nodomain.freeyourgadget.gadgetbridge.util.XTimePreference;
import static nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst.*;
import static nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants.PREF_HUAWEI_DEBUG;
import static nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants.PREF_HUAWEI_DEBUG_REQUEST;
import static nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants.PREF_HUAWEI_TRUSLEEP;
import static nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiConstants.PREF_HUAWEI_WORKMODE;
@ -111,7 +110,6 @@ public class HuaweiSettingsCustomizer implements DeviceSpecificSettingsCustomize
handler.addPreferenceHandlerFor(PREF_HUAWEI_WORKMODE);
handler.addPreferenceHandlerFor(PREF_HUAWEI_TRUSLEEP);
handler.addPreferenceHandlerFor(PREF_HUAWEI_DEBUG);
handler.addPreferenceHandlerFor(PREF_HUAWEI_DEBUG_REQUEST);
// Only supported on specific devices

View File

@ -38,7 +38,7 @@ public class DebugRequest extends Request {
protected List<byte[]> createRequest() throws RequestCreationException {
String debugString = GBApplication
.getDeviceSpecificSharedPrefs(supportProvider.getDevice().getAddress())
.getString(HuaweiConstants.PREF_HUAWEI_DEBUG, "1,1,false,(1,/),(2,/),(3,/),(4,/)");
.getString(HuaweiConstants.PREF_HUAWEI_DEBUG_REQUEST, "1,1,false,(1,/),(2,/),(3,/),(4,/)");
HuaweiPacket packet = parseDebugString(debugString);
try {
return packet.serialize();

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<EditTextPreference
android:icon="@drawable/ic_warning"
android:key="debug_huawei"
android:maxLength="16"
android:summary="@string/pref_summary_debug"
android:title="@string/pref_title_debug" />
</androidx.preference.PreferenceScreen>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="huawei_reparse_workout_data"
android:title="@string/huawei_reparse_workout_data"
android:summary="@string/huawei_reparse_workout_data_description" />
</PreferenceScreen>