Add background app limit tunable.

Set MAX_CACHED_APPS based on a system property "ro.sys.fw.bg_apps_limit"
so that number of background apps can be tuned accordingly.

Conflicts:
        services/core/java/com/android/server/am/ProcessList.java

Change-Id: Ie21b0961dad10e1cd6da3cfe2a45eff45dc8756d
ShutdownThread: Add hook to call into oem shutdown function

We now invoke a oem specific function as part of the device shutdown.

Change-Id: I71643064130c606562ad21f61db937b508d43f41
BootAnimation: Play boot/shutdown animation and music

Add support to show customized boot and shut down animation, as
well as music.

Change-Id: I69c87640175a96a18833a763a34afd362bbfb487
Conflicts:
cmds/bootanimation/Android.mk
cmds/bootanimation/BootAnimation.cpp
Revert "Freeing frame map"

This reverts commit 0c1eeb3c8ab53954218d3b8f4be08ff21be3e985.
Change-Id: I535330edb636f9457beed0849147168eaa6ae2ec
Conflicts:
cmds/bootanimation/BootAnimation.cpp
Bootanimation: Fix the low memory device oom when run boot animation

Low memory device is easily to be oom when run boot animation. Here
we do optimize the boot animation GL Texture only one frame needed.
That is free timely and re-init it again. When in boot animation,
the fps=15, so it is ok to do the delete and re-init.

CRs-Fixed: 572325
Change-Id: I1e81c3d0f3600ac895f9bd7bd00a284f3d4b7d4c
bootanimtion: fix no boot sound due to error file descriptor

-wrong file descriptor passed to setDataSource(fd, offset, length)
 API and causes no sound
-use the default setDataSource(httpService,url,header) to parse
 the file of boot sound

CRs-Fixed: 731547

Change-Id: I437e7d797cd13b7f8f8e0fbf81d5de99c55c27d1
androidfw: Init the items which are not present in the idmap as 0xffffffff.

When creating the idmap, if the entry is not present in the idmap, need to init
the item as 0xffffffff.

Change-Id: Iae4a968599e97b29c8b1e1de6a6c1d2639ba240a
Merge remote-tracking branch 'slim/lp5.0' into lp50s-test