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
Merge tag 'android-5.0.0_r7' into HEAD

Android 5.0.0 release 7
Sensor: Enable the motion accelerometer for screen orientation change

The screen orientation can be detected by the motion accelerometer
instead of generic accelerometer to save power.

Change-Id: Iaeb3e5958d2ef7cc33080d7091ed8a5462695c67

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
Duplicate sounds file names are displayed in notification list

There are few duplicate notification sound files present in
/data/sounds/notifications & data/sounds/notifications/ogg.
- arcturus.ogg
- vega.ogg

Maintain sound files only under /data/sounds/notifications/ogg.

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
        data/sounds/AllAudio.mk

Change-Id: Ibe347ed03d19a1ce4cb13c1bce1e4bbc26cb61be
CRs-fixed: 630101
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Audio: Fix title of system ringtone contains messy meta

Title in the Meta information of Bootest.ogg contains
junk characters which is displayed in Settings->Sound-
>Phone ringtones.

Correct the binary file to solve this issue.

Change-Id: I91c0519bb55ee5e74f783b0c147acbde641f6502
CRs-Fixed: 569976
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Telephony: Add TD-SCDMA network modes

1) TD-SCDMA Signal Strength support.
2) Add TD-SCDMA to the list of supported network modes.

CRs-Fixed: 403258, 479310

Conflicts:
telephony/java/android/telephony/SignalStrength.java
Change-Id: I158821574484bfaf47d1660406e591e2afb3be5e
Keyguard: Add config to always enable emergency call button

As the original design, emergency call button will be hidden on slide
lock screen. Add config_showEmergencyButton to control emergency call
button on slide lock screen.

CRs-Fixed: 640998
Change-Id: Ica29e1ec9043272e9d507307fb8744e8eef57b2e
SystemUI: Update cast tile when wifi display status changes

Cast tile in quick setting does not watch for wifi display status changes.
As a result, it will not update when wifi display status changes.

Register a broadcast to watch for wifi display status changes as settings
and update remote displays when wifi display status changes.

CRs-Fixed: 718032

Change-Id: Ib2ca4677be91817c007db941531849bbc7eff5d3
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

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
Disable some debugging
Core: Disable fullscreen keyboard.
Disable packages verifier by default
remove unwanted stuff
- Delete Media Tests
- date: Remove videos

Signed-off-by: Andre Saddler <dresadd09691@gmail.com>
Signed-off-by: Evan Anderson <evan1124@gmail.com>
SystemUI: add quick settings pull down with one finger

Logic is currently set to use 1/3 of right hand side of the statusbar to
trigger a quick settings quick pull down, quickly.

Change-Id: I3f536496f724f07d2419a5b2db5fa8f8261609e7
Signed-off-by: Roman Birg <roman@cyngn.com>
FWB: added screenshot delete action in notifications

allows deleting a screenshot from the notification
inspired from CarbonRom - initial from CM I guess

AICPfy:
brought in from KK

Change-Id: I67b7b9a7808ddb8c54ea4f3a45aad6d44833e1df
Make it boost - (squash)

This is a combinations of UI tweaks

- Speed Animations up a bit
- Frameworks: Speed up orientation rotation
- Speed Up Windows Orientation
- Increase Touch Sensitivity
- Improve scrolling cache
- 0.75 animations
- 1x app delay
- set default longpress time from 500 -> 375
- try to play with animations
- Reduce durations and speed up transitions

thanks to:
Arnav Gosain <nolinuxnoparty@gmail.com>
pcarenza <pcarenza@gmail.com>
Chester Kener <Cl3Kener@gmail.com>
Chet Kener <Cl3Kener@gmail.com>
ctfrommn

full reference here:
http://pastebin.com/ZYvvXWXy
SettingsProvider: Update icon.

Change-Id: I9e1b540e0268643371dd95593eaefa63d4a1827d
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Framework: safe headset volume option (1 of 2)

thanks DvTonder

Change-Id: I5355820a24d48c1d8f54ea17a7022d891ad07857

Conflicts:
	media/java/android/media/AudioService.java
fb: less notifications sound (1/2)

add back the 4.3 feature like it was.
User can setup how often notification sound
for an app comes trough so that
it does not annoy to much

Change-Id: I3d7b2ef2e2ff99b7c23880626e0268ec4c5d8543
Option to use volume keys to control media volume anytime [1/2]

The volume keys control the Media volume rather than the Ringer
hence removing the issue of accidentaly changing the Ringer volume.

Credits: Pawitp

Change-Id: I789e05bdb0bb7c968f71e4e10f4a759b3dbd0b59