frameworks/base: Fix to avoid UI freeze issue.

Due to some race condition in WindowManagerService, Screenshot
layer remains as topmost and buffers are not flipped hence
no updates seen on the screen. So, trying to destroy persistent
layer explicitly if freeze timeout expires 6sec.

Change-Id: Ibe295550a7431a4f633a57e7dfab0cbda102ab87
MediaMuxer: handle expection for add track

Native addTrack call throws IllegalArgumentException on failure.
Catch this exception in MediaMuxer and throw IllegalArgumentException
that calling function can trap.

Change-Id: I97239ee2272c754ef6d7d54c5a27d1889ac01b80
SystemUI: Remove unnecessary mobile data activity icon update

The unnecessary mobile data activity icon update causes activity
icon is 0 when mobile data is not actually used. As a result, data
icon will not show even if data connected.

As mobile data activity icon has updated in updateDataIcon, do not
update it again in refreshViews. Remove unnecessary mobile activity
indicator icon update.

Change-Id: Ib39c55a39a0623cc9a2d14508d487f86e3a0f82f
CRs-Fixed: 745386
SystemUI: Set zen mode to no interruptions if silent mode is set

When setting ringer mode to silent and current zen mode is off, zen
mode will become priority interruptions mode. As a result, ringer mode
is set to normal mode in updateZenMode.

Set zen mode to no interruptions when ringer mode is set to silent.

CRs-Fixed: 744813

Change-Id: Id104e5473d0e8d624b06dfc9e5dbd8d9f7627b6e
SystemUI: Fix task manager title not change with language issue

When system language changes, task manager title and kill all button
name do not update.

Set task manager title and kill all button name when refresh task manager
view to ensure they change with system language. Rename task manager tile
to meet multi language requirement.

CRs-Fixed: 741079

Change-Id: Ic247c2a70cd63ccb87fd2f3bea05196e28060857
SystemUI: Fix sim pin lock message displaying incorrectly issue

When verify password successfully and no sim card is pin locked,
getSimPinLockSubId returning invalid sub id causes slot name
displays incorrectly.

Do not update sub info if sub id is invalid, remove inappropriate
security message update to avoid displaying incorrectly.

CRs-Fixed: 737973

Change-Id: Ic4c4aca09456008c72677aedd9caa6af9e84da8f
VideoView: Check state before calling suspend

Only call suspend under certain states. There is a possibility
that when activity is finished, pause gets called before destroy
calling suspend and stop on mediaplayer respectively. This will
result in stop failure as it has already been suspended.

CRs-Fixed: 750459
Change-Id: I34c24d6abe3726b163f9a582d73b31dfd4094e44
Allow override of DUN settings

Allow override of system DUN settings by setting
persist.sys.dun.override
to one of the following values:
2 = not set, 0 = DUN not required, 1 = DUN required
If the prop is not set or is set to an invalid value the system setting
will be used.

Conflicts:
	services/java/com/android/server/connectivity/Tethering.java

Change-Id: I296f303a23351e4ab29898895abfcd313c747db9
Sounds: Cleanup duplicate ringtones/alarms

Removes duplicates from AllAudio makefile and fixes title tag of
Promethium (from Platinum).

Change-Id: I767a846dbc5575ec9f86b1326e0b9f7aa015086b
immersive mode: don't unconfirm a package, that's just dumb

* This is very annoying for specialized apps
* See here for a great explanation http://stackoverflow.com/a/20309721
* The fact that it doesn't even notify the user until the NEXT time they
  run it makes it completely pointless in my opinion anyway.

Change-Id: I423611efc07d467e1d81c66d58adcff331be8b38
frameworks/base: Add support for fully transparent layers

Allow apps to specify a window to be fully transparent. This hint
can be used later by the compositor to drop the layer.

Change-Id: Ib58f1026e74ca39e7160d2adcb34ebf50ec28a9a
Optimize drawBitmapMesh using TRIANGLE_STRIP

Draw BitmapMesh using STRIP instead of TRIANGLES.
Depending on where the bottleneck is located in the pipeline,
there is a potential for saving two-thirds of the time spent rendering.
The speedup is due to avoiding redundant operations,
i.e., mapping each vertex four times to texture and color attribute,
sending each vertex twice to the GPU, vertex processing of GPU ...

In this patch:
1. Refactoring mesh using Strip.
2. Batch triangles by adding degenerate triangles.
3. Optimize computing positions of texture and color attribute.

Benchmark: Drawing Bitmap(1152x768 px) with 200x200 meshes
Performance is doubled (from 26.4 fps to 53 fps, Nexus10).
Memory footprint: only 17% of original method.
(from 240000 to 40401 vertices with xy, uv, rgba data.)

Change-Id: I08c5c20d981d88528ce7b02012feefae468d6ec4
Signed-off-by: kui.zheng <kui.zheng@arm.com>
Configurable 0, 90, 180 and 270 degree rotation

Change-Id: Ia1859c51d71ef9d01cec2d13c6468ed89c6ac53e
Contributor: jonasl

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

- Add system setting

Change-Id: Ia7bf8cb64258e1d602230a8f9ea227d3b56a4dab
Merge pull request #4 from CyanogenMod/cm-12.0

Merge branch 'cm-12.0' of https://github.com/CyanogenMod/android_frameworks_base into cm-12.0