1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-02 11:26:09 +02:00

[Huawei] Enable sleep detection

This commit is contained in:
Damien 'Psolyca' Gaignon 2024-04-16 23:33:46 +02:00
parent c0d0b4dfbe
commit 0b075409f1
No known key found for this signature in database
GPG Key ID: 9E9404E5D9E11843
2 changed files with 3 additions and 2 deletions

View File

@ -497,7 +497,6 @@ public class HuaweiSupportProvider {
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putString(DeviceSettingsPreferenceConst.PREF_ACTIVATE_DISPLAY_ON_LIFT, "p_on");
editor.apply();
setTrusleep();
}
onSetTime();
getBatteryLevel();
@ -720,6 +719,9 @@ public class HuaweiSupportProvider {
if (getHuaweiCoordinator().supportsActivityReminder()) {
setActivityReminder();
}
if (getHuaweiCoordinator().supportsTruSleep()) {
setTrusleep();
}
if (getHuaweiCoordinator().supportsPromptPushMessage() && getProtocolVersion() == 2) {
GetNotificationCapabilitiesRequest getNotificationCapabilitiesReq = new GetNotificationCapabilitiesRequest(this);
getNotificationCapabilitiesReq.doPerform();

View File

@ -8,7 +8,6 @@
android:summary="@string/huawei_trusleep_summary_light">
<SwitchPreferenceCompat
android:enabled="false"
android:icon="@drawable/ic_access_time"
android:defaultValue="false"
android:key="trusleep"