services: Fix the bug in NFC shutdown logic

nfcOff should be checked for NFC shutdown instead of radioOff,
which is used for radio status.

Change-Id: Iafd620dc89ae8bed7855e313676527d4de32cb7c
base: App crash when select suggestion's length more than specified.

App crashed by catch IndexOutOfBoundsException which raised
by check span range when select suggested string.The root
cause is that the editor will truncate the suggested string
which length is more than it specified, but it also set span
use the suggestion's original length.

Update the suggestion's real length after editor replace the
original string to suggested.

Change-Id: I2d765701934a9e68be172cb87a104590f3cdeceb
CRs-Fixed: 532211
Audio: Fix abnormal keytone playback during silent mode changing

Change-Id: Icfc4003c9756b3c33578c137e59dc4a2b4f25647
Author: Chenyang Du <chenyang.du@intel.com>
Signed-off-by: Ertao Zhao <ertaox.zhao@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 19084 4898
frameworks/base/: Fix black wallpaper issue when home pressed.

In the specified usecase, there is a completely new set of
windows that appear on the screen during rotation. And the
existing code in the framework ignores the drawstate of the
hidden windows.

Wait till the drawState is ready for the hidden windows also.

CRs-Fixed: 521758

Change-Id: Ibd96502059c84210ad84ecb03aac5eca28f3c9fe
SystemUI: do not collapse panels if keyevent was canceled.

Change-Id: I9af82e9fa2305142521075938dfd05521adeb9f4
Wipe and re-create database on downgrade.

Not a very common situation but should fix some errors that could
 arise from flashing an old ROM over a new one, without wiping data.

Change-Id: I27f2a00396761105987830921bb3f8cb339d2171
Merge "base: App crash when select suggestion's length more than specified." into kitkat
Merge "frameworks/base/: Fix black wallpaper issue when home pressed." into kitkat
Merge "Wipe and re-create database on downgrade." into kitkat
Merge "Audio: Fix abnormal keytone playback during silent mode changing" into kitkat
Merge "SystemUI: do not collapse panels if keyevent was canceled." into kitkat
Recents: Clear all button for recent apps.

An icon will appear on navbar when there are apps available to be killed on recent apps.

Credits to @BigBrother1984 for kitkat porting from jellybean

Patchset 2: Tablet mode is deprecated now, so no need of multiple callbacks
Patchset 3: Remove copyright from unaffected files
Patchset 4: Remove unused imports

Change-Id: I93d1d4cb34325190b03ae3a0d40e1bc170c92d91
Lock Screen: quick unlock feature

Allows unlocking of the device without pressing enter for passwords and pins.

Change-Id: Ia85164a9758c8c5a3a11b48fed4092cdbf6dbec0
Signed-off-by: Evan Anderson <evan1124@gmail.com>
(1/2) Volume Rocker:

* Volume rocker wake
* Volume rocker music control

Change-Id: I0b9b252153e1fe048f7048a9da2197797a577ff1
Signed-off-by: Andre Saddler <dresadd09691@gmail.com>
Quick Unlock fix

fix for this commit: https://github.com/AOSPA/android_frameworks_base/commit/8ad03d975f4001a049b292a424f11bb760396b77

Change-Id: I5dcb9875a13130f549a5fd5137897208b364d003
Signed-off-by: Andre Saddler <dresadd09691@gmail.com>
Merge branch 'kitkat' of https://github.com/AOSPA/android_frameworks_base into kitkat

Conflicts:
	core/java/android/provider/Settings.java

Change-Id: I23c8f97c7eaba95a8b55ea5ea8503eefa4527213