summaryrefslogtreecommitdiffstats
path: root/src/org/cyanogenmod/themes/provider/PreviewGenerationService.java
Commit message (Collapse)AuthorAgeFilesLines
* Themes: Refactor themes to CMSDK [4/6]d34d2016-03-011-2/+4
| | | | | Change-Id: Ie078b20539e982cd124163da8816fb106c52b927 TICKET: CYNGNOS-2126
* Add live lock screen previews [2/2]d34d2015-11-191-2/+31
| | | | Change-Id: Id0d210bae65b17a2eced021bdb2d19fa5063f678
* Avoid OOME when generating many wallpaper previewsd34d2015-07-211-114/+33
| | | | | | | | | | | | | A pack containing a large collection of wallpapers could cause the preview generation to fail with an OOME since we were storing all the previews in memory before writing them to disk and adding their entries into the database. Wallpaper previews are now stored on disk within the wallpaper preview generator and the path is returned in the WallpaperItem object instead of the bitmaps. Change-Id: I1dca215bc2fab9266c0baa4bce2a39e2ff1238a6
* Delete preview table rows on theme updateRichard MacGregor2015-05-291-0/+8
| | | | | | | | Handle the case where a theme is updated with less wallpapers than it had when originally installed. Delete the rows for previews associated with the updated theme Change-Id: I79abf4d69f7656cbff2c0847cd3f82a737f9e6c2
* [2/2] Recognized multiple wallpapers in themeRichard MacGregor2015-05-191-27/+60
| | | | | | | | | | | | | | | | | Generate previews for multiple wallpapers in theme assets. Add each wallpaper to the previews sql table. Make sure current ThemeChooser won't display extra wallpapers. Themes Provider will return defaults (first) wallpaper only for current ThemeChooser implementations. Later revisions of ThemeChooser will use different content URI for querying multiple wallpaper previews. Depends on: http://review.cyanogenmod.org/#/c/98012/ Change-Id: I88616148a226126509f8aca2d995d1446ccaada4
* Fix exception on themes without lockscreen imagestobitege2015-05-191-26/+33
| | | | | | | | | | | | | Based on exceptions in logcat like this: Unable to save preview com.cerj.theme.blakazure/lock_wallpaper_preview PreviewGenerationService( 5413): java.lang.NullPointerException: Attempt to get length of null array at java.io.OutputStream.write(OutputStream.java:82) Added null checks to insertPreviewItemsIntoDb() for wallpaperItems props. saveCompressedImage() now immediately returns on null image. Change-Id: I63709a37780dfeabae14f8c1c34c88f8753728f9
* [2/3] Implement better legacy support for themesRichard MacGregor2015-05-181-44/+44
| | | | | | | | | | | | Move preview query construction to provider. This will allow for chooser to use older and newer versions of the provider and themes contract. Depends on: http://review.cyanogenmod.org/#/c/98708/ Change-Id: I8b350339c083935079baf9e2710ff4d9665507df
* [1/2] Use files instead of blobsRichard MacGregor2015-05-151-44/+147
| | | | | | | | | | | Previews columns now uses file paths instead of saving bitmap blobs in database. Depends on: http://review.cyanogenmod.org/#/c/96836/ http://review.cyanogenmod.org/#/c/97431/ Change-Id: Ic58d37fe99517f0519ab8436a2ac32d153aec94c
* [2/3] Improve PreviewsColumns ImplementationRichard MacGregor2015-05-151-31/+105
| | | | | | | | | | Previews columns now uses a key/value pair structure to allow for easier future support of multiple components per theme pack. Depends on: http://review.cyanogenmod.org/#/c/96836/ Change-Id: I37a44558d3c52f8fe910b4773495ee1fac71fbbd
* Fix version upgrades where "holo" may still be usedd34d2015-04-171-1/+4
| | | | | | | | | | | | | | The stock theme was renamed from holo to system for CM12 but there are old upgrades that still need to check for "holo" when updating columns in the database. The name change occurerd in the upgrade to version 11, all upgrades before that now explicitly call out "holo" instead of "system" to ensure the upgrade process completes as expected. This patch also fixes up the preview generation during the upgrade to version 6. Change-Id: I246d417f10c264c44a1741019589e50b968096e4
* Themes: Process theme resources after package scanned [2/2]staging/cm-12.1d34d2015-03-121-10/+26
| | | | | | | | | | | | | The provider now assumes that the theme service will process all themes and icons packs, and then sends the appropriate broadcast once processing is done for that package. The preview generator now queries for the theme 's capabilities rather than rely on that info to be passed in. This is partly due to the new flow of installing a theme as well as the fact that legacy icon packs were not having previews generated. Change-Id: I418debb6f91296107476016367131fac2c3a32ce
* Themes: Port to CM12 [4/6]Clark Scheff2015-01-151-0/+231
Auto-generate previews. Id: Ia8f12bc852fb708e52ccc98641eea278756b198f Add MODIFIES_STATUS_BAR and MODIFIES_NAVIGATION_BAR Id: If1f81b122cfb5075835c70dff0bcfa6dea5d8de8 Use image with largest size for boot ani preview. Id: I3f2c16aa6ceb18387925e2cf2812d8c3ddf0d3d7 Use same components used in the original chooser. Icon previews will be generated using the same login used in the theme chooser v1. Id: Iafcd9f3d78fc86a66fe3635d27ee9fb7d47ae531 Remove (Default) from Holo's title. Holo may not be the default theme and therefore we should not add this to the title. The clients can handle determining which theme is the default on a device and act accordingly. Id: I162b3af97b05205c3ddf1e6ce130d05d9e0fe81f Add query for retrieving previews of currently applied components. Id: Ic3cffb4b762a047af40c72846e6e6bcf9a273619 Delete previews from provider when theme removed Id: Ica221885b929f7671f048d367648f7c6f82e4529 Alias status bar background as navbar_background Id: I3a32ea59e8fa94689d20fe92fbbc544b9da6e32b Fix provider not updating previews due to missing action. Id: Icd9f38ab499cfc617862be7638f06a9273dbdc22 Retrieve correct wallpaper size and store as jpeg Id: I346516a5860819f15a6b689e6da1a6bdf4f2540f Add style preview. What was originally called STYLE_PREVIEW is now STYLE_THUMBNAIL and STYLE_PREVIEW is now a larger sized image of various controls. Id: Iecf9785e992efa98360c84af2054d3a2a113f094 Use ThemeUtils methods for getting wallpaper paths. Id: I7fb269abe38560d638a2bad74fcfb7ed6a9a4c43 Add newly added navbar background in ThemesContract. [1/2] Id: I6fc92388a58b69c7a52053103cf85bb348f6144a Keep track of when a theme was installed Id: I9cdf637d63a4ed3d14b978a7d6c019aed0afe8e0 Update provider with ComposedIconInfo changes in f/b Id: I6ad0db5f55ed0dfb42c30cb5946f5c10af5b5a0f Use getThemedResourcesForApplication for icons Since we no longer pass bitmaps around in ComposedIconInfo we need to make sure the icons are actually attached to the resources in order to retrieve the drawables for the composed icons. Id: I7c92ee9d4114399024743c01d0df7fcc0284c150 Themes: Let ThemeService handle all theme processing [3/3] Id: Ied877eb5f1e96774d2e415970034d0b892765134 Add theme to db when installed and defer processing This allows the theme to show up in the theme provider even though the theme resources still need to be compiled. Once they are compiled the themes provider will update the database with the previews. Id: I2505cb875ee36975745a46469b2e55afe4fd1e68 Catch excpetions that occur when generating icon previews Id: I22e270911af12b6bd3cd69c84205d8455f74cf79 REF: THEMES-387 Catch all exceptions for styles and systemui previews Id: I4e3ee24e049d6dedba331175e21a143872de1f8e Presentable themes should contian icons, wallpaper and overlays The thems provider considered any theme with 2 or more components as a presentable theme which may not be represented well in the Theme Chooser. This patch makes it mandatory that a theme have icons, wallpaper and overlays in order to be considered a presentable theme. Id: If9918bd50125a4cd74b7926c5617c882eb89d5c2 REF: CHOOSER-2 Get working on CM12 Id: If585b1c9ee10b049f473ba2ca4ee313e09b6e715 Add column for target api This column will allow us to easily track what version of CM a theme was built for in case of incompatibility issues. The system theme will have a value of 0 indicating that it works on whatever the current api level is on the device. This prevents us from updating the row for the system font whenever the api level increases. Id: Ic43b63f2f801243914124043c4f4113a6b75b914 CM11 -> CM12 Upgrade [2/3] Renamed the "holo" theme to "system" Id: I82f2cde2e26e0b13c95ebb0fc61253c805c0a16e Fix String.format in upgradeToVersion11() Id: I13917d0c7ab34ff25a6326aebc0d707780bd6769 Change-Id: Ic98ec257e56a82d7faef37c0d2a2cfe360d6e35c