Introduced an asset redirection system to the theme engine.
Previously, the theme engine required careful redirection of only the highest-level "theme" style element, relying then on the theme attribute lookups to satisfy the demands of all themeable apps. This approach created significant challenges which required, in some cases, heavy modification for existing applications to support the engine. Custom widgets and themed components required special theme support in order to be reachable by the style engine alone. Similarly, a number of clumsy hacks were required around the framework to support certain components such as menus and tab widgets. The asset redirection system allows the theme to specify a redirection table which is consulted for nearly all final resource resolutions. This essentially means that once the theme is applied, any original resource being redirected would no longer be accessible by the AssetManager, instead being redirected to the matching resource in the theme itself. In order for this to function efficiently it is necessary to create cache files mapping resource integers from one package to another, even if those integers will change across releases. For this, one-time name to integer conversions occur, with the results written in a data format suitable for efficient reads for each AssetManager created. Currently this format must be parsed and cannot be directly mmaped though this will be addressed in future commits. Change-Id: Ie36e74314c600a72e03e568675a38801b7acd1ee
Loading
Please register or sign in to comment