From de7faf658cd40d34c08a98b39477055da8e19172 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 30 Jun 2009 13:27:30 -0700 Subject: Fix issue #1673793: Theme styles don't apply. It turns out this was not a problem in the resource code at all. Rather, the system process has a cache of pre-loaded attributes it uses to avoid continually reloading things as it needs them. Well it turns out this cache wasn't flushed after a package was uninstalled or a configuration changed, so you could re-install an app where you change its style resources so its theme now points to one that is inconsistent in the cache. This is mostly a problem for developers, where they continually install new versions of an app where resources have changed. This could possibly show up when updating an app on a normal phone, although the problem would eventually correct itself since this cache uses weak references. Anyway, the cache is now reworked to be flushed appropriately. This change also includes an update to aapt to be able to dump the contents of bags in resources. --- include/utils/ResourceTypes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h index 5c41ead4a8d1..eb4151a1ac72 100644 --- a/include/utils/ResourceTypes.h +++ b/include/utils/ResourceTypes.h @@ -1441,7 +1441,7 @@ struct ResTable_type * This is the beginning of information about an entry in the resource * table. It holds the reference to the name of this entry, and is * immediately followed by one of: - * * A Res_value structures, if FLAG_COMPLEX is -not- set. + * * A Res_value structure, if FLAG_COMPLEX is -not- set. * * An array of ResTable_map structures, if FLAG_COMPLEX is set. * These supply a set of name/value mappings of data. */ @@ -1843,6 +1843,8 @@ private: status_t parsePackage( const ResTable_package* const pkg, const Header* const header); + void print_value(const Package* pkg, const Res_value& value) const; + mutable Mutex mLock; status_t mError; -- cgit v1.2.3-59-g8ed1b