adb: Don't force -O2

Don't force -O2 over -O3 -- the O2 hardcode is there to force
optimizations, not to reduce them...

Change-Id: Ic75eeb767db4926f519580fba8f5f7b8e593df4f
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
core: Fix build in ISO C++11 mode

Fix compatibility with ISO C++11 compilers

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Change-Id: I8f9aa775b5681d4d8c5202a1a1935acb4efa4171
sync_test: Use -fno-strict-aliasing

Use -fno-strict-aliasing here so we don't have to use it globally.
Performance on tests isn't important anyway.

Change-Id: I92ae7209ced60176cc5608f32b8ff6a911c09f10
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
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