Commit e94b5d60 authored by Bhushan Shah's avatar Bhushan Shah 📱 Committed by Bhushan Shah
Browse files

[mobile] on mobile devices lock screen before we turn it off

This depends on changes in the dpms action.
parent 519dc0c4
...@@ -89,6 +89,7 @@ void ProfileGenerator::generateProfiles(bool toRam, bool toDisk) ...@@ -89,6 +89,7 @@ void ProfileGenerator::generateProfiles(bool toRam, bool toDisk)
auto timeout = mobile ? 60 : 600; auto timeout = mobile ? 60 : 600;
KConfigGroup dpmsControl(&acProfile, "DPMSControl"); KConfigGroup dpmsControl(&acProfile, "DPMSControl");
dpmsControl.writeEntry< uint >("idleTime", timeout); dpmsControl.writeEntry< uint >("idleTime", timeout);
dpmsControl.writeEntry< uint >("lockBeforeTurnOff", mobile);
} }
// Powersave // Powersave
...@@ -111,6 +112,7 @@ void ProfileGenerator::generateProfiles(bool toRam, bool toDisk) ...@@ -111,6 +112,7 @@ void ProfileGenerator::generateProfiles(bool toRam, bool toDisk)
auto timeout = mobile ? 60 : 300; auto timeout = mobile ? 60 : 300;
KConfigGroup dpmsControl(&batteryProfile, "DPMSControl"); KConfigGroup dpmsControl(&batteryProfile, "DPMSControl");
dpmsControl.writeEntry< uint >("idleTime", timeout); dpmsControl.writeEntry< uint >("idleTime", timeout);
dpmsControl.writeEntry< uint >("lockBeforeTurnOff", mobile);
} }
// Last but not least, we want to suspend after a rather long period of inactivity // Last but not least, we want to suspend after a rather long period of inactivity
...@@ -148,6 +150,7 @@ void ProfileGenerator::generateProfiles(bool toRam, bool toDisk) ...@@ -148,6 +150,7 @@ void ProfileGenerator::generateProfiles(bool toRam, bool toDisk)
auto timeout = mobile ? 30 : 120; auto timeout = mobile ? 30 : 120;
KConfigGroup dpmsControl(&lowBatteryProfile, "DPMSControl"); KConfigGroup dpmsControl(&lowBatteryProfile, "DPMSControl");
dpmsControl.writeEntry< uint >("idleTime", timeout); dpmsControl.writeEntry< uint >("idleTime", timeout);
dpmsControl.writeEntry< uint >("lockBeforeTurnOff", mobile);
} }
// Last but not least, we want to suspend after a rather long period of inactivity // Last but not least, we want to suspend after a rather long period of inactivity
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment