[2/2] Frameworks: HALO

Forward port from jb.
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
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.
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

+ extra cleanup (cm_strings.xml / Settings.java)

Change-Id: I3e79945433d61da090ca263f4e2989be9987f11d

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/layout/status_bar_expanded_header.xml
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/res/values/pa_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/am/ActivityStack.java
App sidebar: floating window

long click to launch app in floating window

Change-Id: I9b5df1cceb2314ee0f8727136c007c481346a264
Show as floating window on recent apps

This also removes "hybrid properties" from recents menu, it is fairly unneeded
now. This is a test, It's probable that it will be removed later

Change-Id: I3db3a996fa08367e3dfa4231079fe5e811e3b08a
Quick Settings: Option to use floating window (1/2)

Allows the option of launching preferences from the quicksettings menu in a
floating window

Change-Id: Ie54545a4dc423484b6106a540f106467c25d8c49
Signed-off-by: Evan Anderson <evan1124@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
Launch floating notifications from notification panel (long click)
 * Status bar - long click on notification select 'floating mode' option
 * PIE - long click on notification, auto launches floating window

Change-Id: Ia7b85ddd41a663d1fb175d60c0fa34bcaf43f28f
fix derp in floating notification launch
SystemUI: Fix potential NPE

Does already cause issues on some Halo ports to other ROMs.
Might not cause issues on PA (yet), but better safe than sorry.
Suspend Actions & Wakelock Blocker (1/3)

Change-Id: Ie63551e0e6f1a1ee5c2e16da441076557512936a
[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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Add native java screen recorder [1/2]

This is based on the screenrecorder binary found in frameworks/av.
It has been converted to a native library with the necessary jni
hooks for interfacing withit via a ScreenRecorder java class.

Volume up + power chord is used to start and stop recording by
binding to the service found in the ScreenRecorder app:
https://github.com/ChameleonOS/android_packages_apps_ScreenRecorder

PS1:
Clean up white space.

PS2:
Fix naming convention for state field.

PS3:
Rebase

PS4:
Post mScreenRecordTimeout with 1000 millisecond delay instead
of 10000.

PS5:
Send record screen broadcast instead of using the service
directly.

PS6:
SCREEN_RECORDER_FRAMERATE should be SCREEN_RECORDER_BITRATE

Change-Id: I5b7af9b4b4f24a8c54ac0f9dcb36ace16672e2cf

Conflicts:
	core/res/res/values/vendor_strings.xml
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Add global action for screen recording. [1/2]

PS4:
Send record screen broadcast instead of using the service
directly.

Change-Id: Ie6d4655b074992075df0060d23c758f2af06387e

Conflicts:
	core/res/res/values/vendor_strings.xml
	core/res/res/values/vendor_symbols.xml
	policy/src/com/android/internal/policy/impl/GlobalActions.java
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
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>

Change-Id: I06d952f85baf284961a24c8c9f90b29f4aef719a

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

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: I651a843241d2a0fa8f0f41e5c6b4415012d1635a

Keyguard: smooth background change.

Change-Id: Ia0e4d0000db72b5cdb6fede03791805e34fa311d
fb: changed all open forgoten UI from google into new UI

thanks kroz

Change-Id: Ibc32ad8e73617dd74c8cd313dc2e071962eec966
change default for unknown sources & verify apps

Change-Id: I04467c0c1ef3985b416f6e58013ddc3ce4137712
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: I84476626b0ff5424454a1132ea4ef77a696070c1
Add music tile from SlimRom (1/2)

Change-Id: I3e828afe9fcbabd7c93b54932cf9653bc9de20cd
Fliptile animation - Music Tile

Change-Id: Ib7aef64433934f7cc286a7e9199b330218330ad1
Add music tile options (1/2)

disable artwork
disable track title optional

Credits to SlimRom

Change-Id: I442af9b4a3fffcb2f3e3388da4ed1aeadda4ff82