AudioService: add STREAM_DTMF to stream affected by ringer mode

-STREAM_DTMF volume muted when phone in vibration or silence
 mode but will not restore when back to normal mode by setting
 STREAM_RING volume to 1
-Add STREAM_DTMF to the list of stream volume affected by ringer
 mode

Change-Id: Ib91d6b2c09e10b5cd86ae192cf334c69884da294
CRs-Fixed: 549908
Keyguard: Fix crash in widget pager

Systemui crashed during automatic test, due to NPE of currentPage.

Add null protect for currentPage view.

CRs-Fixed: 715102

Change-Id: Ia1ac67a28fc3aeca6395200adc3448923775164f
Mms: Fix mms Null Pointer exception when running monkey test

InsertionHandleView dismiss again after onDetached()

Dismiss only if PopupWindow is showing.

CRs-Fixed: 713460

Change-Id: Ic60443b9e557184031678516dc3665bf61b78bf7
Add configuration for sending and receiving Mms with data disabled

Use framework resource to config the feature that sending and receiving
Mms when data disabled

CRs-Fixed: 532101
Change-Id: I96362a66aea228afd3033cdf9343468a6d3ffa83
Cherry pick from I96362a66aea228afd3033cdf9343468a6d3ffa83
Support SD card absent indicator

Change-Id: I7c08b86b7ae5e05ac9fce305928ea99099c6e938
Support alert type profile default:Vibrator & Ringtone for settings.

Change-Id: I9e2c1efdfabc0ffa0e9cf44cee31781f15e8894a
Regional: Customize wifi hostspot and wifi name

-Set WLAN hostspot's default security type to none.
-Customize hostpot ssid and pass.
-Customize wifi direct name for carrier.

Change-Id: I164da0ddba195404ef07ec9e62787b7ff5871661
ChooseTypeAndAccountActivity: Fix the Null pointer Exception of monkey test

ChooseTypeAndAccountActivity crashed during monkey test, due to Null
pointer exception occurred.

To fix this issue, Add Null pointer check before we use it.

CRs-Fixed: 478250

Change-Id: Iae3e331edfda238ecb0c6d5d32b15329b1dfee0b
PrivacyGuard : expand array for additional AppOps

Change-Id: I9f91a38a1813bc0c27074c4d6d9a325e57699a1b
Frameworks: Move strings and symbols according to our code guidelines for recent CAF imports

Change-Id: I7f3f56354952f88b8aa061d26875d4b90685d26c
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
Frameworks: Add several Slim helper classes and constants back

Change-Id: Ifeaca783c7b455f6846e20dba1aebf08c9226edd
Frameworks: Add reboot menu - prepare for Slims Global menu - misc changes

Adding advanced reboot menu like it was on kk4.4
Adding advanced reboot secure option
Move reboot into safe mode from longpress power to longpress reboot
Enable for now per default Airplane mode and sound and reboot till we have imported our SlimActions class to make in configurable

misc changes and adaptions to lp

Change-Id: Idd4f56d985ac51ade5f8deb2597d8f1dda22088a
    Improve scrolling cache

    Scrolling cache helps make short scrolls/flings smooth but will
    cause stutter when long flings are made. This patch disables
    scrolling cache when long flings are made.

    This patch also fixes a related bug where scrolling cache will
    not be enabled properly when transitioning from flinging to scrolling.

    Patch Set 2: Calculate threshold based on maximum velocity (Sang Tae Park)

    Credits: Pawit Pornkitprasan

Change-Id: Iad52a35120212c871ffd35df6184aeb678ee44aa