ProximityWake: Squash and port from CyanogenMod

PS1: Add support for checking proximity when waking device
PS2: Fix proximity wakeup reference
PS3: Be sure to shutdown the proximity sensor after display wake
PS4: Check proximity flags only if from native

Conflicts:
	core/java/android/os/IPowerManager.aidl
	core/java/android/provider/Settings.java
	services/java/com/android/server/power/PowerManagerService.java

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I5d09f6480b3e0b3a059bcc990f156117f4250483
HOVER: A few improvements

- Better touch outside touch input handling
- On touch outside hide both case (expanded and non) in 1.25 secs
- Tweak clear foreground notification when we are on the same app
- Code style
- Tiny cleanup

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: Ibb0c7c09ae3256bbf744f359cca651c8cb8112d9
Merge "ProximityWake: Squash and port from CyanogenMod" into kitkat
Merge remote-tracking branch 'pa/kitkat' into kitkat

Conflicts:
	core/java/android/os/IPowerManager.aidl
	services/java/com/android/server/power/PowerManagerService.java
Enable unknown sources, disable package verifier

Credit @Cl3Kener

Signed-off-by: anerikg <anerikgames@gmail.com>
Frameworks: apple can do...we can do as well

incredible apple engineers speeded up the overall UI and reduced per default slightly
the animation scales. Well we do as well and reduce it from 1 to 0.75...smooth, looks well
and does not break anything

Change-Id: Icbcc889e49c8d3ab24cf2b1c10bbe0e8bf7e7637
Add dashclock widget by default
Add system setting for t9 search input locale

Change-Id: I780b3cca1ad2da396b76464a6dab5cc53f621ed2
Make incoming call screen style configurable (1/3)

Change-Id: I12e108e11afcc87cd0ed717dbc6f8a2a2c0f1743
Signed-off-by: anerikg <anerikgames@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
AudioService: Show safe volume panel for non-interactive volume adjustments

If safe volume is active, apps calling mp.setVolume() to adjust the
headset to a value higher than the threshold will have the operation
fail silently because no volume dialog is active to pop up the
"do you wish to override" question.
This is particularly bad for peripherals that use the audio jack
(Square readers, Jawbone bands), since they usually require levels
close to maximum for proper communication and the app isn't prepared
to deal with a silent rejection of the requested volume.

Change-Id: I2047d199506106a87841b8b680007c5ab45b527b
Signed-off-by: anerikg <anerikgames@gmail.com>

Conflicts:
	media/java/android/media/AudioService.java
base: update link ring-notifications after read user settings

Change-Id: Ib424124dc20e38243e572333e323ba97aacb1111
JIRA: CYAN-3559
Issue: https://jira.cyanogenmod.org/browse/CYAN-3559
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Add new Card Unavailable reason for SIM power down in APM.

REASON_APM_SIM_POWER_DOWN value added to CardUnavailableReason enum.
This is to indicate card absent event received when SIM is powered
down in APM.

Change-Id: I985e06d629715ebc0489a2fb19e908ab652bfeeb
CRs-Fixed: 661325
MSimNetworkController: disable CHATTY logs

Change-Id: Ic9dd166aa6ac77647dc69acea31d2ebde3a87f0a
MSimNetworkController: Quiet logspam

* Most uses of Slog.d are not protected by the if (DEBUG) they should
  be. Make it so.

Change-Id: I36151113b1bfcdbe84c27abf39918441e23a8e88
Allow translucent navigation bar in landscape mode.

Change-Id: I5388f3f8a34533624619714bacfba52f95fc6d85
On-The-Spot: Add information on how to reset preferences

Info is added to the main On-The-Spot preference dialog.
https://dl.dropboxusercontent.com/u/90317107/on_the_spot_pref_helper.png
(As suggested by +Carlo Savignano)

I have one improvement in mind.
It would be nice to make the reset hint title ("To reset preferences:")
clickable to toggle the more informative reset message.
(Similar to the permission overview in the Play Store)
But I'll need some time to read more on how do to that.

PS 2:
* delete unneeded code

PS 3:
* Unclutter OTS Dialog
Change-Id: Iaf4f67e4b03babd1d6a604c2524781a748dd8025
Signed-off-by: kajuten <julian.kaltenhofer@gmail.com>
Hover: dismiss to left remove from all (status bar and notif drawer) and from right only from hover

Partialy ported from SlimKat Heads up idea with a huge thanks to @kufikugel.
A boolean is used to determine the dismiss direction and further dismiss the notification completely or only from hover.

Change-Id: Iba7c1841ffaec360d204dc3326f24e91fa1a4310

Signed-off-by: anerikg <anerikgames@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/notification/HoverLayout.java