telephony:  Fix MMS for when operator has different APNs for Data and MMS

Change-Id: Icf0bc8919bf5f774741081a33533973703ada183
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
libstagefright: Add HW thumbnail support for 8x55.

 Adding changes to support HW Thumbnail generation for 8x55
target.

Change-Id: If43ff1cd7764407890a86c555f3baebec8e99ae4
libstagefright: use hw codec only for thumbnail mode

     - Makes sure StagefrightMetadataRetriever use hw only codecs
       for thumbnail mode.
     - In cases where hw codec fails and exits without fully starting
       SFMetadataRetriever may allocate sw codecs further down the
       list
     - Attempting to start thumbnail mode for SW codecs will result
       in assertion fail

Change-Id: I6190d8c3190703ead44d20f4a988110fdb549ec7
(cherry picked from commit 798e5085870ed79764324fb9b22b0b1cfeeead7e)
libstagefright: Software decoder is the first choice for thumbnail generation

Set the flag to use software decoder only for the
first call to extract video thumbnail.

Change-Id: I09b3b3da5bfe57f21b0fecfbcc5aff7337bb91a2
CRs-Fixed: 323190
StagefrightMetadataRetriever - fixed source start assertion failure on MPEG4Source

 - OMXCodec calls start on MPEG4Source
 - in occasional cases during thumbnail generation when buffers cannot be allocated
   by OMXCodec, init() will fail along with start() with MPEG4Source still started.
   StagefrightMetadataRetriever will then attempt to start OMXCodec again which calls
   start on MPEG4Source, causing mStarted assertion failure in MPEG4Source start()
 - this patch calls stop on MPEG4Source in case when decoder->start() fails by calling
   destructor of MPEG4Source (which stops the source safely) and remaking the source
   using the getTrack() call in Extractor

CRs-Fixed: 326063, 325461, 323538
Change-Id: Ib16444f6d3a0589fdb26e79d8323ae1edf90a5a1
StagefrightMetadataRetriever: use cm platform naming

Change-Id: I8bd00396c6ba34237a4b6217e8a37f62a331df9d
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: 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