diff options
author | Alan Viverette <alanv@google.com> | 2015-05-06 10:41:43 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2015-05-06 10:41:43 -0700 |
commit | e54d245b993e1347cb32c23a6bdc907a45fab324 (patch) | |
tree | be087de6d12733ca9800724ac77103a0b2173964 /core/java/android/animation | |
parent | 424681e43e454bfcbceb863ddccb875ea57ec26f (diff) | |
download | frameworks_base-e54d245b993e1347cb32c23a6bdc907a45fab324.zip frameworks_base-e54d245b993e1347cb32c23a6bdc907a45fab324.tar.gz frameworks_base-e54d245b993e1347cb32c23a6bdc907a45fab324.tar.bz2 |
Improve keying for theme caches, rebase system theme on config change
Themes now use an array of applied styles rather than a String to store
their history. They are keyed based on a hash code computed from the
history of applied styles. The themed drawable cache has been abstracted
out into its own class.
Also updates system context to use DayNight as the default and ensures
that GlobalActions uses the correct context, which exercises the change.
CTS tests have been added in another CL.
Bug: 20421157
Change-Id: I9eb4b7dffd198ad24d02f656eaf0839570b59caa
Diffstat (limited to 'core/java/android/animation')
-rw-r--r-- | core/java/android/animation/AnimatorInflater.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/animation/AnimatorInflater.java b/core/java/android/animation/AnimatorInflater.java index 427ecce..435d5ab 100644 --- a/core/java/android/animation/AnimatorInflater.java +++ b/core/java/android/animation/AnimatorInflater.java @@ -108,7 +108,7 @@ public class AnimatorInflater { float pathErrorScale) throws NotFoundException { final ConfigurationBoundResourceCache<Animator> animatorCache = resources .getAnimatorCache(); - Animator animator = animatorCache.get(id, theme); + Animator animator = animatorCache.getInstance(id, theme); if (animator != null) { if (DBG_ANIMATOR_INFLATER) { Log.d(TAG, "loaded animator from cache, " + resources.getResourceName(id)); @@ -157,7 +157,7 @@ public class AnimatorInflater { final ConfigurationBoundResourceCache<StateListAnimator> cache = resources .getStateListAnimatorCache(); final Theme theme = context.getTheme(); - StateListAnimator animator = cache.get(id, theme); + StateListAnimator animator = cache.getInstance(id, theme); if (animator != null) { return animator; } |