libstagefright: Update LPA Player to use ION

Create LPAPlayerION and LPAPlayerPMEM files to separate
memory allocation using ION and PMEM and change the
existing files accordingly.

CRs-fixed: 341467
(cherry picked from commit 63a2671e848d5f8bc9295706974d5c7bee7b2002)

Change-Id: Ife594fb9c36a98d4a3be47ae4140a9c82ec477f7
frameworks/base: Added more log messages in LPAPlayer

- Added more log messages in LPAPlayer for better debugging

(cherry picked from commit 585d32158ab2c13009dbb015f47551c235cdb1f3)

Change-Id: I8f7968da367aaefe2ead70b848237cdc452e8842
libmedia: don't require USES_AUDIO_LEGACY for USE_KINETO_COMPATIBILITY

squashed:
audio: Add compatibility bits to use legacy libaudio implementations

Change-Id: I25b6fce494f6cff111b20611dd788025cebfe818
stagefright avcenc: Clarify the ifdefs surrounding inline assembly

Previously, the code was structured like this:

#if defined(__GNUC__) && defined(__arm__)
    /* Generic C implementation */
#elif defined(__CC_ARM)
    /* RVCT version */
#elif defined(__GNUC__) && defined(__arm__)
    /* GCC arm assembly version */
#endif

This had two implications - the gcc arm version never was used
in practice, and the code required -D__arm__ to build at all for
other architectures.

The inline assembly constraints are buggy (requires changes so as
to not crash), and if fixed, the optimizations still aren't faster
than the generic C code on modern gcc versions. Therefore, just
ignore them and use the generic C code.

Due to the peculiar code block ordering and preprocessor conditions,
the generic C code is what has been used before anyway, but it
did require -D__arm__ to build, which can cause problems if building
for other architectures, if the system headers have ifdefs for this
define. This change makes it build without that define.

Change-Id: Ib3fcf5651ee720310b7dff10fd04279b5f90759c
stagefright avcenc: Build in arm mode instead of thumb

This makes the codec marginally faster.

Change-Id: I3c67bd863f4b1e9d3f7ace680ea59384c25f3304
SurfaceTexture: Reset buffer values on disconnect.

When the surface texture client disconnects, reset the values set
for buffer width, height, transform and format. This is to ensure
that the same surface texture can be used by another client with
different parameters without any corruptions.

Change-Id: I1e158f4641d7b06cea9976ad2827c7b12c95f538
CRs-Fixed: 347382
Revert "libhwui: Correct transform used for drawing text-shadow."

This reverts commit d4c8be8416c6c3064e43ed80ebacb2a177be3019.

Change-Id: Ib0dea91060d16b9c870cb30668b19c2326b43a3b
CRs-fixed: 350636
(cherry picked from commit e2c11bb26a359921ecd8eb4a69fbf11407728cc2)
ligstagefright: New flag GRALLOC_USAGE_PRIVATE_CP_BUFFER used for securing buffers.

GRALLOC_USAGE_PROTECTED is being used by Surface flinger for protecting screen
shot. For WV L3 secure buffers are not being used, so we need a different flag
to set use or not use secure buffers.

CRs-fixed: 348454
(cherry picked from commit 01c5d8e96c91905a7e9b3b7d36c81fd7ff103b24)

Change-Id: I71db905661b4d360a96853768dac8dc0c557346d

Conflicts:

	media/libstagefright/OMXCodec.cpp
libstagefright: Fix seek issues in HLS

- Seek the video either forward or backward, video starts
  from the beginning
- Issue is because the seek request is ignored if the seek position
  is within the range of the downloading segment.
- Compare the seek position with playing segment range rather than
  downloading segment range.

CRs-fixed: 349732
(cherry picked from commit 9f7a279633f49bbdb82df41c66af57795f2a6c7c)

Change-Id: I5ecbef11f470d1fed40c0e06be54fd28369aa395

Conflicts:

	media/libstagefright/httplive/LiveSession.cpp
fix brightness slider inconsistency

http://rootzwiki.com/topic/23663-maguro-all-b34-problem-with-brightness-toggle-in-statusbar/

Change-Id: Ic828c684175338f3ea21d8950fb08b82b3dd72d1
Signed-off-by: Roman Birg <romanbirg@gmail.com>
AVRCP: add try catch to avoid softreset

It seems that some music players send custom classes as extra in their intent.
As these classes are not known in the framework an Exception is thrown when
we try to access the extras. This leads to a softreset, so adding try catch
to avoid that.

Change-Id: I81ba1dd0968b06b7ea63397d8c2cac8159e3e909
update clock outside updateSettings method

testing -- may or may not have effect on the infamous freezing clock

Change-Id: If3ec3a447d2c96443e63100500d9d9fa4c5a0645
Signed-off-by: Roman Birg <romanbirg@gmail.com>
add padding to stop wifi icon cut-off

http://rootzwiki.com/topic/24185-toro-34-wifi-icon-cut-off/

It would be more appropriate to setup new layoutparams
	and change the actual margin instead of just offsetting
	it with padding, but I think this OK for now, much shorter

Change-Id: I115672105b032a698a16bf40b1c47611546afe83
Signed-off-by: Roman Birg <romanbirg@gmail.com>
LGEQualcommRIL: Fix PIN status for e73x

The QUERY_FACILITY_LOCK call is completely broken on the e730/739
when the SIM card status (SC) is requested.
Instead of letting it go through (and fail), use the pin1 status
from the IccCard application to figure out what the lock state is,
and return it as a message to the calling handler.

Change-Id: Iaed16bcb1a3ee71d9e833e4a4ccee423de0593a4
LGEQualcommRIL: Fix dataCallState objects

Change-Id: I5f36370981737200de808922bd6772a08dc85608
LGEQualcommRIL: Fix radio version on victor

Use that device's specific GET_MODEM_VERSION request to fill in
the usual BASEBAND_VERSION data

Also, merge QualcommNoSimReadyRIL into LGEQualcommRIL, since no
other device subclasses it anymore

Change-Id: I191f7229b59fcc8ace920c9b66ee0cff0113934b
Update Traditional Chinese translations

Signed-off-by: Chia-Wei Li <dreamcwli@gmail.com>
fix small icons when airplane mode & wifi are on

Change-Id: I1e12e5824f8fd33cf7a66c73dd303a267b55e740
http://rootzwiki.com/topic/24238-maguro-b34-shrunken-wifi-airplane-icons-when-both-active/

Signed-off-by: Roman Birg <romanbirg@gmail.com>
LGEQualcommRIL: Clean up processUnsolicited

At David Ferguson <ferguson.david@gmail.com>'s suggestion, remove
the full overload of processUnsolicited and have it just work with
the requests unknown by the RIL superclass. Pass everything else
upwards, unmodified.

Change-Id: Ie019fbaa3d5010bf7adc5528f3d523a77efb146f
Fix Decrease lights in custom backligh settings.
All credit to CM team.
Signed-off-by: Mike Wilson <mwilson@acesappraisal.com>

Change-Id: Iafdae300764462700bad22e10084a1799baaed80