Add support for ADT-based (in-suspend) notifications
This is a workaround to enable the notifications also while the phone
is suspended. It works in a such way (and it needs the atd daemon):
- When the notifier shows a notification, then it create also a new
atd-alarm script making the rtc-clock to wake-up the phone (if needed)
after 'MINUTES_FOR_WAKEUP' minutes.
- When the the 'MINUTES_FOR_WAKEUP' are passed, the rtc clock sends an interrupt
to the CPU that eventually makes the phone resume; now:
- if the phone has just been resumed by the clock, it notifies the user (using
the proper method), sets another alarm in the next 'MINUTES_FOR_WAKEUP' and
finally it goes back into deep-sleep (all this takes just few seconds).
- else, if the phone has been recently waked-up by another interrupt, it
simply sets a new alarm to be performed after 'MINUTES_FOR_WAKEUP' minutes.
- When the user show the notified event(s), all the shr-notifier atd-alarm(s)
are moved away.
This works, however there are some bugs that can't be easily prevented at the
current state (if the phone is waked-up by another alarm and then it doesn't go
to suspension, the atd-notifier will continue its loop while also the ecore-timer
based "notify" will continue); I figure that they could be "workarounded" a bit
if the kernel would export also the resume time in a sysfile (so I could check
what timer really resumed the phone).