[1/2] Base:  circle ribbon

add whitelist app to include into circle view
rebased
make standalone patch

PS.15 : rebased
PS.16 : cleanup

Change-Id: I08d2a3a7e0f8df20e801e585d4cac8547a740a3e

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/mahdi_strings.xml

Conflicts:
	packages/SystemUI/res/values/mahdi_dimens.xml
	packages/SystemUI/res/values/mahdi_styles.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
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/mahdi_dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
PEEK: Clean tabs and whitespaces

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Peek: adjust timeout and wakelock slightly

-7 seconds for timeout and 15 seconds for wakelock shouldnt effect battery too much
PEEK: configurable pickup timeout (1/2)

- Allow the user to set different pickup timeout when a notification comes up through PEEK.

Change-Id: Ifcd2f13101dcf6973ebcf016bce5f5314e1ce04c

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationPeek.java
Peek wake timeout (1/2)

- Originaly taken from AICP - Thath's why i'm keeping original autorship
- Allow user to set how long peek notification will hold screen on
- Minor changes by me @cristianomatos to match crDroid sources

Diff from original commit:
* Variable declared globaly and moved from inside the private void scheduleTasks() method
* Made multi user
Original commit: https://github.com/AICP/frameworks_base/commit/90b47fc55ec59520d6dd5dd828ff48a3a3dca1d4

-PEEK pick up timeout: ensure stock value on clean install and also show summary of it (1/2) by @cristianomatos

- This commit fix a derp where Settings.Secure is called and not the right one: Settings.System
- Inlcude a settings observer for futures ideas

Change-Id: I3a3c7e6f99edd9c861566b2d738d31e7657a0322

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationPeek.java

Conflicts:
	core/java/android/provider/Settings.java
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
fix build