Fix: SysUi crash on Pie recents

https://paranoidandroid.atlassian.net/browse/AOSPA-79

When toggling recent apps using pie controls on secondary user account,
system ui crashes.

Change-Id: Id43b79dadf4cc4a88534aa18e1138b1daa7eece8
Fix: Graphics error when switching to recents using Pie controls

Attempt to fix https://paranoidandroid.atlassian.net/browse/AOSPA-65

I've never been able to reproduce the problem on Hammerhead, Mako or
Grouper, so I can't guarantee that this solves it.

Feedback is needed from a user that constantly experiences this bug.

Change-Id: I950e94dbb9b9d07dedee9b9f8cab6c5b6bceb6b0
PIE: Prevent a rare freeze that appears on quick iterations.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
PIE: Disable orientation sensor when we don't need it

Orientation sensor always enabled causing some device keep awake and
battery drain. This commit fix this issue.

  * Disable/Enable orientation listener when screen turn off/on if PIE
is enabled.
  * If PIE is disabled, recycle it.

Change-Id: I6bda168b3fd62d9f7047ffc3a3c6bfd08e655543

Conflicts:

	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
[TEMP] PIE: fix a freezing bug

How to reproduce:
- Enable PIE;
- Toggle between on/of;
- Without close expanded status bar click any tile that use one of this methods -> private void startSettingsActivity(String action) or private void startSettingsActivity(Intent intent);
- System will freez for some seconds and soft reboot;

Solution:
- When deteced PIE mode enabled use a runnable with a less time possible to give time to system colapse panels and perform needed actions

Change-Id: Idc5f112873aa7a31993e7a3c82a1760bb45f8b9b
PIE: Unlock screen on triggering recents

* Bring up unlock panel. Clear all is still hidden when lockscreen is showing.
  Thanks to community for pointing this out.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
[1/2] Base: Double tap to sleep

Double tap statusbar to sleep.

OmniGears: https://gerrit.omnirom.org/#/c/4611/

Conflicts:
	core/java/android/provider/Settings.java

Change-Id: I4c54718e8ec8774677d13917b3a7ffa3b4b18cb5

Conflicts:

	core/java/android/provider/Settings.java