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
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
framework: fix 'port IME selector notification toggle'

Change-Id: I7801cc9edc2341c447e2c3eafd9344216eb6c0c6
Port: Wake on plug (1/2)

Change-Id: I5e50a7fd351857d76c1c2fd13c6e737d8902a2f3
Recents: Port "Development shortcut" (2/2)

This patch includes the equivalent of our Development Shortcuts in
CM11 recents. Recents is very different now and this is mostly a rewrite.

The semantics changed a bit as well. The current code already has special
developer behavior when long-pressing the app icon and that is also where
the developer shortcuts are hooked. If the app icon is long-pressed and
developer shortcuts are active, a menu will be shown with the several available
options.

Fixes CML-61

Change-Id: I391a360b3dd88e179c2315503d18125f8d0b3792
SystemServer: Move sensor init to a new thread.

Move Sensor init to a separate thread so that it doesn't block the
critical booting path.

Initializing Sensors in separate thread has been seen to improve boot
time on customer devices with low-tier / ult chipsets(less cpu cores)

Change-Id: I5c46a5805c04ffe551019b4683523e3bf70274a2
Framework/base: Relocating GC calls at the end of loop during zygote init

Relocating explicit GC calls at the end of the loop during the preloading
the resources and preloading clases, with this changes boottime improved.

Change-Id: I2e05ef68578eddca8cd435b5186e198ee7d71739
Disable config item to support SIM refresh for dual mode card

Set "config_sim_refresh_for_dual_mode_card" to false;
Resetting this config as majority of the targets don't
need it to be set.

Change-Id: I955fead91e4939172a478fba2b79ae11fecda82b
CRs-Fixed: 665741
Telephony: Add a config item to control fetching APN from OMH card

Change-Id: I5c14a6870ea0767cc14ff3addeeb0828cc704a32
CRs-Fixed: 748148
CamcorderProfile: Add 4k DCI timelapse encoder constant

 4k encoder constant during timelapse is added
 for the 4k timelapse use case.

CRs-Fixed: 642013
Change-Id: I901fa362242477dad84130d23055815cdfee6167
security: prevent FDE after PFE

Full-Disk-Encryption (FDE) is not allowed
after Per-File-Encryption (PFE) is activated.

Change-Id: I17e6039f3b33450835fea6ee5e612c079868b71f
QuickBoot: enable poweroff charging under QuickBoot mode

Support poweroff charging by enable/disable qbcharger process under
QuickBoot mode.

Change-Id: I34ee10443564ba3f9ebc7239137958c80e8db6c9
AppOps: Add null pointer check for USERAGENT parameter.

Fix the Java exception which is caused by null pointer issue in
AndroidHttpClient.

Change-Id: If7e36298f94ca164b87e1b0604f49156bdfd4513
Start MountService before performBootDexOpt

This change is to start Mountservice before starting
performBootDexOpt, as in one case, in performBootDexOpt
when system upgrade happens, StorageManager will be started to
get the low threshold of DataDir. But, at this point, as
Mountservice is still not up, StorageManager will end up
having a null object of Mountservice.

Change-Id: I6dec474266faa5de67449c1bbe6ef30791e5ecaa
frameworks/base: No score update to 100 with wqe

When user explicitly selects an AP, the score of this AP will be
set to 100 and this has conflict with wqe. Disable this when wqe
is enabled

Change-Id: I57db8318a4421038d144bc41bd0ff5ae02d9edd3
AlarmMangerService: Fix the delay of ACTION_TIME_CHANGED for time-services

After boot completed, if low memory condition happens or some ordered
broadcasts have time out, it will cause delay for some receivers to
receive ordered broadcasts. Adding FLAG_RECEIVER_FOREGROUND into
time changed action will make TimeServiceBroadcastReceiver receive
ACTION_TIME_CHANGED in time.

CRs-Fixed: 630982
Change-Id: Id789d0b3c969af6b92f62612602ba119613382ab