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 :/)

Thanks to @Squadzone
Active display: Respect Quiet Hours

PS2: Use QuietHoursHelper

PS4: Fix PS3

Change-Id: Iba6f339e8073fa28ee6b96a6b889cd3faf724111

Thanks to @Schubi
Quicksettings: Immersive mode tile add improved drawables
[1/2] SystemUI: Add time-context headers to the notification header

This commit adds image headers to the notification panel header,
based on the date/time. There are pictures for morning, afternoon
and night, as well as special events like Christmas and new
year's eve.
More will be coming, with eventually a way to use an external
(as in, Internet) provider for those pictures.

Change-Id: Ie3321e9a3e0637d6ba8094dd46aee36c41354713
SystemUI: Fix notification header disappearing on tablets

For some reason, the notification panel header has weird dimensions
when it has anything else than its original ColorDrawable as
background, and only on tablets.

We workaround this by not changing the drawable until requested.

Change-Id: Id76a5dcacf59c35b2e49681d6eeb4e828f7cbc58
SystemUI: Cleanup and enhance notification drawer header

- Crop properly images on tablets and landscale
- Use a separate layer instead of breaking header background
- Fix bug where you couldn't turn header back on after turning it off
- Added a gradient overlay

Change-Id: Ife399b82a3f272fb2ecc8e738c5f274f7682a556

Conflicts:

	packages/SystemUI/res/layout/status_bar_expanded_header.xml
Revert "Framework: add auto brightness configuration UI (1/2)"

This reverts commit 8d53fc8d6e38d7f47050431ca80bce5d0f965ac7.
Re-add auto brightness configuration UI (1/2)

- Add a button into the new brightness dialog that allows opening the
  auto brightness setup
- Enable auto-brightness adjustment (setting for general brighter/darker
  adjustment) and twilight adjustment

- this commit adds as well the complete auto brightness ehancements we had
  on 4.3

Change-Id: I7fd11ddaa112396dcb7508692aacb93bfe3da256

Conflicts:

	services/java/com/android/server/power/DisplayPowerController.java
Add method to PowerManager that allows querying the lowest possible
brightness.

Used by the auto-brightness adjustment to adjust the sliders.

Change-Id: Idb58fd86dee1a053fe858291be6c9b3169ac4247