telephony: neighboring cells are now handled properly

GsmServiceStateTracker.java sets the System Property
PROPERTY_DATA_NETWORK_TYPE = "TypeName:RadioTechnology"
for the current network type (ex. EDGE:2 or HSPA:11).

When neighboring cell info is sent to responseCellList() in RIL.java,
the routine compares PROPERTY_DATA_NETWORK_TYPE to just the TypeName
(without the :) and can not find a match.  It defaults to
NETWORK_TYPE_UNKNOWN and does no interpret the location.

This patch splits off the string part of PROPERTY_DATA_NETWORK_TYPE
so a proper match is found and the location is interpreted.

Also HSPA+ (HSPAP) is added as a valid match.

Patch compiled and tested on HP TouchPad 4G.

Change-Id: I223db80d6c4a7791300e299826aa316854738d5c
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
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
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: 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
Lockscreen: change offset of Multiwaveview
- to make all of the lockscreen shortcuts visible

Change-Id: I3ea8334256f2f60a29fd8c732211bb6aea974437