Fix icons overflowing status bar view in center clock and date layout

Change-Id: I43829f58330357de7a09d8eb80141a6385aef533
Take date into account to not overflow icons in stock or center clock
- This commit complements this other: https://github.com/cristianomatos/android_frameworks_base/commit/0f1165e0149850107314b9781acf2c2b9994f8e7

Change-Id: I469aedf2abb811edbe180a397480829f33ea3245
Frameworks: port statusbar notification count (1/2)

Change-Id: Id23ac43866fa7fb9043d1f598a1f88cd4fa9ab9b

update notification count backgrounds and text color to match kitkat ui

  - also add duplicates in inverted folders to keep inline with trds themeing

Conflicts:
	core/java/android/provider/Settings.java
Don't show notification count for a notification with just one item

For example, the Play Store sets the number attribute to 1 for a single
app update. No point in showing a counter for that
HOVER: Theme Engine compatibilities and some resources tweaks

Use default notification dimens, avoid setting a custom one.
A bit of cleanup too.

Notifications:
Hardcode dimensions to android defaults. Avoid themes to change them,
Ribbons feature (present on CM based roms mostly) needs that.

Thanks to +John Xionidis to help me trick this out for full CM11 made themes :)

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: Iccf12061c045c29db4bc73736dac68e52dda198c
Conflicts:
	packages/SystemUI/res/values/pa_dimens.xml
HOVER: Match notification width on tablets too

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

Conflicts:
	packages/SystemUI/res/values/pa_dimens.xml
HOVER: Rework showing behavior on tablets

- Don't animate out statusbar on tablets
- Cleanup

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
HOVER: Don't process and/or show foreground app notifications

- Don't show notification of foreground app
- Animate the ticker in this case so user can see it

Inspired from changes linked here https://gerrit.paranoidandroid.co/#/c/4453/10

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I9f45e1641a7478c7e460c32133db00bd67f63e75
HOVER: Respect screen limits when adding view

As for what @Decad3nce reported here http://review.cyanogenmod.org/#/c/66654/
we shouldn't keep FLAG_LAYOUT_NO_LIMITS so view doesn't exceed the screen limits.

Thank you Adnan :)

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: Ifcbc4a1143362e1b7dd40e710126060688c894b9
HOVER: Don't treat touch outside event as true if is animating

- It needs to wait animation to be finished to start listen for touch outside
  and runs hide timer.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Themes: Full support for AOSP Volume Panel

- Recreate VolumePanel with theme enegine UiContext.
- Revert this https://gerrit.paranoidandroid.co/#/c/4375/ since we don't have
  the code with the panel they refer to. Just leave UiContext commented out, maybe
  we'll need that lately.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: Ifc9fd02ec4d263050b7d5f689935fa5e82095d26
Lockscreen blur and blur radius (1/2)

Change-Id: Iab92bc2adfc2c861cd4f1baccdba2409a5deb788

Lockscreen Blur: Disable if music is playing

Some apps don't employ full screen album art.
In that case album art doesn't override wallpaper & content behind screen is clearly visible.
This fixes that issue.

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java
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
PEEK pick up timeout: ensure stock value on clean install and also show summary of it (1/2)

- 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: Ic449ada65820cb6c73a7867d1d287f837c37c221
Peek wake timeout (1/2)

- Allow user to set how long peek notification will hold screen on

- This is totally based on @LorDClockaN with very little adjustments. A big thanks to him for this
Original commit: https://github.com/AICP/frameworks_base/commit/90b47fc55ec59520d6dd5dd828ff48a3a3dca1d4

Change-Id: I3a3c7e6f99edd9c861566b2d738d31e7657a0322

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

Conflicts:
	core/java/android/provider/Settings.java
Base:Quiet Hours[1/2]

based on cm && based on Omni's adaptation & AOSPA

PS3: Whitespace fixups
PS4: fix imports for QHHelper
PS5: We don't have battery LED enabled

Conflicts:
	services/java/com/android/server/NotificationManagerService.java

Conflicts:
	core/java/android/provider/Settings.java
	services/java/com/android/server/NotificationManagerService.java
Frameworks: Quiet Hours Automatic Switch (1/2)

Change-Id: I3e09891a60ffc5a11f5b5fabef8e06fb02dc9f5d

Conflicts:
	core/java/android/provider/Settings.java
Battery led needs to respect quiet hours

Conflicts:
	services/java/com/android/server/BatteryService.java
CM11 Themes: load wp from apk if uri is null

When setting a default theme on first start, the provider may
not have processed the theme and the uri for the wp will be null.
If this happens try to load the wallpaper from the themes assets.

Change-Id: I883b9dd796920e66e4729e78d41cd8899916fa42
CM11 Themes: Don't kill setup wizards

Change-Id: Ib68dbf08b5b65f66e73f2f22882932ced0851093

Conflicts:
	services/java/com/android/server/ThemeService.java