FontRenderer: do not leak mIndexBufferID

This glBuffer needs to be deleted to avoid leaking
graphics memory.

CRs-Fixed: 346272
Change-Id: Ib56553fffbf88848905893b02a986765823050ad
(cherry picked from commit 8ee3ffb1c0096767311b55c509e1288901f3747f)
Fix for Screen stretch issue after a power suspend resume using HLS or RTSP

- Fixes screen stretch issue after power suspend resume
- Retains the previous screen height and width and uses it if we get incorrect
  height and width.

CRs-Fixed: 350691
(cherry picked from commit 5c0bb2868882fdcae545a412077ed984efc12c90)

Change-Id: I64f77cc956aa8e99045c79c851f4f8d32d765cab
Modify getState to prefer AKEY_STATE_DOWN and AKEY_STATE_UP over AKEY_STATE_UNKNOWN
libstagefright: add key for FileFormat

-This will hold the container Format

CRs-Fixed: 339035 337021
(cherry picked from commit 7dc0c859d2b06caa65a091751856ab79ce470167)

Change-Id: Ic4968eaf299fb7e5761c2409aa494720cdf860ea
libstagefright:/MPEG4Extractor: Support for multiple avcc atoms

Change-Id: If7aeaf26a25628166376c9dc1e277a21782afe2d
libstagefright - Fix timestamp overflow

 - change time related variables to 64 bit to avoid overflow
 - composition time calculations were having overflow in
   SampleIterator and it propagates to the rest of the time
   related information for the frames

CRs-Fixed: 350349
(cherry picked from commit 7b887ff851113c69187a227f7ae07d5e54a19731)

Change-Id: I3e359b1e3ea3d76ee1e792b590c277c44b0c38ac
libstagefright: Enable support for HW AAC decoder for HLS
libstagefright: Fix timestamp assignment for PES with partial frames

-When a PES contains a partial AAC frame, the time stamps assigned
 to each AU get jumbled. Added a fix to check for partal frames in
 a PES and assign correct timestamps.
-Also corrected a timestamp assignment condition for hw aac decoder
 case.

CRs-Fixed: 342273
(cherry picked from commit da8f11c80d851f070ecc53aa44126903e246c6e3)

Change-Id: I842d1dcd3bd33f5bbdfcaf462199f93cefc68a2b
libstagefright/chromium: Remove serialize lock in Chromium DataSource

- This fix was required to handle a rapid seek scenario in NuPlayer.
  Since the locks are added internally in NuPlayer, serialize locks
  in chromium data source are not required.
- Do not call data source disconnect in NuPlayer seek, to avoid
  race condition in chromimum data source.

CRs-Fixed: 353333
(cherry picked from commit 6e23f9dcf9be596f1e417ac15e0c20fb8233253d)

Change-Id: Iaacc12307adc71da660d7cd5fecd4ec4f0dc882b
statistics from some cpus don't fit
Possible NullPointerException in restorePanelState

curFeatureId is just an index in a cycle and can not be used for getting an object. May get null that will cause NullPointerException. Solution is to use key to get an object from icicles.

Change-Id: I61d5c6bd1c3226a993f60efa74872995ba0e42ac
Prevent empty overflow popup when there are no overflow items.

On a device with a hardware menu key, an empty overflow window can be displayed
if there are no items in said overflow menu. This leads to the next user touch
being swallowed in the action of dismissing the invisible window.

Change-Id: I9191e4b2e1ed4888e4bc7261e8b3f095a272a9b5
Avoiding horizontal keypad navigation trapping within gallery.

Non touchscreen devices such as Google TV require the keypad
navigation to properly move the focus among widgets.

The Gallery is misshandling the keypress event and avoiding
the focus from going to other widgets on it's sides upon
keypress even after the user has reached it's first and
last items.

Change-Id: If32ee57e8513cac692deb161e1941d6cc85e3188
Signed-off-by: David Sobreira Marques <dpsmarques@gmail.com>
Fixes an issue that occured unexpected exception "pointerIndex out of range".

The findNewActiveIndex method may return -1.
So, the code should check case of -1 before event.getPointerId
and if index0 is -1, gesture should be ended immediately.

Change-Id: I4aae5c84e3db61d10b0bfcfa7bfa6b9115231a52
Fix off-by-one error when filtering application UIDs

A filtering check in writeLPr() mistakenly includes the first application UID
(10000) with the result that the package with UID 10000 is missing from
packages.list. This patch fix the error.

Change-Id: I3651beb346290db8e09317391b95a77aed1946b6
Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
Fixed group and child view caching in SimpleExpandableListAdapter.

Now the adapter reports the correct type count and type for group and child
views by overriding the respective methods from the base class. Each group
view has two types, one for expanded views, one for collapsed views. Each
child view has two types, one for the last view within a group, one for the
other views within a group.

Change-Id: I117b2c0f7e98fb7fe2fdd35c15f7d1f9dc06674f
Signed-off-by: Georg Hofmann <georg.hofmann@gmail.com>
libstagefright: Fix crash due to invalid audio format

- One specific TS clip do not play, pop's error message and we
  see crash in parser.
- This issue is because one of the test clip has an audio header
  which the parser doesn't support. There is a hard error check
  in the parser which terminates the parsing because of this error.
- Remove the hard check and rather return error and allow it to scan
  other packet, which might have valid header. In worst case audio
  track will not play.

CRs-Fixed: 344841
(cherry picked from commit 9ea4093f5828bfdc27efd879aa193df33845efb2)

Change-Id: I520eae306a1137c02adc4d8fe081cac6d1eaf216
Build overlay packages just like regular packages.

Previously, building overlay packages required passing aapt its -o flag.
This commit decouples the idmap generation code from the effects of the
-o flag.

Since this commit renders the -o flag obsolete, support for the flag was
removed from aapt as well.

Change-Id: Ied2e0ab8cb800e49623f0a2044b06cd4935473d5
Runtime resource overlay: clean-up.
Improve robustness of resource overlay test suite.

Test runner will now create directory /vendor/overlay/framework, if
missing.

Also, move wallpaper from drawable to drawable-nodpi for it to actually
take effect on ICS code.

Change-Id: I7615345e847c5fca91aedc459f6aa3316a45aab5