[2/2] Frameworks: HALO Forward port from jb.

Change-Id: Id1d6baa2ab95ecf405c02c5d82732d1f545fc10a
PS1: Initial port Fix conficts with notification LED Fix derp Major derp HALO Mods Rebase Fix blackist, code clean and added some TODOs
PS2: Fix build
PS3: Fix bubble sometimes doesn't respond on new notification
PS4: Align halo icon
PS5: Keep floating app in recents and disable transparent layer temporarily (NOT INCLUDED)
PS6: Fix conflict after recent merges
PS7: Cosmetic fixes: Fix buttons layout in status bar. Status bar button holders show halo + qs switch on notification and qs edit mode + notification switch on qs. Update new margins size. (PARTIALY INCLUDED)
PS8: Rebase Clean white spaces Toggle on/off from notification shade icon (remove red X) Standardize behavior (remove option to reverse tap/double tap)
PS9: Remove references to LayerActivity
PS14: Rebase
PS15: update halo strings to prevent conflict with latest changes
PS16: Wrap all things! Modify halo behavior
PS17: Get the correct activity stack: this makes all windows in the same stack to get the floating mode
PS18: Stop pop-out on rotation
      Catch "silent" notifications
PS19: Rebase
PS20: Rebase, fix conflicts with recent merges
PS21: Fix missing commit messages from previous undefined patchset (19) and other conflicts
Change-Id: I257b7109cc1efd146a1e7096143f45c4f9dc8f98

Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Frameworks: Advanced low battery indicator options (1/2)

Based on a idea I saw on Liquid and from CR3C0 (thanks guys) which we
modified to an extended version

This commit introduces following new SlimBean modes to indicate low battery

     * 0 = show dialog + play sound (default)
     * 1 = fire notification + play sound
     * 2 = show dialog only
     * 3 = fire notification only
     * 4 = play sound only
     * 5 = none

Due that notification is a unique SlimBean feature some words on it. Notification
behaviour is the same as Pop-up. User can dismiss it manually or it is
dismissed automatically if charger is connected, click on notification opens
PowerUsageSummary. Also you get a status bar ticker message about the notification
and notification is always on first place of list. And last if vibration is enabled
notification vibrates.

Patchsets:
 - codestyle corrections

Patchst
 - add PowerUsageSummary intent

cheers

Change-Id: I2097afad8a090d2557a1e545cf978c87ca77d6c1
Lockscreen: See through (1/2)

Add the ability to see through lockscreen.
Adapted to kitkat from jellybean by @BigBrother1984

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

PS2:

* Adding missing sem-colon.

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

Change-Id: I9057a6e302a5a824799844f27e8f64ff677a520a

PS3:

* Replace and remove undefined mContext.
* Define the boolean enableScreenRotation inside new method.
* Whitespaces clean up.

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

PS4:

* Restore mContext in setKeyguardParams().

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

PS5:

* Fixes for setKeyguardParams() and maybeCreateKeyguardLocked() methods, kitkat changed some things.

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

PS6:

* Missing sem-colon.

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

PS7: Fix all the things.

* Effects doesn't vanish after first unlock.
* Created condition in updateShowWallpaper() method that just return if see through is activated, he was restoring the wallpaper at second lock.

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

PS8: Cosmetic changes.

* Correct java style name to seeThrough() and place it above updateShowWallpaper().

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

PS9: Other cosmetic changes.

* Better name to the see through boolean.
* Removed a space nitpick.

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

PS10:

* We had two booleans for the same thing, ditch the one defined in one class only and take the global.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Fix: Ensure lockscreen see through setting persists after reboot

If see through was enabled and the device was rebooted,
the user had to toggle the setting off and on again to activate.

Change-Id: Iccd6fec3a150b4104ae1ce3de6ce7c2359b9ac29
Fix: Correct possible null pointer when enabling see through lockscreen

Change-Id: I697375c45751e6d60cdaa78bfe3884907c724fca
PS2: Remove unused variable
Frameworks: Lockscreen Blur

  If user selects "See through" under screen security,
  the locksceen background will now appear transparent
  with the content behind it blurred.

Modificaitons made to the orginal commit to support Hammerhead and Flo.
It seems full HD images causes rendering artifacts. To prevent this,
we scale the image size to something more manageable.

PS2: Reduce calls to System.Settngs
     Move bitmap scaling to DisplayPowerController
PS3: Fix styling
PS4: Fixes: 1. Black wallpaper after turning off see through
            2. Wallpaper flicker on unlock when blur is enabled
PS5: Ignore status bar and nav bar when capturing screenshots
PS6: 1. Remove content observer and unnecessary calls from viewManager
     2. Restructure the flow of setting the custom image
         * now closely follows setting album art as lockscreen image

Change-Id: I4d83c17639799c36d5e62e22a2e71f102024b6b2

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Fix Derp in latest commit

Change-Id: I937c11bf1b835c028ebb796a1cb2f3bc362dfdb8
N5X Changes

Change-Id: I5bbdc688a818fcfd7e61c53c4401c079852440a7

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/cm_strings.xml
	core/res/res/values/config.xml
	core/res/res/values/dimens.xml
	core/res/res/values/symbols.xml
	packages/SettingsProvider/res/values/defaults.xml
	packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/values/cm_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
Base: Allow hiding notification icons

When long pressing a notification, add another menu
item which allows the user to hide the notification icon
(but keep the actual notification in the dropdown).

This is meant for applications which have services running
in the statusbar which the user is aware of, so right now
we hide the icon by the package.

Change-Id: I60c8705e1fd02d7b26dbe90fe39a3b40febdbfcc

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

Change-Id: I67e3438c7a14f7b4a51e9ae2136d62f9491c90c6
Fix Again

Change-Id: I49585cc549f5764b0d62328e53778ae96ba38adc
[1/2] Framework: Wakelock Blocker

Change-Id: Ie271a8842d6c6b032e9e033f5b4ce071932f437e
Revert ActiveDisplay

Change-Id: I6ccd81c1ec0ed08d3c8a7acdc7ebe19871ebf170

Conflicts:
	core/res/res/values/symbols.xml
Framework: Lockscreen Notifications

Change-Id: I7e70d32082d014685517e693126e1e9331698a0f

Conflicts:
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
Fix

Change-Id: I77fe35a0cfeb61fdcbf6689a1c7b42e0ee6b1aa8
Fix in Lockscreen notifications quiet hours

Change-Id: I247454ee51d865b9709b36a56497ef0c28fcda13
Clean code

Change-Id: Ie3dff51b0cc7f8dc003954c0b76ad4cb427ef403
Base: Volume Steps [1/2]

Change-Id: Ib966aa52cc9023e7879af940e6bd9837561a3700
Notifications Reminders

Change-Id: I270a2905d2188bdda8a7a768226131311624c68e

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Fix derps in Notification Reminders

Change-Id: I3281e7f0c3ba22d9920cd08bf93890895e2e57d6