mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Fix huawei debug request
This commit is contained in:
parent
3b8428e795
commit
e6aa0afa7e
@ -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";
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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>
|
@ -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>
|
Loading…
Reference in New Issue
Block a user