diff options
author | Chet Haase <chet@google.com> | 2013-09-13 13:29:31 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2013-09-14 12:06:18 -0700 |
commit | 7660d121b2ef21164ed33e6091e5dd50f5d0f939 (patch) | |
tree | cb1046fb4edb97d80f0c23b2621bd0dbbed0f5eb /core/java/android/transition/Transition.java | |
parent | 78d0cf7958dfde7951ed1a2c0317e04d6b41f4f3 (diff) | |
download | frameworks_base-7660d121b2ef21164ed33e6091e5dd50f5d0f939.zip frameworks_base-7660d121b2ef21164ed33e6091e5dd50f5d0f939.tar.gz frameworks_base-7660d121b2ef21164ed33e6091e5dd50f5d0f939.tar.bz2 |
Plug leaks in transitions
Transitions were leaking views due to TransitionsValues holding references
to views/parents. The references were fine, but the retention of the transition
objects themselves were not. There were a few different places that needed to
be plugged:
- clones were not making new copies of some fields, leading to caching references
in the original object (which was then cloned later to other clones)
- Visibility was using a persistent field to cache temporary values. This transition,
when cloned, would retain these instances, keeping references to views
- ViewTreeObserver had a bug that would leak listeners
Issue #10749071 Activity instance leak between TransitionManager and InputMethodManager
Change-Id: I1d5d457dc5e020c7b9e8392a95e3b2c488461119
Diffstat (limited to 'core/java/android/transition/Transition.java')
-rw-r--r-- | core/java/android/transition/Transition.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java index c588c6b..2fb32aa 100644 --- a/core/java/android/transition/Transition.java +++ b/core/java/android/transition/Transition.java @@ -1451,6 +1451,8 @@ public abstract class Transition implements Cloneable { try { clone = (Transition) super.clone(); clone.mAnimators = new ArrayList<Animator>(); + clone.mStartValues = new TransitionValuesMaps(); + clone.mEndValues = new TransitionValuesMaps(); } catch (CloneNotSupportedException e) {} return clone; |