Recover apps with malformed certificates.

There was a window of time in Lollipop where we persisted certificates
after they had passed through a decode/encode cycle.  The well-written
OpenSSL library was liberal when decoding (allowing slightly malformed
certs to be parsed), but then strict when encoding, giving us
different bytes for effectively the same certificate.

A related libcore change (0c990ab4a90b8a5492a67b2b728ac9a4a1ccfa1b)
now returns the original bytes verbatim, fixing both pre-Lollipop
installs and installs after that change.

This change recovers any apps that had been installed during the
window of time described above by doing a one-time check to see if
the certs are effectively equal.

Bug: 18228011
Change-Id: Ib82bd6db718d0490d7a26c9c1014b7c8457a7f2d
Import translations. DO NOT MERGE

Bug: 18218486
Change-Id: I929129a2c443e4db78e0ad4e78e653a7cd603855
Auto-generated-cl: translation import
Increases the falsing threshold when for the keyguard affordances

The minimum amount has been increased by 20dp and in addition the
Motion is cancelled whenever a POINTER_DOWN occurs, which should
help a lot with falsing.

Bug: 18298401
Change-Id: I04b1f30fd2555c08209224f4e84c610ecd7a33f1
(cherry picked from commit 1dc406505cdcbbf98ece4f15a2f98f621e24abdb)
Add configuration to control converting sms destination number

Romove hard codes about the SimcardOperatorList and NetworkOperatorList.

Bug: 18081228
Change-Id: I0d96972c6097325634413137bfbdb5a246885276
Setting ADB_ENABLED may result in a SecurityException.

If the restriction UserManager.DISALLOW_DEBUGGING_FEATURES is enforced,
then any attempt to set ADB_ENABLED will result in a SecurityException.
This can result in the device not being able to boot.
Bug: 18433477

Change-Id: I21e4b406ad0fa89b7d4b678eac1baf212a3c7acd
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
Fix null handling in proxies.

ProxyInfo.getPacFileUrl() can not be null.  It will be equal to
Uri.EMPTY.  Checking for null was causing global proxies to never be
disabled.  Or more accurately, global proxies would be disabled, but
would reappear after a reboot.

ProxyInfo.getExclusionListByString() can be null.  If no
exclusion list was specified, the proxy settings would not be
successfully saved, they would disappear after reboot.

Bug: 18453223
Change-Id: I1c27e5dca5b9664bb7468ea909bff489fa110a07
Frameworks: Add several Slim helper classes and constants back

Change-Id: Ifeaca783c7b455f6846e20dba1aebf08c9226edd
Frameworks: smart pulldown we do not support anymore

No QS nothing smart needed anymore

Change-Id: I5187fd00cf45f28d5749f26acfaefbae45f82be6
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
Fix fr-CA locale AOSP bug

as reported on aosp bug tracker fix for crash from systemUI/keyguard which results in heavy system instabilities.

Change-Id: I30d17e16048b738624523e77da05ca11c575a91b
framework:Thread synchronization for UI update

Issue : Framework reboot was observed due to out of sync between
        two threads which inturn causes Null pointer exception
        while updating airplanemode.
Fix : Handled Null pointer exception and the crash is not observed.
CRs-Fixed: 570122

Change-Id: I2e969f6e7726ffcf8648b366ebb54cb2b0afc292
    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
Turn off carrier provisioning by default to allow tethering

Whether or not to use carrier provisioning is a setting hidden to the
end user that is currently not set. Unfortunately, on some carriers that
may result in it being set to yes, or effectively set to yes, without
other accompanying changes that must occur, such as setting a tethering
apn and possibly having a carrier provisioning app, resulting in hitting
a paywall when a tethering plan exists, or, worse having nothing happen
at all when you try to tether since the data doesn't have an apn set.

Change-Id: I3b5b3cc86e3325302411f46e3fd5f7a7c1b9f57e