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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
Base: Fix ActiveDisplay problem

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

Change-Id: I1d178875c2643e872da40cae9781313fca53a6a5

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
Base: ActiveDisplay check for Immersive Mode Enable

As we know, Immersive Mode will force StatusBar and NavigationBar to Hide
while ActivieDisplay always setSystemUiVisibility flags for Both if enabled,
and will cause a conflict for that flags

// how to reproduce bug:
// set ImmersiveMode enable
// set ActiveDisplay enable
// Turn Off screen, swipe to sensor, ActiveDisplay showing
// Turn Off screen again (using Power button)
// Turn On screen (using Power button)
// pull Quicksettings, disable ImmersiveMode from ImmersiveTile
// Turn Off screen again, swipe to sensor, ActiveDisplay showing
// unlock via ActiveDisplay
// voila.... random flags will be set into setSystemUiVisibility
// (sometimes navbar or statusbar or both are gone)

lets make ActiveDisplay check for ImmersiveMode enable/disable,
so ActiveDisplay will not always setSystemUiVisibility flags
if ImmersiveMode enable

also workaround fix for unknown icon (?) sometimes appears
(if Show All Notification enabled)
(based from user report at XDA thread, why they always report there not in JIRA :/)

Change-Id: I550143864d387d7725c018f084e253c1e47cc3c0

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
Base: Disable proximity sensor when screen goes on in ActiveDisplay/PocketMode.

Active Display (in Pocket Mode) currently only switches off the proximity sensor in some cases.
If the user switches on the screen itself, the sensor is left running. This change
stops the sensor as soon as the screen goes on. Active Display already started the sensor each
time the screen goes off.

PS2: In the mode that turns the screen off again when the device is pocketed,
the sensor stays on until you leave ActiveDisplay.

Change-Id: Id7afcd858f341ad929606d302c5741efa99a7c6f

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
Active display: Respect Quiet Hours

PS2: Use QuietHoursHelper

PS4: Fix PS3

Carbon PS2: change slim for cm

Change-Id: Iba6f339e8073fa28ee6b96a6b889cd3faf724111

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
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
[1/2] Base: ActiveDisplay (rework interface)

really fix AD buggy stuff
tested with Music play
tested with No lockscreen
tested with faster screen turn off
check all sensor going off if AD not Showing or Disabled
fix notification posted/removed
make AD using System Window so it will covered all screen
fix Navbar translucent if Lockscreen Blur merged :P
now using Rounded Image
also introduce new RoundedImageView widget
 courtesy of @vinc3m1 (thanks)
fix build
fix sometimes screen turn off after unlock because screen timeout (hopefully)
now using new parser to get Notification data (thanks @Achep for the parser)
rework lightsensor manager
add NotificationUtils
fix brightness sometimes not changing

add support applications privacy mode (will not show content message if enable on each app)
see http://jira.omnirom.org/browse/OMNI-600

allow bypass AD if no notification and lockscreen is secure
see http://jira.omnirom.org/browse/OMNI-594

fix proximity always enable after adding new feature allow bypass AD
fix parsing notification data from app with targetSDK < 17

fix excluded app value (no body notice this broken since AD merged into OmniRom xD )

add option to allow bypass AD
make AD multiuser support

Change-Id: I1fc3047496cce71cefc1718b8ef3f4c4fc1605eb

Base: fix ClockView ActiveDisplay

why no body report this bug?

this happen since AD merger into omnirom for the first time
i found this bug after using 24 time format LOL

Change-Id: I85be84914cc8210d9b0612994a4c25a5c6bfdeb6

Change-Id: I1fc3047496cce71cefc1718b8ef3f4c4fc1605eb

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/cr_styles.xml
	packages/SystemUI/res/values/oct_colors.xml
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
ActiveDisplay: Fix for flo and other devices

The changes made to layout/active_display_content.xml were not
made to its layout-land and layout-sw600dp counterparts

Make them here too to stop flo from crashlooping in systemui.

These values may need to be tweaked later, but preventing crashloops
is top priority.

Change-Id: If137eaabad735539cc9d50c107a1733bef71538d
[1/2] Base: fix ActiveDisplay for WifiOnly Devices

fix http://jira.omnirom.org/browse/OMNI-637
also fix for devices with unsupported Proximity sensor and Light sensor

Change-Id: I346d4ed0ca02c6f8a6da1f3bf1de59ac9179d7b7

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
[1/2] Base: more improve Active Display

1. fix http://jira.omnirom.org/browse/OMNI-651
2. fix http://jira.omnirom.org/browse/OMNI-641
3. add http://jira.omnirom.org/browse/OMNI-652
4. Add option Double tap to sleep every where
5. Add option to show wallpaper blur behind active display
6. Allow to show numbers of notification on Handle (only show if notification count is enabled in bar settings)
7. minor improvements
8. add battery circle around handle (only show if battery circle around lockscreen handle enabled, see security settings)
9. fix http://jira.omnirom.org/browse/OMNI-665
10. fix whitespace

Change-Id: I1b28041c0245de80b7d09c684f6439b2f8f5bd40

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
Base: fix SystemUI because ActiveDisplay

fix http://jira.omnirom.org/browse/OMNI-708
fix http://paste.omnirom.org/view/e7039c0b
fix http://paste.omnirom.org/view/6977cb45

Change-Id: Id6688c721bd262df7824183a14fcd0aab145517e

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/policy/activedisplay/ActiveDisplayView.java
[1/2] Base: ActiveDisplay bugfixes

1. fix respect QuietHour changes
2. fix compute background bound for background image
3. fix http://jira.omnirom.org/browse/OMNI-724
4. fix http://jira.omnirom.org/browse/OMNI-722
5. fix http://jira.omnirom.org/browse/OMNI-709
6. remove useless layout
7. fix invalidation when sunlight mode disabled
8. fix fetch wallpaper
9. fix glowpad ring after configuration changes
10. disable wallpaper blur until we find fix for problem in OMNI-715
11. make sure when configuration changes, all view is rebuild, so there is double background window
    is showing
12. remove Wallpaper

Change-Id: I15fc9a6cb21e009f92952477ced34cfaf37b8f38