Revert "PhoneWindowManager : bring inline with Slim handling of volume wake and cleanup"

This reverts commit 7e8461c1a8e9f7386f39e6205af470c47dccc47b.
Revert "Revert "PhoneWindowManager : bring inline with Slim handling of volume wake and cleanup""

This reverts commit c325232c087b707624e330ec06db64297d824dc4.
Floating window : Lost in merge
Keyguard: add smart cover support

Change-Id: I436eba7678b923a9f293e15d786447214bc9bdcb
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	packages/Keyguard/res/values/cm_strings.xml
	packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java
(1/2) Base: allow to disable smartcover

Change-Id: I830928794fdfc1c42acc381458603b3554b94155

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
policy: respect FLAG_TURN_SCREEN_ON flag with device flip covers

If an application uses WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON
and the device supports covers and the cover is closed, then after the
screen would turn on due to this flag, it would immediately be turned off
because PhoneWindowManager thinks the cover is closed, so it puts the device to
sleep.

Respect this flag and do nothing if it is detected.

Change-Id: I7eb36ce676730e47c551518e214b08561c401ea5
Signed-off-by: Roman Birg <roman@cyngn.com>