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

Commit d1e7c000 authored by Christoph Studer's avatar Christoph Studer Committed by Android Git Automerger
Browse files

am 068f5929: Fix memory leak in NotificationStackScrollLayout

* commit '068f5929':
  Fix memory leak in NotificationStackScrollLayout
parents 47b32b65 068f5929
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.OverScroller;

import com.android.systemui.ExpandHelper;
@@ -710,6 +709,12 @@ public class NotificationStackScrollLayout extends ViewGroup
                super.onInterceptTouchEvent(ev);
    }

    @Override
    protected void onViewRemoved(View child) {
        super.onViewRemoved(child);
        mCurrentStackScrollState.removeViewStateForView(child);
    }

    private boolean onInterceptTouchEventScroll(MotionEvent ev) {
        /*
         * This method JUST determines whether we want to intercept the motion.
+4 −0
Original line number Diff line number Diff line
@@ -72,6 +72,10 @@ public class StackScrollState {
        return mStateMap.get(requestedView);
    }

    public void removeViewStateForView(View child) {
        mStateMap.remove(child);
    }

    /**
     * Apply the properties saved in {@link #mStateMap} to the children of the {@link #mHostView}.
     * The properties are only applied if they effectively changed.