Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdcab776 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge "Fixed a memory leak with notification children" into nyc-dev am: 9688c2ed am: af433337

am: 54591427

* commit '54591427':
  Fixed a memory leak with notification children

Change-Id: I2c17c5c9cadb226d74a08deccbe09472e4e22c9c
parents 57882e09 54591427
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1545,6 +1545,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            }
            for (int i = 0; i < toRemove.size(); i++) {
                removeNotification(toRemove.get(i).getStatusBarNotification().getKey(), ranking);
                // we need to ensure that the view is actually properly removed from the viewstate
                // as this won't happen anymore when kept in the parent.
                mStackScroller.removeViewStateForView(toRemove.get(i));
            }
        }
    }
+9 −0
Original line number Diff line number Diff line
@@ -3591,6 +3591,15 @@ public class NotificationStackScrollLayout extends ViewGroup
        setFadedOut(alpha != 1.0f);
    }

    /**
     * Remove the a given view from the viewstate. This is currently used when the children are
     * kept in the parent artificially to have a nicer animation.
     * @param view the view to remove
     */
    public void removeViewStateForView(View view) {
        mCurrentStackScrollState.removeViewStateForView(view);
    }

    /**
     * A listener that is notified when some child locations might have changed.
     */