fw: Active Display fixes and addons (squashed)

fix AD permissions

Change-Id: I0d5cc68c5c8b5a4216ce31f27847b2ad00c13099

[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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java

[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
Enable dessertcase dream :-)

Change-Id: I620c64292a1b82fff6893824c4c31bd71908bfb4
Frameworks: Port BatteryBar (1/3)

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

Change-Id: I28805b2a2388f173bc6ea51d22400c6bbbcaff3e
Frameworks: status bar clock and date styles (1/2)
Unfortunately I couldn't simply port forward boo! however thanks to
slimroms and some of our own stuff this turned out nicely.

So what this commit adds
  - Clock style
    * Right
    * Center
    * Hidden
  - Add Date to Clock
  - Add am / pm for those who can't tell night from day.
  - Add color of course.
  - Multitude of date formats and styles thanks to slimroms.

Signed-off-by: baked <travp624@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/layout/status_bar.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Change-Id: Iafa75b0e468eacf3bf068c4514d93697c127c7df
fix derp

Change-Id: I7e9e282bc0c690a105d36d81766594365dd84a53
Custom Animations (AOKP)

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/custom_strings.xml
	core/res/res/values/symbols.xml

Change-Id: I61ff85727459458a6527d32d8a5c899a5154a201
Quiet hours [1/2]

and added multiuser support

Change-Id: I38e8560297099629aed94ee001da7f1ebaa04dac

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

Conflicts:
	services/java/com/android/server/NotificationManagerService.java