Fix for framework reboot on format of SD card

MountService is not aware of /storage/emulated/legacy path which is
causing the issue on ExternalStorageFormatter service. We are getting
the a list of non-emulated SD cards and format the first one .

Change-Id: Iba1a9f6e40499f7f6fb095a5ee4e711b02bed439
CRs-fixed: 489037
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
Fix for Concurrency issue reported in  525529

List of services mainted by ActivityManager may get
updated/iterated concurrently if serviceTimeout() is
scheduled simultaneously with launch/stop of new services
for the same package.To fix the issue ,iteration of
proc.executingServices set in serviceTimeout() is synchronized
with same lock used by updating the set during
start/launch of service.

CRs-fixed: 525529

Change-Id: Ic230ad0d16e6ec64a20cf394aa1c1ce777c37a2b
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
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
FileUtils: add method to get UUID of a volume

Change-Id: I41b76c5e01c82a2f8e67b33133a76947877a2814
Hardware key custom rebinding (1/2)

Framework changes to allow rebinding of the actions performed on the following
key press events: Home long-press, menu press, menu long-press, search press,
search long-press, app-switch press and app-switch long-press.

The available actions are: Nothing, open/close menu, recent apps switcher,
search assistant, voice search and in-app search.

Patch Set 1: Initial port from ICS [done by Konstantin Koslowski]
Patch Set 2: Added 'assist' (search) key customisation
             Option for ICS-style in-app search, in addition to jellybean-style
             search assistant.
             Fixed double haptic feedback on virtual key press.
Patch Set 3: Checkbox to enable/disable all custom bindings.
             Home long-press defaults to no action on devices with
             an app-switch key.
Patch Set 4: The recent apps list will be preloaded on the initial down press
             of whichever key to which it is bound.
Patch Set 5: Fixed menu virtual key press sometimes performing the custom
             action bound to the menu key instead of just opening or closing
             the menu as it should.

Conflicts:
	core/res/res/values/public.xml
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: I72c0d220a09d79230bfa299e0521ed693e5c25f1
Allow hardware overflow key to be show by default.

Currently this is controlled by a system setting, but there is no way to
set a default value for the system setting. This is very useful to have
for devices that have no hardware menu key.

Change-Id: I94212def19d3e2224d79d3a89e1e2d3b2883da21