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

(cherry picked from commit 1dd6f42412fb6a15c64acb71028798432ff06ba9)
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

(cherry picked from commit b30569b021d81a0598dbc5f131ef5f1de31f2d0d)
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

(cherry picked from commit 18d823cb53b13fae2a9a17d6fae4a466c311529e)
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

(cherry picked from commit 5e0f5527a8f025b3939e73a8bee42ceaa864efc2)
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

(cherry picked from commit 2c364790e9bf971738bb5fcc5524221528ef3ca3)
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

(cherry picked from commit a17b9b9fb312624d181e238fb317644666f0743e)
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

(cherry picked from commit efe7da1bd9d95e38e69557ce3494a60983705dfe)
Sounds: Cleanup duplicate ringtones/alarms

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

Change-Id: I767a846dbc5575ec9f86b1326e0b9f7aa015086b

(cherry picked from commit 0f195e0204665437d331606a4335cd4ca54a8119)
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

(cherry picked from commit 5387341d7a0cc3cfc24cec98f0f0c4c3bab45349)
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>

(cherry picked from commit ccec048da3a86d67b4d487101fff15711c833f47)