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

Commit 419c1092 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Fixing a leak in WallpaperColorInfo" into sc-dev

parents adcc940d 1b548462
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -102,9 +102,11 @@ public class WallpaperColorInfo implements OnColorsChangedListener {
    private void notifyChange() {
        // Create a new array to avoid concurrent modification when the activity destroys itself.
        mTempListeners = mListeners.toArray(mTempListeners);
        for (OnChangeListener listener : mTempListeners) {
        for (int i = mTempListeners.length - 1; i >= 0; --i) {
            final OnChangeListener listener = mTempListeners[i];
            if (listener != null) {
                listener.onExtractedColorsChanged(this);
                mTempListeners[i] = null;
            }
        }
    }