Revert "libstagefright: Change thread priority for LPA threads"

This reverts commit 207e6d91507d232e08a31b2d0845cb2f6176a93c.
FLACExtractor: Don't check size of first STREAMINFO

The size of the first STREAMINFO is not necessarily 042, as some
encoders may fill it with padding. The metadata parser handles
premature EOF just fine, so we don't need to be strict about it.

Change-Id: Ic077633c2622bb54402cdd8f04d30cd2b7776727
Add header for forward compatibility

Change-Id: I6e3da852d50fc14cfb6fb50f7dd867f37daea19d
Transparent activity orientation problem when previous landsacpe fullscreen activity not yet destroyed.

After terminating landsacpe fullscreen activity,
when user launch transparent activity via portrait home app, transparent activity is shown as landscape mode.

At this time AppWindowToken of previous acitivity has not been deleted, because Activity.onDestory() has not been returned yet.
In this case, getOrientationFromAppTokensLocked() returned ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE.

Ignore hidden application is terminated on the top.
See also http://code.google.com/p/android/issues/detail?id=28927

Change-Id: I51239431120ec6ba8f8ff76871efb2347b9810ca
use utf8_length() instead of local function, isValidUtf8()

utf8_length() from libutils returns -1 when source not contains
valid sequence for UTF-8. Fixed to use it and removed the local
function isValidUtf8().

Change-Id: If2834ce1d1ae07fd8526ce8bc5df3fd3f44e85c8
Signed-off-by: Homin Lee <suapapa@insignal.co.kr>
Remove deprecation on android:enabled attribute.

The android:enabled was never deprecated and replaced by
android:state_enabled as it was mentioned in the documentation.

The attribute android:enabled when applied to a TextView (or its
descendants) still works until now. In fact that's the way to
disable widgets from layout XMLs.

The deprecation made ADT and lint suggest users not to use this
attribute.

Change-Id: I5e7d7060d9e79a04342ebc723d7937b9bc12a018
Signed-off-by: Yuku on yuku4 <yukuku@gmail.com>
SurfaceFlinger: Handle WFD and HDMI concurrency.
libstagefright: pause AudioStream when bt is disconnected.

Notify AudioPolicyManager that device is in paused state when
BT is disconnected

CRs-Fixed: 349091
(cherry picked from commit e2fd42a43f92696f917b74b23a1cce9ac276a707)

Change-Id: I5377f8568e1fccb11685ca0e718968eb1823d539
add ifdefs for needed qsd8k ffc camera paramaters and such.
Fix build - re-generate current.txt

Change-Id: Id6a3100e4aaed473172237ab368e5aeeb7ccf577
fix typo HTC_QSD8K to CAM_QSD8K
correct defines for qsd8k ffc hoping it doesnt break support for anything other platforms.
oops, forgot to remove those.
Issue: Foreground activity performs [Resume] and [Pause] when any process died in sleep mode.

Step to Reproduce
1)	Turn off device’s screen. (Sleep mode)
2)	Kill any process.
A.	Engineer Version: kill [PID]
B.	User Version: am force-stop [Package Name]
3)	Foreground activity proceed [Resume] and [Pause] consecutively.

Reason: Since ICS version, activity goes to stopped status when screen turns off.
stopIfSleepingLocked( ) makes activity to stopped status but, pauseIfSleepingLocked( ) was used in GB
and, activity keep paused status and, this problem did not occur.
This change give effect to resuming activity when any process was killed.
Because, resume is proceed without exception for activity status.
The exception only filtered for [ActivityState.PAUSED] in sleep or shutdown mode.
and, resume complete flow when activity status was [ActivityState.STOPPED].

Solution for this issue:
We think that exception’s condition have to change if stopped activity status is intended in sleep mode.
According to activity life cycle, activity can not resume from stop status.

Also check [ActivityState.STOPPING]. :)

Change-Id: Icca3366ac30ffa3b18f6e2393e4d7309089ef26a
Fix for too many binder calls in packagemanager

The packagemanager uses a ParceledListSlice to send back its lists
of installed packages and apps. The list slice has a method append
which, in addition to adding the item to the list, also returns true
if the list has passed a size limit (about 1/4 of the total possible
IPC parcel size) to let the caller know that he should send the
slice. However, when used by the pm, it has an extra ! that makes it
send whenever it ISN'T over this limit instead (and conversely, not
send if it is under). This causes a lot more calls than needed since
it sends tiny one item slices instead of larger ones. This patch
removes the extra ! making it behave correctly.

Change-Id: I8db46d380a25406b55f3214aee1505e81949acc5
libstagefright: Decrease LPA buffer size to 256 kb

CRs-Fixed: 344793

Conflicts:

	media/libstagefright/LPAPlayerALSA.cpp

Change-Id: Ia9d13985dffa0473b3bdadc547eeb06b114b5a8b
libstagefright: Change thread priority for LPA threads

- Since A2DP behaves like a render thread, there is a need for it
  run at urgent audio priority.

(cherry picked from commit 3b81741adf7b743cfa72874f63bf561950c9cd22)

Change-Id: I9d7ee924766fef1ac77c47dc445d8d32a305d700
drawable: added dark holo background image with correct gradient

Change-Id: Ife59a9892ba4619cd2017e0345de234bfe0bd444
extend PreferenceActivity for title text on a single pane mode

startPreferencePanel() ignores titleText on a single pane mode
this commits extends PreferenceActivity by adding EXTRA_SHOW_FRAGMENT_TITLE_TEXT to intent

Change-Id: Ie0702dc20b17504148f4da9cc83a6d7865d95423