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
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	services/java/com/android/server/wm/WindowAnimator.java
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: I726220a39ac61cf135e5c63a9dbb8def7ed6fa2e
Fix: Correct possible null pointer when enabling see through lockscreen

PS2: Remove unused variable

Change-Id: I28884cb18964b273539261b8c0f72cedf2e60666
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: Ie72bab697726af5e145bd0192980885ea7222ecd

Conflicts:

	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java
	services/java/com/android/server/power/DisplayPowerController.java
Fix: Lockscreen Blur Rotation

Credits to David L.-W (David96)
https://github.com/AOSPAL/android_frameworks_base/commit/f80b748

Modifications made to address the issues noted in original commit

Change-Id: I721e7f8554433b903209da5587ac1dfcd83420cd

Conflicts:

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