summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2011-11-10 17:03:12 -0800
committerChet Haase <chet@google.com>2011-11-10 17:03:12 -0800
commit8a22e59311ab797aeb10682b4c9e036ded95a429 (patch)
treedf505c0549140dd95a320f91675a37a39349f46f /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parenteae6c9972d91b9af58c3bf7ba0235c0a3e95c408 (diff)
Fix leak in LayoutTransition
LayoutTransition was making an incorrect assumption that there could only be one transition animation on a child of a transitioning container. But if multiple children are added/removed to/from that container, there would be multiple calls to set up changing animations for each existing child of that container. This meant that the child would have multiple, new OnLayoutChangeListeners added to it as part of the setup process. Meanwhile, we would cache only the latest listener in a hashmap that used the child as a key for the listener. Then when we cleaned up the hashmap later, we would remove only the latest listener from the child, leaving the rest there for eternity. The fix is to skip the setup entirely for children that already have listeners set on them; they must, if that's the case, already have been set up and are already listening for layout changes. Setting up the animation is redundant, and adding another listener is a leak. issue #5588509: memory leak in systemui Change-Id: I2c9f312cc2bcf4f2d08ac6b5d8f8e495aa4f3597
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions