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

Commit 82d36c14 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix NPE when content visibility changes" into rvc-dev am: e39c2e7e...

Merge "Fix NPE when content visibility changes" into rvc-dev am: e39c2e7e am: e0eb8200 am: c053f672 am: e8e2e8c6

Change-Id: Id3a75220255970f16d4c7d33ba1151efef6b4443
parents 09ca2976 e8e2e8c6
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ import com.android.systemui.statusbar.policy.SmartReplyView;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;

/**
 * A frame layout containing the actual payload of the notification, including the contracted,
@@ -518,9 +519,12 @@ public class NotificationContentView extends FrameLayout {
    protected void onVisibilityChanged(View changedView, int visibility) {
        super.onVisibilityChanged(changedView, visibility);
        updateVisibility();
        if (visibility != VISIBLE) {
        if (visibility != VISIBLE && !mOnContentViewInactiveListeners.isEmpty()) {
            // View is no longer visible so all content views are inactive.
            for (Runnable r : mOnContentViewInactiveListeners.values()) {
            // Clone list as runnables may modify the list of listeners
            ArrayList<Runnable> listeners = new ArrayList<>(
                    mOnContentViewInactiveListeners.values());
            for (Runnable r : listeners) {
                r.run();
            }
            mOnContentViewInactiveListeners.clear();