base: properly check that quickboot is enabled

Change-Id: I0c9e54ee2cdf4efb5097cd101a0fa274f493d816
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Themes: Theme immersive mode cling.

Change-Id: I5521b93f69e859c40cfd62eb4a367562200074e9
WallpaperCropper: include wallpapers from themes!

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

Change-Id: Ie9d5d4dfe6533442188e38fa0b11742368246e37
Signed-off-by: Roman Birg <roman@cyngn.com>
Fix PackageManagerService WTF in systemReady()

This resolves the following error:
F/SystemServer(31979): BOOT FAILURE making Package Manager Service ready
F/SystemServer(31979): java.lang.SecurityException: Unable to find app for caller android.app.ActivityThread$ApplicationThread@42171630 (pid=31979) when registering receiver android.app.LoadedApk$ReceiverDispatcher$InnerReceiver@420d1130
F/SystemServer(31979):  at com.android.server.am.ActivityManagerService.registerReceiver(ActivityManagerService.java:13157)
F/SystemServer(31979):  at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1506)
F/SystemServer(31979):  at android.app.ContextImpl.registerReceiverAsUser(ContextImpl.java:1481)
F/SystemServer(31979):  at com.android.internal.content.PackageMonitor.register(PackageMonitor.java:84)
F/SystemServer(31979):  at com.android.server.pm.UserManagerService.systemReady(UserManagerService.java:237)
F/SystemServer(31979):  at com.android.server.pm.PackageManagerService.systemReady(PackageManagerService.java:11305)
F/SystemServer(31979):  at com.android.server.ServerThread.initAndLoop(SystemServer.java:1022)
F/SystemServer(31979):  at com.android.server.SystemServer.main(SystemServer.java:1372)
F/SystemServer(31979):  at java.lang.reflect.Method.invokeNative(Native Method)
F/SystemServer(31979):  at java.lang.reflect.Method.invoke(Method.java:515)
F/SystemServer(31979):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
F/SystemServer(31979):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
F/SystemServer(31979):  at dalvik.system.NativeStart.main(Native Method)

TODO: Revisit this in the future when Google updates AOSP for multiple
system contexts.

Change-Id: I74be7a7a3ba1ede55a8ccae7c86e7650b27f435e
Themes: Use INSTALL_LOCATION_INTERNAL_ONLY for legacy icon packs

If an icon pack is currently applied and is installed using forward
locking, the system will crash when the pack is updated.  Several
applications can have the pack attached to their resources and this
causes the system to crash because it cannot unmount the asec container
to finish the post install process.  Installing these packs to internal
storage without forward locking alleviates this issue.

This is done with theme packs as well, including legacy themes.

Change-Id: I155fc0bd671f3f9baaf2565d1c4d654a0a5348dc
Theme IME switcher alert dialog

Change-Id: I5344e9ddbacb1520080532d9cc1a7a5f5428e131
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Keyguard: fix NPE setting lockscreen wallpaper

After boot the view might not be laid out and so getWidth() and
getHeight() return 0 and will cause a NullPointerException in
createBitmap().

Change-Id: Ibacf4199a69709dc34d21695732c2a5360533a23
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
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
Themes: Use default_wallpaper for HOLO lockscreen wp

Change-Id: I9c7fd29c99d13e811993eb9b3b045010431ccad0
Revert "Send broadcast when package is 'about' to be removed"

This reverts commit 238e80a5c7edcb922ce15feebec74ea2475c31cb.
This was a band-aid that is being fixed in a future commit.

Change-Id: I89a928e2fd9cff2b1992a6e85eb5c96c5b8b9b0e
Themes: Update LoadedApk resources.

Instead of creating a new LoadedApk when resources are not up to
date, we use the existing LoadedApk but recreate mResources.

Change-Id: Ic1ad810863d03c2cedc751c9e84dd7c954daf3d7
Use ArrayListExtra for broadcasting theme changes [1/2]

Change-Id: I897cfbbe293b73f9e8f069f4b4cefa7c3ffb79ed
Modify config to support app specific themes [1/4]

Summary of Changes
1. The configuration now supports each app to have their own theme.
Each theme can include icons, styles (ie overlays) and font.

2. The theme config is serialized into a json string and stored
in secure settings.  This entry consolidates what was previously 3 separate
keys (style, icon, font) into a single field.

3. 'CustomTheme' was renamed to 'ThemeConfiguration'.

Note: This commit is for the configuration. Additional work needs to be done to
the framework and UI to support app specific themes.

Change-Id: I6f72f542829578201c57c54786456486f6a6e2e3
Allow specifying a theme when creating a Context

A Context normally loads the resources associated with the given
package that this context is for.  This patch allows us to specify
a theme we want attached to a given context's resources.

Change-Id: I1e619f038566233bd89ee96eb8eb87fa6894e630
Use systemui's applied theme for notifications.

Notifications contain RemoteViews which are inflated using the
application's context for which this notification belongs to.  This
can look out of place if SystemUI is using a different theme than the
rest of the system.

This patch will use SystemUIs theme when inflating the RemoteViews,
giving us a more consistent look in the notification drawer.

Change-Id: I9514ce7fcc4858bad3d3c4190f55c1f5a1441d7c
Add getThemedResourcesForApplicationAsUser()

Change-Id: I90b7cb441e4056f59b7260ffa55e31eba644e25a
Themes: Add icon previews to ThemesContract

Change-Id: Icbfbee3404702a29881ad4933721d8beb39bef30
Revert "listview: ensure active views are filled prior than scrap views"

This reverts commit 830a0024f1de9655d50c703ed1d10a81005db40e.

See http://review.cyanogenmod.org/#/c/67348/

Change-Id: I066e6ee8d9dc478c752ecfa161fd638bce7cee40
Allow subclasses to override bindPreferences().

Allows them to modify adapter behaviour.

Change-Id: I6767e3988740b674fbdf40a903cd2ef3949ca7db
Themes: Style, boot animation, and wallpaper previews

Change-Id: I2b367bf5336c03f2a4972a05b68922065cd4a701