[1/3] Base: Squashed commits for 4.4 active display

Add active display to ChameleonOS [1/2]
Change-Id: I51c17cec33b65dc60111a10c5ca2c449596ebe63

Correct active display settings naming
Change-Id: Ibfa2d41eed01d8987df52f013b111a0ce4e70739

Active display: Add options for date and am/pm [1/2]
Change-Id: Idc09772829cc6aa9bcfb064459fb3557c7b37f6b

Active display: Add sunlight mode. [1/2]
Change-Id: I541e74c5a1a7e6ce5028ab00cf998bba1d4fe0f9

Delay hiding systemui by 100ms
Change-Id: Iad432f75195983837d643fa38495e6beb54f3e22

Active display: make sure mNotificaiton is set correctly
Change-Id: I4111ca843e340cca4d6dac4b2c2922ce3039e487

Active display: register/unregister recievers and listeners when enabled/disabled
Change-Id: Ic73e63da2c9634bc864ab1a1387eb9145eb0b5b0

Active display: Unify (un)registering callbacks and add proper checks.
Change-Id: Ie4c4660a54d2c60831f7a3bcc66b3a9ca1d035f2

Active display: allow hiding low priority notifications. [1/2]
Change-Id: I4831d6864b509e62b449c25619c59f5d6760ec47

Active display: Enable proximity sensor only when screen is off
Change-Id: I70979b5931815adb74bd8bc42e32886a6d829a12

Active display: Use a default notificaiton icon.
Change-Id: I4087ef3e407cf976f7bfb2bb89f850641101bc73

Active display: Only fetch next notification if mNotification is null.
Change-Id: Ife8511d4a4b8c448bc7aa8997a250068bec5fae7

Active display: Don't show active display if call state is not idle.
Change-Id: I2cb79e097ae24dc6ad6c8a33be88eb19f7d8d235

Active display: Allow apps to be excluded from being displayed [1/2]
Change-Id: I5c334833b78325733ae076c07afccebb02758ead

4.4 implementation of active display

Settings: https://gerrit.omnirom.org/#/c/2586/
OmniGears: https://gerrit.omnirom.org/#/c/2584/
Change-Id: I08330a28d0880f82c09ccaec7e36844d9e6570d5

Conflicts:

	core/java/android/provider/Settings.java
	core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
	core/res/res/values/custom_strings.xml
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/res/values/donottranslate.xml
	packages/SystemUI/res/values/styles.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Active display: Ability to turn off the screen, when a not clearable notification is present

Removing the last clearable notification in AD turns of the screen. But if there is a not clearable notification, there is no ability to turn it off directly.
This patch adds a power target on place of the 'clear notification' target of AD.

Change-Id: I807cca4c293ed732b441cfdcca50957b427809fa
[1/2] Base: Pimp up ActiveDisplay

This is a squashed commit of the following:

- Active display: turn off display if device gets pocketed again
  https://github.com/CyanKang/android_frameworks_base/commit/3c139633e2cb341452320207e93fd10b480b65ed

- Active display: Option to change display timeout
  https://github.com/CyanKang/android_frameworks_base/commit/31a3c7dced93bda9501915ea87f28f8fd541b650

- Active display: Add some log output
  https://github.com/CyanKang/android_frameworks_base/commit/5be6bd59c27b0994b2459e4fe360d35c43349929

- Active display: Add threshold to proximity sensor
  https://github.com/CyanKang/android_frameworks_base/commit/fc4561bf1e78d656e37b6bc51340767e1ffa03f6

  Display will only be activated if the proximity sensor was covered for 5 seconds or more.

OmniGears part: https://gerrit.omnirom.org/#/c/2818/

Change-Id: Ib934157da195eb307c3c852de3d0549ad06bd004
[1/2] Base: Fix pimp up ActiveDisplay

This is a fix for the new features added with change: https://gerrit.omnirom.org/#/c/2819/

1. Fix the bug when Pocket mode is set to Notifications only and you
unlock your device with power key and if you put your hands over
proximity sensor the device will turn off (very annoying). The problem
was that mWakedByPocketMode it was put in wrong place.

2. Added an option in active display settings for "turn off display if
device gets pocketed again" (it's annoying for me, because i cover
the proximity very often).

3. Added an option in active display settings for proximity threshold.
I use this active display feature as an replacement for "sweep2wake",
and when my phone it's on the table, i just want to pass my hand over
it to show me the clock or notification (this was ok before the pimp up
commit), and now, you can choose how many seconds for proximity
threshold.

Practicaly, this commit fix one bug, and add settings for the
features added in 'pimp up' commit.

[2/2] part: https://gerrit.omnirom.org/#/c/3381/

Change-Id: I9e49ddb89002699714dcc3b3d2b1df87dc4bab4b
base: ActiveDisplay: fix for disappearing notification bar

What a derp
http://jira.omnirom.org/browse/OMNI-158
http://jira.omnirom.org/browse/OMNI-101

PS2
dont do it on secure lockscreens

PS4
check if lookscreen is enabled

Change-Id: Idf7fd7c15fcd87e2efb62f0a234e15f1df1921e8
Base: Fix ActiveDisplay problem

follow kitkat changes
fix ActiveDisplay never disabled after using turn off display option

Change-Id: I1d178875c2643e872da40cae9781313fca53a6a5
Base: Fix for fix ActiveDisplay (Emergency)

this an emergency fix for last patch was merger

using another logic to determine, when need to hide Statusbar and Navigationbar
we dont want systemui visibility reset if lockscreen still enable and ActiveDisplay force to Turn Off

Correct ActiveDisplay visibility when launch Ongoing Notifications

fix Back button navbar cant work on some conditions

since AD detect User Activity, we dont want to override UserActivity inside View, so do only if AD visibilty are Gone

also add patch to keyguard, do not reset if ActiveDisplay visibility Visible
taken from Lockscreen Notification by David L.-W <david.leppla.weber@gmail.com>

Change-Id: I9d4001870db28ee04bdd622fa7147543b658251f
Base: more fix Active Display

fix http://jira.omnirom.org/browse/OMNI-352
fix http://jira.omnirom.org/browse/OMNI-357

Change-Id: Ibdd9617ce472213520261358bb6b77e9ff5eb523

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
Base: more fix Active Display (again)

maybe fix
http://jira.omnirom.org/browse/OMNI-313
http://jira.omnirom.org/browse/OMNI-421
http://jira.omnirom.org/browse/OMNI-401

Change-Id: Id947e18a9299200f1ccd41aa70e56534fdbb4b57

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
fix tmi

Change-Id: Ibee674f2a2cc0043e321df6131264a1b2d0c5afe