Merge lp:~mterry/unity-system-compositor/inactivity-zero-fix into lp:unity-system-compositor
Status: | Rejected |
---|---|
Rejected by: | Michael Terry |
Proposed branch: | lp:~mterry/unity-system-compositor/inactivity-zero-fix |
Merge into: | lp:unity-system-compositor |
Diff against target: |
22 lines (+6/-0) 1 file modified
src/mir_screen.cpp (+6/-0) |
To merge this branch: | bzr merge lp:~mterry/unity-system-compositor/inactivity-zero-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Terry (community) | Disapprove | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+268276@code.launchpad.net |
Commit message
Fix screen turning off in middle of interacting with phone after receiving an SMS with an inactivity value of "never".
This branch cancels power-off and dimmer timeout alarms when resetting for a reason that has zero-timeout value. Historically, we could entirely ignore such resets, because when the zero-timeout value was set (in set_inactivity_
But now that we have two sets of timeout values [1], the alarms might be active when we try to reset a zero-timer for inactivity. We can't just ignore such an event, we now need to cancel the alarms.
[1] https:/
Description of the change
Fix screen turning off in middle of interacting with phone after receiving an SMS with an inactivity value of "never".
This branch cancels power-off and dimmer timeout alarms when resetting for a reason that has zero-timeout value. Historically, we could entirely ignore such resets, because when the zero-timeout value was set (in set_inactivity_
But now that we have two sets of timeout values [1], the alarms might be active when we try to reset a zero-timer for inactivity. We can't just ignore such an event, we now need to cancel the alarms.
I've assumed that a zero value for *any* timeout reason means "never". I don't think that's a super reasonable value for a notification timeout. But neither is zero milliseconds. So I left it as "never". But if you all don't like that, I can also add a check that reason==inactivity before cancelling the alarms.
I also have not added any unit tests, though this would be an excellent candidate for them. I'll do that as a future MP. I just wanted to get this MP in there soon to increase its chances of landing in OTA6.
[1] https:/
Unmerged revisions
- 243. By Michael Terry
-
Cancel power timeout alarms when a timeout value is set to zero (never timeout)
PASSED: Continuous integration, rev:243 jenkins. qa.ubuntu. com/job/ unity-system- compositor- ci/258/ jenkins. qa.ubuntu. com/job/ unity-system- compositor- wily-amd64- ci/46 jenkins. qa.ubuntu. com/job/ unity-system- compositor- wily-armhf- ci/46 jenkins. qa.ubuntu. com/job/ unity-system- compositor- wily-armhf- ci/46/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity-system- compositor- wily-i386- ci/46
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity- system- compositor- ci/258/ rebuild
http://