mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-19 23:27:48 +01:00
[Huawei] Enable sleep detection
This commit is contained in:
parent
408f4b75dd
commit
c1e0b1fcd5
@ -492,7 +492,6 @@ public class HuaweiSupportProvider {
|
|||||||
SharedPreferences.Editor editor = sharedPrefs.edit();
|
SharedPreferences.Editor editor = sharedPrefs.edit();
|
||||||
editor.putString(DeviceSettingsPreferenceConst.PREF_ACTIVATE_DISPLAY_ON_LIFT, "p_on");
|
editor.putString(DeviceSettingsPreferenceConst.PREF_ACTIVATE_DISPLAY_ON_LIFT, "p_on");
|
||||||
editor.apply();
|
editor.apply();
|
||||||
setTrusleep();
|
|
||||||
}
|
}
|
||||||
onSetTime();
|
onSetTime();
|
||||||
getBatteryLevel();
|
getBatteryLevel();
|
||||||
@ -715,6 +714,9 @@ public class HuaweiSupportProvider {
|
|||||||
if (getHuaweiCoordinator().supportsActivityReminder()) {
|
if (getHuaweiCoordinator().supportsActivityReminder()) {
|
||||||
setActivityReminder();
|
setActivityReminder();
|
||||||
}
|
}
|
||||||
|
if (getHuaweiCoordinator().supportsTruSleep()) {
|
||||||
|
setTrusleep();
|
||||||
|
}
|
||||||
if (getHuaweiCoordinator().supportsPromptPushMessage() && getProtocolVersion() == 2) {
|
if (getHuaweiCoordinator().supportsPromptPushMessage() && getProtocolVersion() == 2) {
|
||||||
GetNotificationCapabilitiesRequest getNotificationCapabilitiesReq = new GetNotificationCapabilitiesRequest(this);
|
GetNotificationCapabilitiesRequest getNotificationCapabilitiesReq = new GetNotificationCapabilitiesRequest(this);
|
||||||
getNotificationCapabilitiesReq.doPerform();
|
getNotificationCapabilitiesReq.doPerform();
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
android:summary="@string/huawei_trusleep_summary_light">
|
android:summary="@string/huawei_trusleep_summary_light">
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
android:enabled="false"
|
|
||||||
android:icon="@drawable/ic_access_time"
|
android:icon="@drawable/ic_access_time"
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="trusleep"
|
android:key="trusleep"
|
||||||
|
Loading…
Reference in New Issue
Block a user