camera fix from atrix

Change-Id: Ib40f8d96d0e6908cfb8f8845f340729e72fef5f9
libcamera compatible fixes for the defy

Change-Id: I990d4b44562437fef870f126af799eb54f48c85b
1% step battery
try to change default camera format

Change-Id: Ic2c873ac9020f5c12622d836fa7809b96748712e
return to our Overlay.cpp, its same as weird atrix prototypes stuff

Change-Id: I24d0b13b4b37be70e9b8f169ce0c54ad2b4b7544
disable some debug (OMXCodec)

Change-Id: I9d59155c601fd09b00d46b384469942ca913e742
Implement hack to enable audio thru docks on Motorola phones

This allows us to pass a routing parameter to io 1 while sending
the DockState parameter to io 0 simultaneously. This is required
to enable the correct audio routing when docking/undocking and
allows audio on docks to work when combined with the DockAudio
package.

Change-Id: I23778887c4534c0e607d6fc9795e509f098d9016

Conflicts:

	services/audioflinger/Android.mk
Revert "some temporary debug stuff for sensors"

This reverts commit 931ca0db999c34af923234d5166ef2309dcf5fed.
Fix incorrect prototype for JNI call

This issue caused every Application launch to crash when using
portable JIT

Signed-Off-By: Bhanu Chetlapalli <bhanu@mips.com>

Change-Id: Id7cfdeb4fc00ba4b1ca6fa24bc01c8f3432857ff
Wi-Fi: Handle disconnect in middle of DHCP operation

Restore power mode and BT co-ex settings when disconnect
happens in middle of DHCP operation.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
tether: Link to legacy wifi api (squashed commit)

require http://review.cyanogenmod.com/12398 with some fixes

check CyanogenDefy libhardware_legacy repo

Change-Id: I248d9e5c929386f5e03efa1dde6eafa56c38f5c7
Don't enable the light sensor if it's not being used

We want to fully disable the lightsensor when it's not used, for two reasons:
1 - Power savings
2 - Sensors that control the backlight directly need to be disabled when
brightness control is set to manual. Forcibly enabling the sensor when
the screen turns on makes these devices incapable of using manual
brightness.

Change-Id: I64c1114348ff096e0a72b265f6f141d1ecef249c

Fix button backlights that depend on ALS

On a few devices, lighting the buttons when the screen turns on
depends on the lightsensor, regardless of the user preference.
So go back to enabling the sensor whenever the screen turns on, and
enforce the user preference after running through the light settings
once.

Change-Id: I6f036a32315eb7688a9cd11d4bd70dbca1b2fa8b

Conflicts:

	services/java/com/android/server/PowerManagerService.java
Separate configuration of auto-brightness for button/keyboard backlights.

Presently, light-sensor based automatic brightness
(config_autoBrightnessLevels) controls both button and keyboard backlights
in addition to the screen backlight.  Unfortunately auto-brightness for
button/keyboard backlights doesn't work well on devices (e.g., epicmtd)
with neither (i) dimmable button/keyboard backlights (so when they're on,
they're very bright even if the screen backlight is relatively dark) nor
(ii) identifiable surface features on capacitive buttons (so they can't be
found if the backlights are permanently turned off).

For these devices, the non-auto-brightness behavior of button/keyboard
backlights, whereby they turn on during screen-on events and user activity
and timeout-to-off shortly thereafter, is preferable.  Thus, this commit
adds a config option, config_autoBrightnessButtonKeyboard (defaults to
true), that when disabled allows for automatic brightness control of the
screen backlight, but retains the timeout-based behavior for button and
keyboard backlights.

Also addressed is a bug that disables the button and keyboard backlights on
screen unlock, and reenables the backlights on touch events so that
capacitive keys may be located.
Return error code when composing PDU fails

When the PduComposer fails to make the message body,
a successful result code was still returned.

Change-Id: I8a677afeeae8811c3b0fae61209c5348df1e39d9
Increase PDU parts buffer size for performance reasons

Changed the size of the temporary buffer used when storing a PDU part
to 8192 bytes instead of the previous 256 bytes. This greatly
decreases the time needed to store relatively large PDU parts. The
times to store PDU parts were so long that we frequently ended up with
an ANR. This change resulted in a total time usage of ~1000 ms instead
of ~10000 ms for ~500 kB worth of data.

Change-Id: Ia02cb28e4fd9dfe3aaa1fa30ff37659951cbed93
stagefright aacenc/amrwbenc: Remove trailing whitespace

This was applied in AOSP master earlier, in commit
b21611e5b0f1797e39e781d91ade023bac87637f, but when merged
into the Google internal tree in
88c2d4d26d79384f32a25bd775cf873cb678b12a, none of these
changes have been brought in. (The diff of this merge commit
and its first parent, d94b71d, is empty.)

Therefore, reapply the rest of these changes on the files
that still are present in the current version.

Change-Id: I645a9b9134769958a11808a06163123d28d83e46
stagefright aacenc: Add missing newlines at the end of files

This avoids compiler warnings about missing newlines.

Change-Id: Ieb2bb7152d794dca47c629588879032d3ba65677
stagefright amrwbenc: Make the mem_malloc function 64-bit safe

Change-Id: Iab0dbfdc6be09c62d353bee46596635686b784a6
stagefright aacenc: Fix type definitions for 64 bit platforms

Also don't require LINUX to be defined, enable the MSVC typedefs
only within _MSC_VER.

This fixes a lot of warnings about dereferencing pointer 'winPtr'
breaking strict aliasing rules.

Change-Id: I4afbe0ed81295ebe6e5ee2c7f0fb0cc2dc83c89b
stagefright aacenc: Properly terminate a comment

This avoids a warning about /* within a comment.

Change-Id: I9079909734d35db5ab0fd54b46173d7a1848d0c9