Adios lockscreen blur & see through [1/2]

Revert "Custom lockscreen wallpaper [1/2]"

This reverts commit bd695aba22e91dc87ac4e76a46dbec4b2e35fb13.

Revert "Use old see through when blur radius == 0"

This reverts commit 043388dd2ceb629dcb8b9360ed67949bb314e547.

Revert "Lockscreen Blur: fix for coverflows"

This reverts commit 7bd340fc62ef83dd82aad600975b8ec37389c4a3.

Revert "Partly fix lockscreen blur rotation issue"

This reverts commit 71d52c2c47145efbce7998c6f709319c65019236.

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

Change-Id: I41478f9cdff36536215e5d839ad3f56ac134ec05

Revert "Lockscreen Blur (1/2)"

This reverts commit d618a738078498fe00ecfd1b45bc4cd922f2521f.

Conflicts:
	core/java/android/provider/Settings.java
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java

Change-Id: I08ac5510724f538d20c913c9f2de627f7bf12e61

Revert "Lockscreen: See through (1/2)"

This reverts commit 31478e0c0311638656da3a03f02b29a70c075677.

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

Change-Id: Icb20d10786d5612fca884d4c9d8a85544b1881f6
Frameworks: Lockscreen custom wallpaper (1/2)

kitkat now has code for a custom wallpaper image.

Using that code set a switch case to set the custom background between
  - Custom Wallpaper
  - Default background

This way allows the same overlay shadow thats set on the keyguard when
its the defualt way.

Change-Id: I98fde63ef9f3c0a5f334cd9a97b237a6f99c57f6

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

Lockscreen: Fix SystemUI crash on initial selection of Custom Background.

Change-Id: I8df4984f4b90d211baa888d380a95fc00a85d1ad

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

Revert "add a getter for the x and y offsets of the wallpaper window"

This reverts commit 3fc294a3f154065b9ece69cbe79b5631d990c468.

Revert "persist the changed position values in updateWallpaperOffsetLocked, even with a null mWallpaperTarget"

This reverts commit e52c29f54fcc8e1d81812aed2aefc0213d538774.

Revert "wallpaper: add missing @hides"

This reverts commit fb26f3a63f65d5765b958d737bc28162912b08e4.

Revert "Wallpaper Overscroll"

This reverts commit efe8bac0b97c3e1dbb9360661b33db8bc81c9f05.

Wallpaper Overscroll and Transparent NavBar

Now possible to offset wallpaper windows by more than the size of the wallpaper
and add added a transparent mode to the NavigationBar

Change-Id: I2b0f1129a4cf73b8def35abb7072d0472a9cc972

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

add Custom Lockscreen switch

Change-Id: I3cc14cacf5462f589373b686f0dd87100507d524

Conflicts:
	core/java/android/provider/Settings.java

wallpaper: add missing @hides

Add missing @hides to setWallpaperOverscroll and setWallpaperOverscrollOffsets

Change-Id: I1cfe876272d7c0a94bef122567da30318eac9400

persist the changed position values in updateWallpaperOffsetLocked, even with a null mWallpaperTarget

Change-Id: I175773f6e0b3f91c1d983857028a89b959e4e9f2

add a getter for the x and y offsets of the wallpaper window

Change-Id: I98fde63ef9f3c0a5f334cd9a97b237a6f99c57f6

Keyguard: more consistency with the new lockscreen wallpaper

* In the case when the screen was off and setCustomDrawable()
was being called, and the use wallpaper is null, then we could be
setting the color filter on a null drawable.

* Fix logic when old custom background was null and the new one is also
null (but could be the user one) and the func was being returned, thus not
clearing out the current media album art.

* Move resetting the shouldShowWallpaper() flag to the show() method
so it is not being called every time the screen is turned on.

* Fix user image not showing up on first boot if it exists

Change-Id: I567c2ec8920df627835defb822c2ea25be7b3cab
Signed-off-by: Roman Birg <roman@cyngn.com>

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

Lockscreen wallpaper for themes

Change-Id: If77b97301c5bfebd94b193fe9a54e676e678d3ed

Conflicts:
	core/java/android/content/pm/ThemeUtils.java
	services/java/com/android/server/ThemeService.java

Keyguard : Fix album art sticking after playback is stopped

newIsNull should be populated by what is currently being set and not by
what the user's custom background is, since otherwise you end up a in state
where the user has no custom background set, music stops, no album art via arg is provided and you simply return.

Change-Id: Ifaea1cae176faaba6b32a711071f3b75ccacdd63

revert camera icon disable when Settings.System.LOCKSCREEN_MODLOCK_ENABLED was set to 1

Change-Id: I0f6e318c5da7b526e24f8c0c73102e3d7d826a46

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

cleanup leftovers from kill-app on longpress

Change-Id: I790c8843b136c8523c86d5d235f5b0899fd8dfd7

Keyguard: give the Keyguard a non-empty app label

A blank app label under "Apps" looks suspicious to
the untrained eye.

Change-Id: Ic679e5d6d825a83a8f666bb7e6429bebf1280f6d
Signed-off-by: Roman Birg <roman@cyngn.com>

hide search assistant arrow from lockscreen when custom lockscreen is enabled

Change-Id: I02d8286dd9f07cdb1de8a61101e772be35f65fda

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

cleanup some resources

Change-Id: I022eae8f6bd0977a10c228bc473930da6515aad8

Keyguard: Move test app translations to the correct place

Google messed up again with translations.
This change is needed because it interferes with our translations
which happen to use same string names as the Keyguard test app.

Change-Id: I593ab5f004f09e1b33c5ba7ef3d1bb19ffc643b4

Conflicts:
	packages/Keyguard/test/res/values-es-rXA/strings.xml
	packages/Keyguard/test/res/values-ug/strings.xml

Revert "Themes: Support applying components from multiple themes [1/3]"

This reverts commit 6c43f81c2a237d2a20da9bda016a0be2069015d4.

frameworks: allow Keyguard package to be defined in overlay

This way, custom keyguards can have their own namespace.

Change-Id: Ia2dfa57652c6f3d3404963897fb2f20a265e5c76
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	core/java/com/android/internal/util/slim/LockscreenTargetUtils.java

frameworks: move keyguard wallpaper to system  (1/2)

Change-Id: I0eb1b5578b705c2ade4c0772fa86e09478b9f73e
Signed-off-by: Roman Birg <roman@cyngn.com>

Conflicts:
	core/java/android/app/WallpaperManager.java
	core/java/android/provider/Settings.java
	core/res/res/values/cm_strings.xml
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java
	services/java/com/android/server/ThemeService.java

WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent

Originally the api 'getCropAndSetWallpaperIntent' does not check
whether the parsed parameter is a NULL pointer, as leads to the
whole app crash if it call this api with a null parameter accidentally.
A null pointer check logic is added into its original parameter check
logic, so that this API will throw an IllegalArgumentException if it
is parsed with a null pointer

Change-Id: Ib7de40e571419d09e1a744edc969eb7162766b75

Add wallpaper pickers to seperate package [1/2]

Currently wallpaper pickers were part of the various launchers
and we were relying on Trebuchet's to add code for including
wallpapers from themes.  If Trebuchet is removed then this
functionality is lost.  This package is already included in all
builds so making the picker available here removes the dependency
on a specific launcher.

Trebuchet still contains a picker which should probably be removed
and make use of this package instead.

Change-Id: Ie42ae0e01f951a8293d13d6c8a73fde0dea6682b

Conflicts:
	packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java

rename the custom lockscreen state action

Change-Id: I4ffadda9392e8ca8765e5b8ca47994e3a9990792

WallpaperPicker: Destroy cropview to avoid leaks

If the cropview's TiledImageRenderer is rendering threads, the activity
context gets leaked. Avoid that by invoking its destroy in onDestroy() of activity.

Change-Id: I0804c903d14d3f3d13529f0fe90d12784d97e93f

Fix wallpapers not applying in full screen

Change-Id: I01f451d0b9a2236c2cdf0c7533e6f13ef03b7bf2

WallpaperCropper requires these permission.

Without these it just crashes lockscreen wallpaper.

Change-Id: I25c676244a919ed355e02664828ddd79dd327062

WallpaperCropper: do not display null bitmaps

It is possible that themes can include a corrupted bitmap,
and the lockscreen will try and display a NULL image resulting in an
empty thumbnail and applying it will cause the app to crash.

Change-Id: Ie0770486a9d58050a5f296a219d844a39937421e
Signed-off-by: Roman Birg <roman@cyngn.com>

WallpaperCropper: include wallpapers from themes!

Theme all the things!!!!!!!!!

Change-Id: Ie9d5d4dfe6533442188e38fa0b11742368246e37
Signed-off-by: Roman Birg <roman@cyngn.com>

WallpaperCropper: load wallpapers in the background

Change-Id: I134d94a85f25bf5db4c15fa9a89265c53e5b0c1d
Signed-off-by: Roman Birg <roman@cyngn.com>

Notify callbacks on "any" wallpaper change

Callbacks are not notified when the wallpaper is changed to
a live wallpaper.  This patch notifies callbacks of the change
regardless of the type of wallpaper be set.

Change-Id: Icbb7b825cd7e7096c90c5498b6fee0bc61a3de3b

Keyguard: Make sure disabling Camera widget

This fixes the issue that Camera widget is enabled on non-camera devices
until users open up lockscreen settings

Change-Id: I599733f65ec31a16f8a8c5ee98a8a2ba6bc56c63

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

perf: Send a boost hint when a key on the navbar is pressed

 * A lot of stuff happens, especially when invoking recents.
 * Get ahead of the storm by sending a boost hint before
   kicking off the animations.

Change-Id: I0cecd0c58f8bc8479ea44f63af796500d7b9d7d2

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

Themes: Theme immersive mode cling.

Change-Id: I5521b93f69e859c40cfd62eb4a367562200074e9

Themes: Use first asset entry for lockscreen wallpaper

The current implementation assumes the wallpaper will be named
either wallpaper.png or wallpaper.jpg.  If this is not the case
the wallpaper is not applied.  This patch implements the lockscreen
wallpaper the same way that the regular wallpaper is done.

Change-Id: I9f3dd299c1e61158fa53c163f7e42e21e2f9b1dc

Conflicts:
	core/java/android/content/pm/ThemeUtils.java

Themes: Use default_wallpaper for HOLO lockscreen wp

Change-Id: I9c7fd29c99d13e811993eb9b3b045010431ccad0

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

Fix setting change observing.

The observer doesn't deal with keyguard related options only.

Change-Id: Ib185662f4f8ca7508be3dce10091b5132aa823e1

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

Themes: Support applying components from multiple themes [1/3]

The current implementation assumes the components being passed
into the ThemeService belong to the same theme.  This patch uses
a Map instead of a List to pass in a mapping of components to
package names, allowing us to apply several components from
different themes.

Requesting a theme change now takes a Map<String, String> which
maps components to the theme package name they will be applied
from.
Example:
    Map<String, String> componentMap = new HashMap<String,String>();
    componentMap.add(ThemesColumns.MODIFIES_ICONS, "com.mytheme.blue");
    componentMap.add(ThemesColumns.MODIFIES_OVERLAYS, "com.mytheme.red");

    ThemeManager tm = (ThemeManager) contex.getSystemService(Context.THEME_SERVICE);
    tm.requestThemeChange(componentMap);

Change-Id: I13fa17eabecb824884fe522d5dc1822a4d7c55f4

Themes: Find wp asset when APK has dir entries

Some APKs are compiled with folders included as zip entries in the APK. This was causing
lockscreen wp to not correctly be set.

Change-Id: I9eca7878b29e3cfcb43abc4a9dab084d9c200b83

WallpaperCropper: fix lockscreen wallpaper "Set wallpaper" string

The string is wrong and does not reflect the correct action the user is
about to apply.

Change-Id: I91eba87a38546563d6cf88138a0ed07219ec794f
Signed-off-by: Roman Birg <roman@cyngn.com>

Change-Id: I98fde63ef9f3c0a5f334cd9a97b237a6f99c57f6