fix derps

Change-Id: Ic04e22aa41f0cddbe556fc21f34dbd8750adcf83
PEEK [1/2]

Sensors are fully disabled when screen is on. When you turn the screen off,
it will start polling both gyroscope and proximity sensor values. If it detects
using the gyroscope sensor that device is lying on a table, it disables proximity
polling. If it detects with proximity sensor that it is in your pocket, it disables
gyroscope polling. This way, we save some battery from the beginning. Later, when you
receive a notification, it enables a partial wakelock (CPU on but at low frequency),
and starts listening for movement, either from getting it out your pocket or lifting
off from the table. If it detects those events, it will turn on screen and show the notification.
Wakelock timeouts on 10 secs, so if you receive a notification and there is no movement in that time,
sensors will stop polling after that time, disabling peek interaction until a new notification comes.
Peek doesn't process low and min priority notifications.

https://plus.google.com/+ParanoidAndroidCorner/posts/3wppxakBSVR

Contributors:
@D4rKn3sSyS
@Anu6is
@BigBrother1984

Signed-off-by: Jesus David <jesdga95@gmail.com>
Signed-off-by: Curtis Mayers <curtis.mayers@gmail.com>
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Conflicts:
	packages/SystemUI/res/values/pa_dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Change-Id: Ied2b76ffc236d46e20ca76082984843f03229045

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
PEEK: Clean tabs and whitespaces

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
PEEK: configurable pickup & screen timeout (1/2)

Change-Id: I4497dbac70de9d4dc63acafae8282ec66dacd8c4
Fix default values to peek

Change-Id: I21bac17c43dcf93081d5b6b1a085a1e1ca892b5c
PEEK: Beautify bridging layers code

* Save new instances for Peek and PowerManager:
    Create it only in BaseStatusBar when start() method is called. That one
    will be passed throught the sub layers such like new helper class so another
    feature can check Peek state invocking from NotificationHelper class.
* Move phone listener to new helper class.
* Do not show Peek on sim pin lock screen.
* Process new incoming notifications only if screen is off, keep updating notification array separately.
* General cleanup.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I9efde073df35b92e42b9faa9930d2fc39b3a43b9

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
PEEK: Sensors improvements

- Bring some fixes to the algorithm thanks to @D4rKn3sSyS
- Cleanup

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
PEEK: ensure to put default values on clean install

Change-Id: I152b53342d6706ab0e2e831e10d752cfaaac8500
base: show notification count overlay

Change-Id: Ie4df927531bd8d2869780336b5657f8194141b42

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
show only notification count when are greater than 1

Change-Id: Id191997178679bdd0b6cb89751c4412d307f68df
fix statusbar notification count

Change-Id: Iba464164076120482dd3cddd0431fa90ed23aad2