SurfaceFlinger: Rename ifdef around perform function

Not just HDMI targets needs this.

Change-Id: I422a6d6a0e73eb28ca6644f02c781c782907b318
Avoid dirty region drawing when EGL Surface object is not updated.

Add state to identify UNDEFINED state when the actual EGL Surface
has been resized but Hardware Renderer is not informed about it.
Avoid the dirty region drawing for 1 frame in this state to fix
corruption.

CRs-Fixed: 354256
(cherry picked from commit 652a6d8e87c7ea130750336885890a9ffd1affbc)

Change-Id: I3543176db36e596178de6d911a7f967b1cdd3b58
SurfaceFlinger: Dont skip composition if it is incomplete.

If the composition is not complete because of suspend we need at least
one complete composition to happen without skipping.

Set force composition flag so that next time hwc does not skip the
composition.

CRs-fixed: 374830
(cherry picked from commit f03f679fc34eb839c801330e58c3c898a392a3b6)

Change-Id: Id907e6ff259aef7caec32c6edc44bb6082c583bb
SurfaceTexture: Reset buffer values during connect

Reset buffer values during connect instead of disconnect since other
clients may still be accessing the SurfaceTexture after disconnect.

CRs-fixed: 360883 375225
(cherry picked from commit e324ee6f793ddb1031c97fe71d64c42cd3b8f315)

Change-Id: Ib2c04a1b224fd5f278d0da665e8d23d7fe97b2ef
libstagefright: fix thumbnails for videos with non multiple of 4 width

- videos with width not a multiple of 4 will fail thumbnail
  generation
- this fix changes the dest width in converter routine to the
  rounded up nearest multiple of 4
- this fix will not impact already working videos as they are
  already at the nearest multiple of 4 in width

(cherry picked from commit 18720176cbd6b1817b1396e1c7768ce6f44db910)

Change-Id: I104c2f26706876c5314304508f87a8e35b6d4659
Crs-Fixed: 331371
libstagefright: Fixing a crash in EOS for thumbnail generation.

Initializing an uninitialized variable and fixing
a crash. At EOS OMXCodec::read was returning OK and
a NULL buffer. This is not a valid return combination
as client expects buffer to be non-NULL when there
is no error. With this change OMXCodec::read
will return ERROR_END_OF_STREAM with a NULL buffer
which is a valid return combination. This change
is specific to hardware thumbnail generation.

Change-Id: I83ebdc69e2195b903ea652cb46bf91df48457eec
frameworks/base: Handle Out of Memory Exception when creating video thumbnails.

Adds code to handle an out of memory exception when generating the thumbnail
from a recently recorded video clip.

Change-Id: Ifcbe007272ffef85744fca1414ea5eacccd0154c
CRs-Fixed: 277571
libstagefright: Enable hardware thumbnail generation

Hardware video decoder will be used to generate
thumbnails if the software decoder fails.

- Enabled for 8660 and 8960
- Add property to disable use of sw decoders for thumbnail creation
- Additional debug logs in metadata retriever

Change-Id: I249d7be146b5d07468826f28f7843a208ed39c1b
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
Support GSM AT commands for SMS over bluetooth (1/2)

Modifications required to support the older GSM "AT+" commands for SMS over
the bluetooth transport for use with car radios, etc.  This must piggy back
on the existing handsfree code as the spec uses that channel for the commands.
(2 parts: frameworks/base and packages/apps/Phone)

frameworks/base:
Additions to JNI and supporting framework code to allow sending of individual
characters and to receive the PDU stream - neither of which are CR terminated.

Change-Id: Ib0d0a2ba1ffcd55708b42f53ff38c6ff4a7292d1
Signed-off-by: Gary Dezern <garyd9@gmail.com>
Revert "Revert "Add SCENE_MODE_OFF support for Camera framework""

This reverts commit 12538695a741670c094ca31efab1c275a808ba38

Does not break builds: Example of a successful build here: http://jenkins.cyanogenmod.com/job/android/7513/
stagefright aacenc: Properly terminate a comment

This avoids a warning about /* within a comment.

Change-Id: I9079909734d35db5ab0fd54b46173d7a1848d0c9