libagl: Hide ARM helper assembly routines
Handling EGL_BAD_ALLOC egl error as return from swap

Some GL apps are not closing properly espacially while
forcefully closed.Cause unnessary swap command from
GLSurfaceView and returing EGL_BAD_ALLOC as error that is
not handling in GL thread and leads to uncaught exception

CRs-fixed: 335039
(cherry picked from commit 46cc8d1f506fabd04e3e192511ab715a22ff92ea)

Change-Id: I92d08b6328a0055687ad99b9413a97ec7025e0cd
Revert "Dynamic Texture target selection" completely
libstagefright: Initialize audio routing flag in the constructor

If the audio routing flag is not initialized, it could result in
some rare errors which will cause routing to be in bad state.

(cherry picked from commit 74d381b2ca643515abf2bafa587df0b1cc7e56c7)

Change-Id: I3f4b9b3e172921a397f4ad2a55c8e0e429af13bc
Revert "SurfaceFlinger: Skip composition when rotation is not completed"

This reverts commit a59ff8f9724cabf4c451fbe88f0d96b9aa5ba4cd.
Commit seems to cause screen updates to be skipped, especially when
rotating to play video.
Add option for switching between UMS and MTP/PTP mode. (1/2)

This adds support for switching between UMS and MTP/PTP.
Framework part (this part) will only enable UMS if the config setting is set.
Standard is to enable UMS if the primary volume supports UMS.

p2: Fix compile error
p3: Some code styling
p4: Fix mysterious bug where USB notification is not fired when switching from UMS.
p5: Revert last commit.

Change-Id: I753b7dd3823958da1b043ca44b50118d67637cc1
Increase size of the tablet status bar settings

At 280px the status bar settings needs to be scrolled
quite a bit in order to see the available toggles.
~380px should be the limit for a 1024x600 7" tablet

1280x800 10.1" tablets could overlay this with 480px
and it will still fit.

Change-Id: I9d4b9a882c28bebfe636d9f29e42eafd21ce189a
Disable UMS splash when phone in locked state

Currently devices which use UMS will display the UMS toggle screen
over the lockscreen. This would allow unauthorised users to access
the contents of the SD card, when plugged into USB, without first
unlocking the device.

Disable the UMS splash if the phone is in a locked state.

Change-Id: Ic18462758344c327e70e6a70d674f08d8ad51cb0
Sensor: Add RotationVectorSensor2

Some ICS apps (namely, Google Maps) expects a rotation vector to be
available. Newer devices, this is provided by either Android's
sensor fusion (requires Gyro) or by hardware sensor fusion (MPL).

Older devices will lack this virtual sensor and compass in Google
Maps will not work. To fix this, we can provide our own rotation
vector sensor by converting the values from the orientation sensor.
(They are basically the same information in different formats.)

Thanks to Unhelpful for the help with related math.

Change-Id: I596f5dc44f8797bc280ae5d1e110bb92387c79d1
libstagefright: Fix for application not responding when going to next song

- When a song is ended, the driver is paused, flushed and then close.
- The issue is that under some scenario, the song is ended before the
  driver is initialized. Pausing the driver as result causes a native
  crash
- Issue is fixed by only issuing the pause to the driver if it is
  started.

Change-Id: Ib839a087136526e9186fc37c8cb29c681612e6c9
CRs-Fixed: 339578
(cherry picked from commit a7117328a21eca0fc422b56c12acfab25f17873a)

Conflicts:

	media/libstagefright/LPAPlayerALSA.cpp
frameworks/base: Fix for sta not associating to the AP with WPS pin.

Increase the authentication retry count.

CRs-fixed: 345577
(cherry picked from commit ec3435e9d149d6265a42e55216523dc3d07e7859)

Change-Id: I214ef7d4e1446f4e1d942820e4573242a1d62c82
surfaceflinger: Silence warnings for missing earlysuspend support.

Earlysuspend is gone from the Android 3.3 kernel but surfaceflinger
still expects it to exist. Apparently this is know about upstream and
fixed, but this hasn't been pushed out into 4.0.x

We don't know what the upstream fix is, so for now we will change
the code to fail silently if the frame-buffer earlysuspend files
are missing.

This fixes LP bug #906210

Change-Id: Id1e30981ac1c94cc59b31515d51e52fbed9e88d9
Signed-off-by: Jon Medhurst <tixy@linaro.org>
libstagefright: Fix video encode I-frame interval setting

The i-frame interval setting is not configured properly when
b-frames are enabled.

Fixes the calculation for the i-frame interval setting when
b-frames are enabled.

CRs-Fixed: 348669
(cherry picked from commit 3fed07eac060215748b67e9d641f84bd684e6a2b)

Change-Id: Idbbeb1df638635336dd54dc2fe227d06a367ea79

Conflicts:

	media/libstagefright/OMXCodec.cpp
Revert "Avoid video buffers filling and flushing in SEEK state."

This reverts commit fb5e9a00c86cfe6f6162769f3ee4277e42a5d976.

While seeking a video in paused state OR if a video is paused, suspended and then
resumed,videobuffer is NULL. In such case, videoBuffer check stops posting
video events and frame update is not happening.Removed the check to allow
posting of video events in such usecases.

CRs-Fixed: 343940
(cherry picked from commit be7905d58e71c10825206092a62617732d9fb5b9)

Change-Id: I586722c233cbe9bcd09bb6259d6e01ab80f1b83e
NuPlayer: Avoid scaning for source when in pause state

Conflicts:

	media/libmediaplayerservice/nuplayer/NuPlayer.cpp
frameworks/base/nuplayer: Enable Smooth Streaming only for HLS

Conflicts:

	media/libstagefright/ACodec.cpp
Set Software AAC Decoder as default for RTSP based Streaming

Conflicts:

	media/libmediaplayerservice/nuplayer/NuPlayer.cpp