Fix very long app_name crash.

http://ibrahimbalic.com/2014/android-os-memory-corruption-bug/ found an stack overflow bug.
The very long app_name make libandroid_runtime allocate a very large array on stack, the stack may overflow to other data areas in this situation.
This patch allocate large array on heap instead of on stack to avoid segment fault when doing memcpy.

Change-Id: I99999569b852d43a9c7a6eb1fa80e9f1a1f4e2b2
Fix setSurfaceTexture to handle surface caching

Changed the TextureView.setSurfaceTexture to apply the
existing listener to the surface provided in the method.
This is done to allow surface caching to work.
Whenever a new SurfaceTexture gets created, its listener is
created as well, so when the setSurfaceTexture is called
we should be attaching the listener to the new surface.

Change-Id: I4c1a704c587e977ab7a6b1fe3a7d3e0d20d00218
CRs-Fixed: 639136
fix WRITE_SETTINGS to be "dangerous"

(see http://www.fireeye.com/blog/technical/2014/04/occupy_your_icons_silently_on_android.html for an explanation why this is dangerous)

Change-Id: I8f938dc4f528aa2ccbca3d4cec235feb0299c0bd
Parallel shutdown

Decrease shutdown time by doing some shutdown tasks in parallel.

There are two threads executing during the shut down: the ShutdownThread
and a separate thread for the radio shutdown. However, the execution is
done in serial, as the ShutdownThread immediately joins on the radio
thread.

This commit will move the shutdown of the radio to the beginning of
shutdown and execute it in parallel to the shutdown of the rest of the
system.

The flow of the two threads during shutdown is now:

Radio Thread
  * Start shutdown of the radio
  * Wait for radio off or time out
  * Notify that the radio is done
ShutdownThread
  * Broadcast ACTION_SHUTDOWN as a parallel broadcast. (The receivers
    will get as much time to handle onReceive as it takes execute the
    rest of the tasks in the shut down flow. If they are not done in
    that time, we don't care.)
  * Shutdown ActivityManager
  * Shutdown MountService
  * Wait for MountService and radio to notify done
  * Vibrate
  * Low level shutdown

Change-Id: Ifdd8a9c75337fd9d00148a0d2b9917e10fa60634
Fix segfault removing theme assets

Change-Id: I4827eb6e2b186547f1df6f9bbd048fb1e3a29890
Style previews [1/3]

Change-Id: Ifed0ef7829eb61492a39395e8140b99f01c5e6a3
Keyguard: give the Keyguard a non-empty app label

A blank app label under "Apps" looks suspicious to
the untrained eye.

Change-Id: Ic679e5d6d825a83a8f666bb7e6429bebf1280f6d
Signed-off-by: Roman Birg <roman@cyngn.com>
[1/2] Base: DownloadManager: add support pause/resume/stop notifications

Add pause, resume and stop functions to make user can pause, resume and stop downloads by manual in downloads application.

Change-Id: I82ffff5a539448faab8933e2b47591199bf24cb9
StatusHeaderMachine: Night starts earlier
Add config_batterySdCardAccessibility to symbols.xml

Change-Id: I0f9dc18ddaaa52d02ba547c827db62d1d765c37f
CM11 Themes: Put overlays in their own group.

Overlays will now be added to their own group and the
target group will contain a pointer to the overlay
package to be used in getResource and getBagLocked.

Change-Id: Icc6c6eb791f04966e68dbc099eae8e7129546414
CM11 Themes: Remove type matching restriction

Change-Id: I5a8ac8ff1794350ff9dc03b378c704bfb97d0a9e
CM11 Themes: Allow forcing idmap (re)creation.

Change-Id: I9f5938e9b1052da83b7f2cd7b1ff6f1ed270db6b
CM11 Themes: Use theme name for audible name.

Change-Id: Ib841cb80925b0f3f5ac770e00df04515849e9360
QS: Make it possible to show smaller tiles (1/2)

* Remove text and show more tiles on one row

ps18: set icon margin based on density of device
ps19: adjust the margin
ps20: implement show text under the tiles
ps21: fix typo
ps22: underp

Change-Id: Ie247aba1ae5fbdb8f5298e30fb2f04a985e73532
QS: smaller tiles: Fix the text labels on small screen devices

The text labels are broken if the density is smaller than xhdpi

Change-Id: Ie9859a9d8d539249de1584953f28ac56256ef35c

Patchset: 1
http://review.cyanogenmod.org/#/c/62935/