Break strong ref to ExpandableNotificationRow
Since AnimationRunner requires two GCs to be collected, one in the binding process and then one in system ui, the source notification can be retained for longer than expected. To avoid this, break the strong reference to the source notification after the animation has finished or is cancelled. Ideally, AnimationRunner would be marked as static to avoid the outer class from being retained longer than necessary. Unfortunately, this requires more code changes. To keep this change focused on the largest contributor, the notification, I'm holding off on that change. Bug: 144109427 Test: Dumped java heap after clicking on notification to open app. Checked that ExpandableNotificationRow wasn't retained by AnimationRunner. Change-Id: I69ab16cf0dff2fa96e2b0205c670e4e0d666dd14
Loading
Please register or sign in to comment