libsuspend: compile as a static library

Compile libsuspend as a static library as well, currently needed by the charger
code in some cases.

Related-to-bug: 7429504
Change-Id: I113017c2c855f915b77c76d8934b6e57c0bb532c
Signed-off-by: Iliyan Malchev <malchev@google.com>
charger: suspend enable in charger mode

To reduce power consumption after charging completion, enable suspend when LCD
is turned off.

Bug: 7429504
Change-Id: I34731dc392661c9051a20cea74f70d94a8aaeb42
Signed-off-by: Iliyan Malchev <malchev@google.com>
charger: Do not suspend when disconnecting from charger

The device should be power off when disconnecting from charger.
If the device enter to suspend, the device couldn't handle the power off
process. So the device shouldn't suspend to handle the power off at that time

Bug: 7429504
Change-Id: I9a0a60e53f315cd83550dc730a33bc7bd464ef67
Merge commit 'android-4.2.1_r1.2' into cm-10.1
charger: do not suspend when handling home

When using Google's suspend implementation, home press should also wake
the device from suspend

Change-Id: I51f3e45c5cb418b0b3718e7223a1336876379043
rootdir: Set perms on interactive governor's min_sample_time

Change-Id: I75e9f424af731bdf1ca222eee2f4f18b20a6552b
rootdir: set perms on ondemand governor's up_threshold

Change-Id: I0a042a81be677821fa4099a3e19281d390dd27c3
Merge "charger: do not suspend when handling home" into cm-10.1
Fix audio recording for ICS audio blobs

This fixes audio recording when ICS_AUDIO_BLOB is set because
AUDIO_DEVICE_BIT_IN was not used with ICS. Add #ifdefs to use the old checks
again.

Change-Id: I33b37e74d33fed7ab0bc2af9907e07d799b0ec0e
Merge branch 'refs/heads/CyanogenMod_cm-10.1' into cm-10.1

Change-Id: I66b1899a2390f874d087c819e0218330f78c448a