Keyguard: add smart cover support

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

Conflicts:

	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>
derp

Change-Id: I11abaac091a282cde4383bcc2a25924d119f0813
Themes: Fix setting wallpaper from a legacy theme

Change-Id: I3bfc9ee24d2a3ee5c1bdb97f2c07427e6d723206
Themes: Track NotFoundException on app launch failure

We should probably keep an eye on NotFoundExceptions too since they
are a common exception thrown when a bad theme is applied.

Change-Id: I2ccaed0349a90ab99b99fb83cef0c9183d598088
Themes: Remove listener if exception is thrown

If something goes wrong and a client does not remove itself, the
theme manager may still have a reference to the listener and an
exception is thrown while trying to call one of the listener's methods.
When this happens, we should not only log it but remove the bad listener.

Change-Id: I052cdcc10b0eaa75ebf076b3ece5f8a668d3868e
Revert "SystemUI: don't show eq tile while casting"

Does not work as intended.

This reverts commit 72dc45fb1b219aafa1d4b2fe62d144739ae4a552.

Change-Id: Ifd40c70c45b038983145369287a6dae177ac0a4c
frameworks: add last app animation, and make sure we handle userID all smart-like when switching apps.

BASED ON:
frameworks: allow last app action to be assigned to hardware keys

Also fix multi-user handling for 'switch to last app' and 'kill
foreground app' actions.

Change-Id: I1fb586d19b1198e6888b0f11e0a2813acf0bcd5b
Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Danny Baumann <dannybaumann@web.de>

Conflicts:

	core/java/android/provider/Settings.java
	core/res/res/anim/last_app_in.xml
	core/res/res/anim/last_app_out.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
AwesomeAction: this handler doesn't need to override handleMessage

Change-Id: Ia87184d841c4bc270a21e70d55142b07bb64ac13
AwesomeAction: Vertical justification: harder than it seems?

Change-Id: Ic1e24c93f30072afd5d61bffe13b297a455d972c
Merge remote-tracking branch 'upstream/kk44' into kk44