A background started service is removed from mStartingBackground when timeout.
Fix is to make sure mStartingBackground is updated to remove one.

Change-Id: I0e42beb550d33e6e400349b85bbb89848e18d520
Fix, MountService now only sends one onShutDownComplete

The event onShutDownComplete are sent only when all
volumes are shutdown. (Not one for every volume.)

Change-Id: I6af521ee8285ca581efac7d3c5f013dfbff3ee30
Finish fixing Zygote descriptor leakage problem

In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID.  These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.

This is a multi-project change: dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected.  The CLs need to be approved
together, lest the build break or the software fail to boot.

Round 2: indent change

Bug: 12114500
Change-Id: I090402136a8a8b7d6aad6eb153026e85d7cf6ad3
[1/2] Speed up booting on multicore devices.

1. Add multithreading support to Installer/installd.
2. Parallelize package scanning.
3. Parallelize boot dexopt.

Change-Id: Id42b2bf4a737f93f9ecd9b5819344adbb735f0fb

Conflicts:
	services/java/com/android/server/pm/PackageManagerService.java

Conflicts:
	services/java/com/android/server/pm/PackageManagerService.java
Fix graphics corruption caused by HWUI caches

Some caches(PatchCache, TextureCache, PathCache) for HWUI
uses deferred removal for their cache entries even though
actual resource objects are immediately freed by
ResourceCache.
For this reason, the uniqueness of a resource address in
the caches is not guaranteed in specific cases.
(Because malloc() can return the same address when malloc()
and free() called very frequently.)

So it can be possible the cache have two cache entries for
two different resources but the same memory address.
(Of course one of the resources is already freed.)
It also can be possible mGarbage vector in PatchCache has
duplicated addresses and this can lead to duplicated free
blocks in the free block list and graphics corruption.
(Deferred removal was implmeneted based on an assumption of
unique resource addresses.)

So this patch makes sure resource objects are freed after
the resources are removed from the caches to guarantee
the uniqueness of a resource address and prevent graphics
corruption.

Change-Id: I040f033a4fc783d2c4bc04b113589657c36fb15b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Fix AOSP build - DO NOT MERGE

Change-Id: I42b420c2ce89ce364a2809b28b827964e6923fa1
Add 2 APIs (suspend/resume) in MediaPlayer

- API:suspend() will just pause the player and release all the decoders
  to replace release() which will release the whole player
- API:resume() will just init the decoders again,
  then start() will be called to start to play the streaming

Change-Id: I3e2ffeb50dfe6d156b18416fa8964ff4a3d56a2c
VideoView: Implement the suspend/resume operation in VideoView

- To use the new APIs (suspend/resume) of MediaPlayer
- Add a new status "SUSPENDED"

Change-Id: I7a829b116e5df698fd4b0a5708f06927571d198c
MediaRecorder: Add pause interface

- add pause in java level
- add pause in jni level

Change-Id: I19372d496870f3729aa28464326995a71aa72299
CRs-Fixed: 587051
Revert "Finish fixing Zygote descriptor leakage problem"

This reverts commit 3e8a1bf24d05831bc82926a0124650569c2eac88.