<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/119087/">https://git.reviewboard.kde.org/r/119087/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Solid.</div>
<div>By Emmanuel Pescosta.</div>
<p style="color: grey;"><i>Updated July 29, 2014, 9:49 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=325707">325707</a>,
<a href="https://bugs.kde.org/show_bug.cgi?id=329537">329537</a>,
<a href="https://bugs.kde.org/show_bug.cgi?id=337414">337414</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
powerdevil
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">(kde:powerdevil version of review 118801)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">After resuming from suspend, all batteries are added<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
to powerdevil. When a battery, with charge lower or<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
equal than the critical charge percentage is added, the<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
critical battery timer will be started.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In the current version the critical battery timeout can<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
only be interrupted by plugging in AC.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">But if the system has more than one battery, the global<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
charge percentage can be greater than the critical charge<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
percentage and so the system shouldn't suspend. To achive<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
this behaviour, we calculate the global charge percentage<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
whenever a new battery was added and if the critical<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
battery timer is running and the global charge is high<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
enough, we stop the timer.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Also we use the already calculated global charge percentage<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
for the battery charge percentage notification instead of<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
the charge of each individual battery.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With this patch, the user can not only interrupt the critical<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
timer by plugging in the AC but also by plugging in a new or<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
additional battery (if the battery has enough charge).</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Testing was done by Philipp Paris on his Thinkpad T440s (two<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
batteries).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Two batteries above critical section:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
Resume after suspend works without the 30 sec timeout. (as current version)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">One battery in critical section and the other above:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
Resume after suspend works without the 30 sec timeout. (changed behaviour)</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Both in critical section:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
Resume after suspend without plugged in AC will go sleeping<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
in 30 sec. (as current version)</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>daemon/powerdevilcore.h <span style="color: grey">(dc2ba7e)</span></li>
<li>daemon/powerdevilcore.cpp <span style="color: grey">(64791d6)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119087/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>