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 'aospa/kitkat' into kitkat

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/notification/HoverLayout.java
	services/java/com/android/server/power/PowerManagerService.java

Change-Id: I148e7752c045807df30d17857f3572eda669433a