[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 (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. (NOT 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

Change-Id: I4c5e973752536e92c38e74eae59e4ae0e7ceaa8a
fix the locations
Update PhoneStatusBar.java
Update PhoneStatusBar.java
Halo: Add master switch to disable Halo (1/2)
-Port master switch from @Der-Schubi.
-Fixed Halo not showed at first notifiction pulldown.

Signed-off-by: scott <scott@ubuntu>
Signed-off-by: Chester Kener <Cl3Kener@gmail.com>

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

Change-Id: I93b59da79c63c3154bec1dba4490e4f4447a1564

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

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

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Fix Duplicate

Signed-off-by: Chester Kener <Cl3Kener@gmail.com>
Remove This

Signed-off-by: Chester Kener <Cl3Kener@gmail.com>
REVERT: [2/2] Framework AppOps: Forward port ops from cm-10.2

    Squash of:

    Author: Sam Mortimer <sam@mortimer.me.uk>
    Date:   Fri Sep 27 21:30:34 2013 -0700
    [2/2] AppOps: Add alarm wakeup op
    When alarm wakeups are denied/ignored,
    the alarm types are remapped as follows:
    RTC_WAKEUP -> RTC
    ELAPSED_REALTIME_WAKEUP -> ELAPSED_REALTIME
    Change-Id: I3a5023e1f6260004319290e776bdb2daf73e9fdf

    Author: Kun Liang <kunliang@codeaurora.org>
    Date:   Fri Aug 30 23:56:59 2013 -0700
    AppOps: Add data connect control into AppOps
    Check user permission before enabling/disabling mobile data.
    Change-Id: I6e1895b130788dfccbc0a8523dadf1559b698988

    Author: Shashank Mittal <mittals@codeaurora.org>
    Date:   Thu Sep 5 17:24:44 2013 -0700
    AppOps: Add Bluetooth enable control into AppOps
    Check user permission before enabling bluetooth.
    Change-Id: Iefa4ea3319b33b2639beaf38d261d83649bbcf85

    Author: Shashank Mittal <mittals@codeaurora.org>
    Date:   Tue Sep 3 19:23:10 2013 -0700
    wifi: Confirm user permission before toggling wifi.
    Check user permissions before enabling/disabling wifi.
    Change-Id: I1ddae6e47f42b6d3fc831c2c135ece75cf9e935d

    Author: Qaweck <qaweck@gmail.com>
    Date:   Dec 6, 2013 06:21
    Fix bluetooth and data enable with ProfileManager
    Handle the case of system uid in AppOpsManager
    Change-Id: I5f9c3ba2e2ed0b1c825b995bf2724066ae796bb4

Change-Id: I1d403d4325f105cd91f815f790cb01dd9b9f5516 (reverted from commit d01dae35568c6e9619c462c0a4133728bd1f3fc6)
REVERT EVEN MOAR APPOPS
AppOps: track op persistence by name instead of id

On XML write, include the op name.  On XML read, map
the name back to op id (if it exists).

Persistent AppOp state now follows the op name instead
numeric id.  This allows upgrades between versions of
android that have different code<>name mappings.

Change-Id: Iffc02095b6838a34ff999f8db51c2c6739dd0db8 (reverted from commit 77c4a66e19c0de10bf3de2b2f57f900876bd01b8)
REVERT: Frameworks AppOps: fix allow/reject counting

Was missing from the original counters commit:
http://review.cyanogenmod.org/#/c/57352/

Change-Id: I9c180ff132077f21426a36f2ceb7d23a054d7ae4 (reverted from commit 2a81a2315314987a0ac635190e3e97a203461cc3)
Delete cm_strings.xml
Update AppOpsManager.java
Framework: Lockscreen: See through & blur (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>
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