OSDN Git Service

Plug leaks in transitions
authorChet Haase <chet@google.com>
Fri, 13 Sep 2013 20:29:31 +0000 (13:29 -0700)
committerChet Haase <chet@google.com>
Sat, 14 Sep 2013 19:06:18 +0000 (12:06 -0700)
commit7660d121b2ef21164ed33e6091e5dd50f5d0f939
treecb1046fb4edb97d80f0c23b2621bd0dbbed0f5eb
parent78d0cf7958dfde7951ed1a2c0317e04d6b41f4f3
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
core/java/android/transition/Transition.java
core/java/android/transition/TransitionManager.java
core/java/android/transition/Visibility.java
core/java/android/view/ViewTreeObserver.java