summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Themes: Don't recreate theme when mTheme is nulld34d2015-10-271-3/+5
| | | | | Change-Id: Idfa1c0799bb804956663ab1473b12fb1d4b44b8d TICKET: CYNGNOS-1139
* Fix issue where non-themable app still had themed fontsd34d2015-10-271-18/+17
| | | | | | | | The previous logic made it possible for a non-themable app to retain the applied font rather than use the system fonts as expected. Change-Id: Ia2ff7ec7741681712f201ce85e52df1c0a6a0225 TICKET: CYNGNOS-939
* ResourcesManager: fix lookups with ThemeConfigRoman Birg2015-10-271-12/+7
| | | | | | | | | | | Always include a theme config in resource keys, regardless of whether it is deemed as themeable or not. This prevents creating additional asset managers for each top level resource call. Instead it will cache them properly. Change-Id: I687311275d62773460e7771a2e223b75ff94ed8f Signed-off-by: Roman Birg <roman@cyngn.com>
* Resources: cache themed resourcesRoman Birg2015-10-275-13/+74
| | | | | Change-Id: I408665180d19eb422386fc69bc9afa4bbe0d05d6 Signed-off-by: Roman Birg <roman@cyngn.com>
* Themes: Set composed icon scale to 1f defaultd34d2015-10-271-0/+1
| | | | | | This currently only affects icon previews from the themes provider. Change-Id: I85a01915e3d76d21d69896cb2f49c1b15fe69366
* Themes: Use current user ID when getting ThemeConfigd34d2015-10-271-0/+4
| | | | | Change-Id: I8189c0250657d20d2a2b79fca093f034aeacfeb7 TICKET: CYNGNOS-968
* Themes: Don't use themed fonts for non themable packagesd34d2015-10-272-5/+15
| | | | Change-Id: I8a86e13a7ebc8be59286700c26a55d9d6a013db9
* Keyguard: Remove bouncer when re-registering status bard34d2015-10-272-1/+2
| | | | | | | | | | | When changing themes we restart the keyguard which causes the StatusBarKeyguardViewManager to recreate the bouncer without first removing the old bouncer. This would cause a user to not be able to correctly enter their pin since the wrong PasswordTextView would be found via findViewById(). This patch removes the bouncer view if mBouncer is non-null when registering the status bar. Change-Id: I392502bb648f04016d0b39fbf337054ff4ca3a89
* Themes: Use warning level logging for getBootThemed34d2015-10-271-1/+1
| | | | | | | | We handle the SecurityException gracefully by returning the standard system ThemeConfig so there is no need to use error level logging for this case. Change-Id: I2805e5e83c105d201eb5812467fd0954e2a93a01
* Themes: Compose icons that just have scale definedd34d2015-10-271-1/+2
| | | | | Change-Id: I34db00d30f506086dca49d27f7e92b68184a78de REF: THEMES-674
* Themes: Allow packages to be set as non-themeabled34d2015-10-277-46/+60
| | | | | | | | | | | | This patch allows for specific packages to be declared as non themeable. Packages that are non themeable will not have theme resources attached to their assets when their Resources object is created. This patch also removes isThemeable from CompatibilityInfo as this object did not correctly reflect that the package is not themeable. Change-Id: Id34c63ec0c3ef7c69df083da63559e0720ce0018
* Themes: don't recreateDefaults on typeface when locale changesRoman Birg2015-10-271-1/+3
| | | | | | | | | When changing the device locales, we don't need to call recreateDefaults() every time the locale config has changed, as it is a very expensive operation. Change-Id: Iada86642145aa48772e70e89786e482640c75474 Signed-off-by: Roman Birg <roman@cyngn.com>
* Themes: Theme power off and reboot dialogAltaf-Mahdi2015-10-271-2/+4
| | | | | | | This patch allows theming of the dialog which comes after the power menu Change-Id: I81546543da13cf220d9247dbce833d6e883ed091
* Fix memory leak in AAPTd34d2015-10-271-4/+12
| | | | | | | Always delete your shit! Change-Id: If14ecedd6cced46c96bbe670b1e337def0a7edf5 REF: CYNGNOS-701
* Only clear icon cache when theme/icon pack appliedd34d2015-10-272-19/+19
| | | | | | | | Icon cache would get cleared on boot when applying the user's theme at startup which can negatively impact launchers when they are loading icons. Icon cache should persist as long as that icon pack is applied. Change-Id: I248e08cdc87a31c1718cbc53aed49891056300cc
* Store manifest hash code in PackageParser.Packaged34d2015-10-273-60/+43
| | | | | | | | Optimize the way we calculate the manifest hash code and also store this value in PackageParser.Package for faster lookups. The manifest hash code value will also be updated when packages are updated. Change-Id: I111e8831c5b96d847e886071e99b1cefd075befc
* Stop checking for resources.arsc in shouldCreateIdmapd34d2015-10-271-16/+0
| | | | | | | | | The check for resources.arsc in the target apk was a fix for when we supported legacy themes (t-mobile engine). Since support for legacy themes was dropped in cm-12.0, this patch just adds extra overhead and results in ANRs in some cases. Change-Id: I275d9ccd3e67eead91f3e8c39a2b64f31f473ed3
* themes: Fix strictmode warningsSteve Kondik2015-10-272-5/+6
| | | | | | | | * Use access() in the native layer instead of constructing a File object, as this will open the file and trigger a strictmode warning any time we hit this code path. Change-Id: I0ee93e84c4b6d4937fc1ab08975e1a4c10a80295
* Close cursor after getting supported components.d34d2015-10-271-6/+9
| | | | Change-Id: I501ff52da7158561d759e4301f47a7665b5f6d3d
* Show reboot dialog using themed resourcesd34d2015-10-271-2/+12
| | | | Change-Id: Ia09cccce5beedb1a825ea3730577df97894fe10a
* Get themed resources in KeyButtonViewd34d2015-10-271-0/+24
| | | | | | | | | | When saving a customized button layout for the navigation bar, the buttons load resources from the theme applied to systemui, regardless if the navigation bar is being themed by a different package. This is not correct behavior. Change-Id: I4e44ef517c2ea9ac3828e790f6a4b850726bc840 REF: NIGHTLIES-1377
* SystemUI: Expose values in status bar expanded headerDave Kover2015-10-274-5/+52
| | | | | | | | | | Expose values related to weather and battery status. Consolidate attributes into styles and remove the separate values. Also expose the alarm status color. Themers gotta theme. Change-Id: I599cb2e697aa1b714c8c383eb6fb9577b7347180
* Add File.separator to end of internalPathd34d2015-10-271-1/+1
| | | | | | | | | | | | | When compiling theme resources, packages that start with the same internal path end up being processed by AAPT which can cause conflicts and not allow the theme to be installed. An example of this is a theme that overlays both com.google.android.gm and com.google.android.gms. When the overlay for com.google.android.gm is being processed, resources from com.google.android.gms are also included. This is easily resolved by appending a file separator to the end of internalPath. Change-Id: I98f7e0fd65c54bdd854df1539e815ad76cfa44ae
* SystemUI: Add new dimens values for expanded status bar paddingDave Kover2015-10-273-4/+10
| | | | | | | | | | Currently, the notification header and QS panel use the same side padding as the notifications themselves. Adding new values that allow more complex theming scenarios for these layouts. The stuff that dreams are made of. Change-Id: I7166ab08e3e35b8907b3c2e65039f02df18dfd72
* Introduce Theme Versioning [1/2]Andy Mast2015-10-271-0/+75
| | | | | | See also the CMSDK Project Change-Id: Id37031f353e059ef1e57f3d5d19a6c0f8d3c5ad1
* [1/2] Themes: Multiwallpaper supportAndy Mast2015-10-274-10/+77
| | | | | | | | | | | 1. Add wallpaper component id to ThemeChangeRequest 2. Query themes provider for the wallpaper path given a pkgName and wallpaper id. Previously the path was only assumed from the pkgName. 3. Update the mix'n'match table to reflect the component id Change-Id: Ia38da1c36b3c2f7f038d0a34054aff2257a294dc
* [1/2] Recognized multiple wallpapers in themeRichard MacGregor2015-10-271-5/+21
| | | | | | | Add functions into ThemeUtils for returning paths to all wallpapers found in theme assets. Change-Id: If0c9a2038fe8ea3dab83020962b875678e39546a
* Make ACCESS_THEME_MANAGER permission system|signatured34d2015-10-271-1/+1
| | | | Change-Id: Ie47fe84c2124c5320d3fac5da1db31a9560d5b82
* Return original value if icon info is nulld34d2015-10-271-1/+5
| | | | | | | | If the composed icon info is null then there is not much to do so restore the original TypedValue and return. Change-Id: I3351af8b996125b376f5db6a9dad6d37605d69b2 REF: THEMES-648
* [1/3] Implement better legacy support for themesRichard MacGregor2015-10-271-106/+75
| | | | | | Switch back to consistent naming of variables for preview columns in themes contract. Change-Id: I9edfb219098a5ab7109c5d79995602edd77f3658
* Don't dismiss keyguard if recreating status bard34d2015-10-271-1/+2
| | | | | | | | | | During the recreation of the status bar, showBouncer() gets called and ends up dismissing the keyguard. If mRecreating is true then we do not want to dismiss the keyguard. Change-Id: Ieb8d4be19794f37250bc47dbfb2b5fbe1307244b REF: THEMES-647
* [1/3] Improve PreviewsColumns ImplementationRichard MacGregor2015-10-271-1/+95
| | | | | | | Previews columns now uses a key/value pair structure to allow for easier future support of multiple components per theme pack. Change-Id: Ice3a505b8da1278cc1f9130165885020beca7308
* Remove resources.apk from ZipSet when removing overlayd34d2015-10-272-0/+9
| | | | | | | | | | When a theme that is currently applied is updated, the resources.apk prior to the update remains in the AssetManager ZipSet and is still used when loading themed assets. This patch removes the resources.apk from the ZipSet so that the new one can be correctly loaded in. Change-Id: Ia0b415a3598779825090f365581d374bf51c812d REF: THEMES-639
* Adding additional Nova theme identifier to legacy icon support.Dave Kover2015-10-271-1/+2
| | | | | | Patching this bad boy. Change-Id: Ie037b3b6380eb9552dcc274d71fa26ab8776b4a1
* Themes: Make parse() method in FontListParser publicd34d2015-10-272-26/+47
| | | | | | | | | | This allows other apps, such as the Theme Chooser, to use the parser without needing to duplicate code. Methods were generalized to use input streams that support marking so that the stream can be reset after checking if the xml is in the legacy format. Change-Id: Id77adabba836267e3dfcdd536b2859d3faa7d78d REF: CHOOSER-83
* Fix fetching application context for ThemedUiContext.Danny Baumann2015-10-271-5/+10
| | | | Change-Id: I7719fc8823fef93556f5a9ab088a77b73cf7eeff
* Themes: include new icon features in shouldComposeIcon()d34d2015-10-271-2/+9
| | | | Change-Id: I509ae1989fe1ec701cec7bc6ead78ab4e69bd64d
* Themes: Translate before rotating composed iconsd34d2015-10-271-1/+1
| | | | | | | Order matters. Calling rotate before translate causes the icon to be rotated about a point that is not in the center. Change-Id: Ied1a0e030b39c8b6d8fb23bdbcc5a7f7928ea4a6
* Themes: Add randomization to composed icon rotationd34d2015-10-272-2/+20
| | | | | | | | | | | | This patch adds an addition attribute named "plusMinus" which allows a theme designer to specifiy a +/- variation to the angle of rotation. The final icon will be rotated by the angle specified +/- a random angle within the range specified by the value defined with "plusMinus" ex: <rotate angle="30" plusMinus="5" /> Change-Id: I51a65c90209547417fe99b215164f8418f9f7f6b
* Themes: Pass ComposedIconInfo into createIconBitmapd34d2015-10-271-32/+24
| | | | | | | | | | The majority of the parameters being passed into createIconBitmap were coming straight from the ComposedIconInfo so rather than pass them in separately we just pass in the ComposedIconInfo object. This will help prevent increasing the # of parameters as more features are added to composed icons. Change-Id: I6840db66a1369e0d75de4c662563b96dc58c34ab
* Themes: Add rotation and translation to composed iconsd34d2015-10-272-4/+77
| | | | | | | | | | | | | | | | | | | | | | This feature allows a theme to specify a rotation and translation in addition to scaling the original icon when composing. To use this new feature a theme designer will need to include the <rotate /> and/or <translate /> tags with the following syntax: <rotate angle="angle_to_rotate" /> where angle_to_rotate can be from 0 to 360 degrees <translate xOffset="x_value" yOffset="y_value" /> where x_value and y_value are device indipendent pixels and can be any value (both positive and negative depending on which way you want to move the icon) ex: <rotate angle="45"/> <translate xOffset="-10" yTranslate="15"/> Change-Id: I37ccf7861d22ee3aa21fce25e7e1b1afc49b3bcc
* Themes: Add palettized icon background supportd34d2015-10-276-13/+1675
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature allows a theme to supply a single icon background, usually a white or gray scale image, which will then be tinted using a color from a palette of six color styles. To use this new feature a theme designer will need to include the new <paletteback /> tag which has the following syntax: <paletteback img="name_of_png_drawable" swatchType=["vibrant" | "vibrantLight" | "vibrantDark" | "muted" | "mutedLight" | "mutedDark"] defaultSwatchColor1="hex_color" defaultSwatchColor2="hex_color" ⋮ defaultSwatchColorN="hex_color" /> ex: <paletteback img="iconback_palette" swatchType="vibrantDark" defaultSwatchColor1="#009688" defaultSwatchColor2="#cc0000" defaultSwatchColor3="#ff8800" /> You should specify some default swatch colors for those cases when the original icon did not have any colors to match the swatchType you requested. If no default swatch colors are defined, the original un-tinted background will be used. Change-Id: Ifd6dd65cc34ad4cd966fa9670f68704ac5671960
* SysUI: Invert notification backgroundsd34d2015-10-271-10/+17
| | | | | | | | | | | | | Notifications for ambient display were enhanced to support fading back into full color and saturation. This change involved hiding the notification background instead of inverting it along with the rest of the notification view. This doesn't play well with themes that use a darker background and lighter text color. This patch keeps the background visible and inverts it along with the rest of the notification, which allows the text to be visible. Change-Id: I8e7cb5b77be096c6a426751ad4c98de2529059d1
* Themes: Remove unnecessary query in updateWallpaperd34d2015-10-271-11/+0
| | | | | | | Not sure why this is here but it's not necessary since the returned cursor was never used besides calling moveTofirst() Change-Id: I95b579d89f3a77e2187cea498a4a22d67e6a3486
* Themes: Create data/cm/ for CM specific test datad34d2015-10-2741-11/+1800
| | | | Change-Id: I523845be1bf2cbe1c2f01fc1cb0e7d2a9d8ef1e1
* Remove legacy ThemesTestClark Scheff2015-10-2710-544/+0
| | | | Change-Id: I142448bd24d4b78b7d86f3b9cc27a39166d44b68
* VolumeUI: Call mContext.recreateTheme() on theme changed34d2015-10-271-0/+1
| | | | | | | | | This resolves an issue where the theme object is holding on to themed resources that no longer exist. See http://review.cyanogenmod.org/91826 for more details. Change-Id: I6a6fd560791de42cf2f89807800ea158f4c591af
* Themes: Don't add android overlay if target is androidd34d2015-10-271-1/+2
| | | | | | | | | | If basePackageName equals "android" we are already overlaying the framework so there is no need to overlay it a second time. This is the case for the system's resources as well as cases where explicit assets are being requested for a package, which could be the android package. Change-Id: I5c881e71bc4d733fc8dbd7f752874ba34ab50f69
* Avoid boot looping when theme provider is unavailableAndy Mast2015-10-271-1/+6
| | | | | | Was reported to happen when the device is encrypted. Change-Id: I0e8da0270180038211bc469792bd5089aff49e96
* Themes: Properly hide recreateThemed34d2015-10-271-0/+1
| | | | Change-Id: Ifa23515cfbf8eaf16d2bbe26374cbdcf65929dff