FW: Active Display [1/2] + AppBar fixes

Squashed commit of the following:

Add active display

Ring Notifications as implemented on  the Motorola
Moto X.

credit to 0xD34D who i'm assuming wrote most/all of the code.
I found it unfinished/broken in his gerrit and simply fixed it,
improved & optimized a bit

PS2: remove unrelated NavigationBarView diff
PS3: optimizations

Change-Id: Iad6a62a98adc6cc698dc852f1a1477d3ca601e5d

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/dimens.xml
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/res/values/styles.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java

ActiveDisplay: handle NameNotFound inside notification loop, and handle icon resource == 0

ps4: prevent NPE if dismissed called with null mNotification

Change-Id: I880ad698a8c6b203039d09bc95bfbd16ac9f789e
Signed-off-by: nuclearmistake <nuclearmistake@gmail.com>

refactor 0xD34D's changes to active display and add Vanir's

improvements still not sure where the original "porn display" came from as
it was called.. but thanks for porting mr scheff.  more to come.

ps3: FIX A FUCKING STACK OVERFLOW IN THE SETTINGSOBSERVER.
     -NUKE

Change-Id: Id1dfecf8d1488deb476ffa0f09c8137dcd492567

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java

updates to  active display:

commit da4016824b2e5cad3415cdf8b7b42e25ec39e5ae
Author: 0xD34D <clark@scheffsblend.com>
Date:   Thu Sep 19 19:57:55 2013 -0700

    Delay hiding systemui by 100ms
    When disabling the keyguard, the systemui visibility is
    changed and can occur after we hide it so delaying this
    a bit resolves that issue.

    Change-Id: Iad432f75195983837d643fa38495e6beb54f3e22

commit 4aff6f4e2a9a2d3bff33016ca745993054446311
Author: 0xD34D <clark@scheffsblend.com>
Date:   Thu Sep 19 13:55:41 2013 -0700

    Active display: Add sunlight mode. [1/2]

    Change-Id: I541e74c5a1a7e6ce5028ab00cf998bba1d4fe0f9

commit 9cd95cf25ffdf8627a54746a114e2399cccca02a
Author: PrimeDirective <activethrasher00@gmail.com>
Date:   Sun Sep 22 11:32:53 2013 -0400

    remove observers activate logic
    until i have more time to get this going.  probably
    easier anyways until the initial wave of development on
    this subsides

    Change-Id: Ib38c1dcf35d4a40f606e0a37208e7e26ffbf06a3

commit 45b911b27ac7b9f04852727b7c3bdc08528f1622
Author: PrimeDirective <activethrasher00@gmail.com>
Date:   Sun Sep 22 11:21:35 2013 -0400

    increase notification changer icon size

    Change-Id: Ia73f556b6bccfe6bd33f7af82ca079509b08f3a9

Change-Id: I4ef6cc5cc61e50caa9416d64551ddfcc60a14520

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

activedisplay: flag_fullscreen for your viewing pleasure

Change-Id: I5deb5e3127f854c3e2773dc1b9ffb1336a985d65

Active-D: flag_layout_in_overscan is also needed

Change-Id: I08cb92ace6c1eb11f5af8447e1ba45e7ef4ef2c2

Revert "Active-D: flag_layout_in_overscan is also needed"

This reverts commit ddce9a3a995297c13290885a733a0507cf989545.

Change-Id: Ie0710a14e898032a1e95aff84f60aa54a532c8f1

active D: a few fixes

ps1: make sure receivers are only registered when the setting is active
ps2: combine make sure mNotification is set properly
ps3: make active D not shownotification if it's for an incoming call
ps4: cleanup

Change-Id: I69930a1495cb4fa5e7daa91dde951c097b15fb2f

Fix crash in systemui caused by disabling AD. *facepalm*

Change-Id: Ibf417b30dab18c70198dc72784c2f1d2021a04c4

active D icon resizing

fix layout issues on xhdpi devices for the drag handle
increase the size of the overflow notifications slightly
increase padding of overflow icons slightly

Change-Id: I2f6ab9840916f09045051913763904c003a812e5

Active-D: Eradicate sunlight mode (1/2)

Active notifications were designed for devices with a direct relationship between the # of pixels on, and power consumption.
... AND we can drastically reduce the incidence of sunburns among Vanir users by removing this.

Change-Id: I0853b1ff88ec1d1ba48de7589f11a7b4d3c4c412

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

Active-D: Increase proximity sensor sampling delay from 60,000 microseconds to 200,000 microseconds (change rate from ~16.6 Hz to 5 Hz)

Change-Id: Id92dab800696b5fd0b9f21cfc3fa65225dad9734

Active-D: Unregister proximity sensor when screen turns on, and register when turns off

ps2: typo
ps3: whitespace

Change-Id: I2a66d2f2f8a21cde9c8a278ea985972a6e7c577e

Active-D: and girthy.

And add some debugging helpers and messages (disabled with final static bool ATM)
Flip on debugging temporarily
Prevent the proximity sensor from double-tapping when waking the device.
Reduce the threshold below which the phone is declared to be in a pocket.

Change-Id: I0c38bf33e0461a4b0b014f505e7d3db66f3af344

Active-D: save some B

Only enable the proximity sensor for long enough to get one reading at <1 Hz.

ps3: fix nomenclature error
ps5: don't actually register and unregister the listener... a change that happened while unregistered is not reliably reflected in the values in the callback.
ps90: Change handler the settingsobserver is instantiated with, and don't catch securityexceptions to allow systemui to be resurrected if the first notification-showing fails

Change-Id: I4627cb4ca27b07fac8f1606c02d886a3efa2af40

Active display: allow hiding low priority notifications. [1/2]

ps2: COPY/PASTA

Change-Id: I4831d6864b509e62b449c25619c59f5d6760ec47

Change-Id: Ia35cf32cbba54b7ef074df262364bb8107c5068d
Merge remote-tracking branch 'upstream/cm-10.2' into cm-10.2