Merge lp://staging/~gerboland/qtmir/acquire-wakelock into lp://staging/qtmir
Status: | Merged |
---|---|
Approved by: | Michael Zanetti |
Approved revision: | 319 |
Merged at revision: | 308 |
Proposed branch: | lp://staging/~gerboland/qtmir/acquire-wakelock |
Merge into: | lp://staging/qtmir |
Diff against target: |
1098 lines (+814/-2) 16 files modified
src/common/abstractdbusservicemonitor.cpp (+101/-0) src/common/abstractdbusservicemonitor.h (+68/-0) src/modules/Unity/Application/CMakeLists.txt (+2/-0) src/modules/Unity/Application/application.cpp (+20/-0) src/modules/Unity/Application/application.h (+4/-0) src/modules/Unity/Application/application_manager.cpp (+8/-0) src/modules/Unity/Application/application_manager.h (+3/-0) src/modules/Unity/Application/sharedwakelock.cpp (+168/-0) src/modules/Unity/Application/sharedwakelock.h (+50/-0) tests/modules/Application/CMakeLists.txt (+25/-0) tests/modules/Application/application_test.cpp (+122/-0) tests/modules/CMakeLists.txt (+3/-1) tests/modules/SharedWakelock/CMakeLists.txt (+22/-0) tests/modules/SharedWakelock/sharedwakelock_test.cpp (+170/-0) tests/modules/common/mock_shared_wakelock.h (+44/-0) tests/modules/common/qtmir_test.h (+4/-1) |
To merge this branch: | bzr merge lp://staging/~gerboland/qtmir/acquire-wakelock |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Zanetti (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+245942@code.staging.launchpad.net |
Commit message
Add Wakelock support - ensures device drops to deep-sleep mode only when all AppMan suspend tasks have completed
Implemented like so:
- SharedWakelock manages a single wakelock instance, allowing multiple owners to keep the wakelock enabled, only releasing it when all owners have released it.
- Wakelock operates by communicating with PowerD
- the Application class decides whether a wakelock is necessary, based on the process' lifecycle state.
- added a mighty bunch of tests
Description of the change
Add Wakelock support - ensures device drops to deep-sleep mode only when all AppMan suspend tasks has completed
* Are there any related MPs required for this MP to build/function as expected? Please list.
N
* Did you perform an exploratory manual test run of your code change and any related functionality?
Y
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
To test, this command is handy:
sudo powerd-cli list
it lists the various wakelocks enabled:
Example output with system (grabbed by unity8 here) and display wakelock: Unity.Screen, Owner: :1.16, State: 1
Name: com.canonical.
Name: active, Owner: :1.48, State: 1
Example output with display wakelock alone: Unity.Screen, Owner: :1.16, State: 1
Name: com.canonical.
Example output with display off, but system wakelock still held by unity8/qtmir - is held for 3 seconds after display is turned off, to give apps time to save state before suspend:
Name: active, Owner: :1.48, State: 1
3 seconds after screen blank:
None