summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Themes: Process theme resources after package scanned [2/2]staging/cm-12.1d34d2015-03-124-63/+39
| | | | | | | | | | | | | 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
* Return InstallState.UNKOWN if context or pkgName nulld34d2015-03-111-0/+2
| | | | Change-Id: I7e8f40335c4b5a202d457eba7f3bd337b9342908
* Themes: Add previous value and update time to mixnmatch [2/2]d34d2015-03-113-4/+58
| | | | Change-Id: I6b4224e9416e61ce7792e608bd4fd602a9b34e47
* Cleanup theme update pathd34d2015-03-102-19/+17
| | | | Change-Id: Idf2f586b743025f4788f3373fc0078efec48feb9
* Update target API on theme updatesd34d2015-03-071-0/+2
| | | | | | | | If a theme is updated to support a different target API it was not being properly updated in the ThemesProvider and therefore labeled incorrectly in the theme chooser. Change-Id: Ie600570fa6193ddf74a65897c732dfee3472751b
* Themes: Add RequestType to ThemeChangeRequest [2/3]d34d2015-03-032-5/+15
| | | | Change-Id: Id33b96b9bbf720522cecd65541098eb75dc6b315
* Themes: Update ThemesContract with install state [2/3]d34d2015-03-036-151/+219
| | | | | | | | | | | | | | | | | | | | | | | This provider will be responsible for keeping track of the installed state of themes. This includes two intermedite states, INSTALLING and UPDATING. When a theme is installed from PackageManager the provider will receive this broadcast and add the theme to its DB and set the state to INSTALLING if the ThemeService is processing the theme, or INSTALLED if not and broadcast the ACTION_THEME_INSTALLED action. When a theme is updated the provider will receive another broadcast indicating that the current version of the theme is being replaced. If the ThemeService needs to do some processing, we'll update the state to UPDATING. Once the theme service is done processing a theme, the provider will receive a broadcast from the ThemeService. At this point, the themes provider will update the state to INSTALLED, if it is not already set to that state. The provider will broadcast the ACTION_THEME_INSTALLED action if the previous state was INSTALLING and the ACTION_THEME_UPDATED action if the previous state was UPDATING. Change-Id: Ie37f85463e472d96b8393801007537db1e3eefc6
* Add value for TARGET_API in insertSystemDefaultsd34d2015-03-021-0/+2
| | | | Change-Id: I4923ddc57674fdc8f08ed5f58d42a2dbf0b6f13c
* close more cursors...stable/cm-12.0-YNG1IScott Mertz2015-02-261-2/+2
| | | | Change-Id: Iae1d13aa29807357f2c7615a40ac2de98d6f0b04
* Themes: Enhanced theming capabilities [2/3]Clark Scheff2015-02-241-11/+34
| | | | Change-Id: Ibd0f0d7f9bae758acf30b5d6600475e6319023f3
* close cursors when through with themScott Mertz2015-02-191-0/+2
| | | | Change-Id: I861b12ab595c80c5ee7c746f8e9402f9667ebbe7
* Don't update package while resources are being processedd34d2015-02-151-6/+6
| | | | | | | | | ThemePackageHelper.updatePackage() will call theme service to reapply a theme if it has been updated and currently applied. This should not happen until the the resources are ready to be re-attached to all running apps. Change-Id: Ieff6cfccae01fb336468416949e7ff3d87cd7699
* Reapply status bar and navbar overlays on updateClark Scheff2015-02-021-0/+8
| | | | | | | | If the status bar and/or navigation bar are using different overlays than those applied for the entire system, we need to reapply those as well. Change-Id: I68540bb30f8ba5248a5d8249357c20c966d917dd
* Relax constraint of what is considered a presentable themeClark Scheff2015-01-282-2/+25
| | | | | | | | | Themes that have at least overlays and a wallpaper will be marked as a presentable theme. If these two items are not in the theme then only their components will be available in their respective category. Change-Id: Ia67abafd2206029a20b8aa651e7379f34104a323
* Remove theme from list of themes being processedClark Scheff2015-01-271-0/+1
| | | | | | | | | | When we are updating a package that was previously being processed by the theme service, we were not removing the theme from the list in the shared preference which causes the provider to always call updatePackage. This can cause a call to the theme service to reapply the theme. Change-Id: I3a3e80f03f8c16e4804696374bf884ae7eef0011
* Fix isPresentableTheme() logicd34d2015-01-231-6/+9
| | | | | | | The way it was written guaranteed that ALL themes are marked as being presentable as a theme pack. Change-Id: Ic6cfa08ebd5f1841ea19da9bedb9c71c2fb02d0c
* Themes: Port to CM12 [4/6]Clark Scheff2015-01-1516-468/+2518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Themes: Let ThemeService handle all theme processing [3/3]Clark Scheff2014-09-232-12/+114
| | | | Change-Id: Ied877eb5f1e96774d2e415970034d0b892765134
* Themes: Only reapply fonts, icons and overlaysAndy Mast2014-07-071-12/+18
| | | | | | | | | | | | | | | The provider and WP service can be out of sync. This is possibly by applying a theme and then separately going in and changing the WP. Prior to this patch, an updated theme would trigger all set theme elements to be reapplied, including the wallpaper of the set theme, even if the user had changed the WP to something else. The issue has been resolved by only applying theme elements which: (1) do not pose a risk of being out of sync in the provider (2) must be reapplied so as to not cause a FC. Change-Id: I00f12952a5ef040e8f368d0fade222a3e88d003e
* Modify config to support app specific themes [3/4]Clark Scheff2014-07-013-5/+5
| | | | | | See frameworks/base commit for full msg. This is just simple renaming. Change-Id: If7011a93d60197b2879028902f8e9a190bac147d
* Don't call insertCapabilities for legacy icon packs.Clark Scheff2014-06-301-3/+0
| | | | Change-Id: Ib10a6888259a4da7a2341dc738dc91d0a1839392
* Revert "Reapply theme components in a runnable."Clark Scheff2014-06-301-17/+6
| | | | | | This reverts commit 92f77e77e097e59f9ec8d7bc64324f1987230af6. Change-Id: I79a7beedb43d097e743a41b0501805cd1afad9d4
* Revert "Listen for ACTION_PACKAGE_BEING_REMOVED"Clark Scheff2014-06-301-1/+1
| | | | | | This reverts commit 13b9a546c7dee1ca588ef7cbb2f643df85f8f0a0. Change-Id: Id560c730957484f2ae693f63b4597f275e44aaff
* Define reapply delay as a constantClark Scheff2014-06-261-1/+3
| | | | Change-Id: Ifc606b5ca07efeaef428edb7bd464cabcbe5c474
* Reapply theme components in a runnable.Clark Scheff2014-06-261-6/+15
| | | | | | | | | | | | We need to give other apps a chance to finish processing the ACTION_PACKAGE_REPLACED before reapplying the updated theme components. An example of this behavior can be seen when a legacy icon pack is applied and is updated. Some Google services, such as google play, FC when this happens. Change-Id: If526223e6d318b4240fa765abb53dbe61f9ce746
* Reapply theme components when theme updated.Clark Scheff2014-06-221-0/+22
| | | | Change-Id: Ia841ae6ef466e0b60016fab47abfe4c1089cc902
* Make sure to update theme capabilities.Clark Scheff2014-06-191-16/+18
| | | | Change-Id: I42970fd98e629bde8f32d698b67892ba7b8e6965
* ThemesProvider: Fix query compilation errorfuzz2014-06-111-1/+1
| | | | | | | | | | This fixes syntax error when excute the SELECT Clause 06-11 13:45:39.370: E/AndroidRuntime(3359): java.lang.RuntimeException: Unable to start receiver org.cyanogenmod.themes.provider.AppReceiver: android.database.sqlite.SQLiteException: near "?": syntax error (code 1): , while compiling: SELECT pkg_name FROM themes WHERE (pkg_name?) Change-Id: If9857b1db447e8752ddf04ce3f7d2cc84d5b28a5
* Merge "Insert instead of update if theme doesn't exist" into cm-11.0Andy Mast2014-06-101-1/+23
|\
| * Insert instead of update if theme doesn't existAndy Mast2014-06-081-1/+23
| | | | | | | | | | | | | | This handles the case where an app is being upgraded and previously was not a theme. and therefore wasn't in the provider. Change-Id: I7b3f64aed2b78081822cb0f9daf0cbd638e0b15b
* | When applied theme is removed, revert to defaultAndy Mast2014-06-051-1/+2
| | | | | | | | | | | | | | Fixes issue where fonts and other resources do not get reverted properly when an applied theme is uninstalled. Change-Id: I30c9ea018f8bffc6aff51c5b38ff1e4ec82b7b20
* | Cleanup cached preview images on uninstallAndy Mast2014-06-043-37/+91
|/ | | | Change-Id: I9267a160fbabeb67ade2f18fdaf8d8c6acc539da
* Merge "Fix NPE if themeContext is null - round 2" into cm-11.0Abhisek Devkota2014-05-261-1/+2
|\
| * Fix NPE if themeContext is null - round 2Dirk Rettschlag2014-05-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | If a theme is uninstalled and timing is perfect, it can happen that the CopyImageService is trying to get the PackageContext of a not existing package. Return from the function if a NameNotFoundException is catched. Change-Id: I8f4e33d527f78228f9681ac518292364e9269a0c Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
* | Standardize preview images.Clark Scheff2014-05-222-24/+127
| | | | | | | | | | | | | | | | | | | | | | Themes can contain a preview image for wallpaper, lockscreen, and styles. These can be either .png or .jpg and use the following naming conventions: wallpaper -> assets/images/wallpaper_preview.[png|jpg] lockscreen -> assets/images/lockscreen_preview.[png|jpg] styles -> assets/images/styles_preview.[png|jpg] Change-Id: Ibe441abf941e8b995c94eb43f6c6f237758d914b
* | Properly handle updating holo theme.Clark Scheff2014-05-191-8/+23
| | | | | | | | Change-Id: I157e597ee53894b1237c05dd2000b1da957b1968
* | CM11 Themes: Allow defining a custom default theme [2/3]Clark Scheff2014-05-183-16/+78
| | | | | | | | Change-Id: I94521a09339fb760b7a56b9a3ba3d2c56e2d3ac5
* | Merge "Listen for ACTION_PACKAGE_BEING_REMOVED" into cm-11.0Clark Scheff2014-05-181-1/+1
|\ \
| * | Listen for ACTION_PACKAGE_BEING_REMOVEDClark Scheff2014-05-161-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Requires http://review.cyanogenmod.org/#/c/64139/ This will allow us to handle changing back to the default theme for any components that are using the package about to be removed. Some apps may crash if the them resources are removed before we change the theme back. Change-Id: If1778ea4dd3be86af21479f12e75d22083e168ef
* | Themes: Support launcher based icon packs [2/2]Andy Mast2014-05-173-3/+66
|/ | | | | | | | | Before this patch, icon packs written for Trebuchet/Nova/Apex could not be used with the new theme engine as the formats were different. For full description, see [1/2] in frameworks/base Change-Id: Ifaec3c4b459a74eab19c69a086e117b96aeb3e0f
* Fix NPE if themeContext is nullDirk Rettschlag2014-05-131-1/+2
| | | | | | | | | | | | | When installing a new theme it sometimes happens that the ThemesProvider crashes due to a NullPointerException in hasThemeComponent(...) when executing AssetManager assetManager = themeContext.getAssets(); Don't silently catch the NameNotFoundException and return an empty map. Change-Id: I9d7bf8f79b9c38cd5da668a7fcf205406ffdd79c Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
* Include alarms in mixnmatch.Clark Scheff2014-05-101-1/+14
| | | | Change-Id: I11a63b665550fc7f8f89df837ab0fc8ebcd2c8d3
* Theme Chooser: Initial Contribution [2/2]Andy Mast2014-05-065-0/+1029
Introduces a new theme chooser UI for the new theme engine. The new theme chooser allows the user to mix'n'match theme components (styles, boot anim, icons, fonts, wallpapers, sounds). Contributors: Adrian Foulk - UX Lead Andrew Mast - Software Engineer Clark Scheff - Software Engineer RJ Oakes - QA Engineer Special thanks to T-Mobile for open sourcing the original theme engine. Change-Id: Ifdcc0655ae4125ba3287c5c82fbe852840b3625d