lp:~asac/powerd/fix-racy-screen-on-and-no-mutex-refactor

Created by Alexander Sack and last modified
Get this branch:
bzr branch lp:~asac/powerd/fix-racy-screen-on-and-no-mutex-refactor
Only Alexander Sack can upload to this branch. If you are Alexander Sack please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Alexander Sack
Project:
powerd
Status:
Development

Recent revisions

26. By Alexander Sack

* refactor how we bridge threads from android input stack thread into
  GMainLoop land; we re-dispatch the android input event wholesale at
  the very first moment to GMainLoop through g_idle_add
  - since this was the only source of multithreading we remove all
    explicit use of mutex in powerd.cpp and power-request.c

25. By Alexander Sack

drop a 'sleep(1)' statement from code we never want code like that

24. By Alexander Sack

replace usage of 'g_timeout_add(0' with 'g_idle_add(' pattern

23. By Alexander Sack

only update remembered screen brightniss for SCREEN_ON state
if the value from system is !=0

22. By Matt Fischer

Add a timeout setting for the activity timer.

Approved by PS Jenkins bot, Seth Forshee.

21. By Seth Forshee

powerd: Protect activity timer with a mutex

The activity timer may be reset from multiple threads. We have
a race whereby we end up with a "lost" timer event that doesn't
get cleared on input activity, thus causing the screen to turn
off while the device is in use. To fix this, serialize access to
the activity timer within reset_activity_timer() with a mutex
and make sure all code uses this function for any any activity
timer updates.

Approved by PS Jenkins bot.

20. By Seth Forshee

Changes to emit signals for power change events
* Move system state processing to all be done on mainloop via a state machine
* Emit dbus signals for state changes
* Wait for a timeout period before completing state changes
* Protect access to system state requests lists using a mutex
* Add wake lock interfaces to libsuspend
* Use wake locks to block suspend while processing incoming state change requests
* Bug fixes and clean-up.

Approved by Matthew Fischer, PS Jenkins bot.

19. By Matt Fischer

[ Matthew Fischer ]
  * API Change: Add state to the return value for the listRequests
  * New CLI tool, powerd-cli, which can be used for testing, debugging,
    or to keep the system from suspending.
  * Exit from suspend and turn screen on when receiving an incoming SMS
    or phone call

  [ Seth Forshee ]
  * Force the initial state to screen on, not suspended, in order to
    alleviate problems if powerd is started when the screen is off.
  * Fix Nexus10 suspend issue
  * Remove unnecessary newlines from glib log messages.

Approved by PS Jenkins bot.

18. By Matt Fischer

Listen for ofono signals and request active state (and turn the screen on) when an incoming SMS or phone call arrives.

Approved by Seth Forshee, PS Jenkins bot.

17. By Matt Fischer

Listen for SysPowerStateChange signal.

Approved by Seth Forshee, PS Jenkins bot.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:powerd
This branch contains Public information 
Everyone can see this information.

Subscribers