Download: add to support pause/resume download by manual

We add pause and resume API here so that application can
pause and resume downloads manually by DownloadManager.
This contains two points:
1. add pause and resume download APIs.
2. add another paused reason for this download status.

Change-Id: I606b48ca20f43bcc6c119683818c2ab6ff03bfe5
decouple SW FLP and HW FLP overlay flags

currently there is only overlay flag shared by SW FLP and HW FLP. This
change allows having different overlay setting for sw / hw FLPs.

Change-Id: I643fa70380e7568ae851d23e87917a5b4b599fe8
CRs-Fixed: 622338
Combo Provider: Specific location screening

Only screen network locations if Combo provider is
the connected network location provider.

CRs-fixed: 608477

Change-Id: I513bddae9cff493dd9aac4460168864548e4bfb4
Fix for crash in LocationManagerService

Resolved issue where MockProvider was being cast to
LocationProviderProxy and would cause a fatal exception.

Change-Id: I7c8c83961dd03d59292e773b01995ed6b3ac04c7
CRs-fixed: 619882
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

Conflicts:
	services/java/com/android/server/power/ShutdownThread.java
CM11 Themes: Include alarms in mixnmatch.

Change-Id: I004f6b0149d71c8ed1a3952704f5a3521eca5add
Revert "CM11 Themes: Include alarms in mixnmatch."

This reverts commit 481894603e7b7b5b957504c13c142b89068d78a4.
QS Tiles: Add back stock tile actions[1/2]
Network tile changed to begin with. The remainder tiles will follow.
QS Tiles: Add back stock tile actions[2/2]

This completes adding stock tile action to remainder tiles.
MediaFile: support more media types

Change-Id: Ib3109c5ebc762b97e45bd0bb5fa82ad77b0e6822
CM11 Themes: Ensure customTheme is not null.

The configuration retrieved via getConfiguration() sometimes contains
a null customTheme which results in the theme returning to holo when
applying a component such as icons.  Icons will change but styles
and fonts would return to the default.

Change-Id: Iac0cb8eed5de8fdc9fe8efd697d968f26e801c08
CM11 Themes: Properly handle SystemUI theme package name.

Change-Id: Ia8915684e1620184dcc513c2c5039ea20aabbd04