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

Commit c8045674 authored by Lyn Han's avatar Lyn Han
Browse files

Fix NPE

Bug: 160625440
Test: treehugger
Change-Id: Ibb6b185d811a9928eec9e3fe9abaded61856d357
parent d4e95a39
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1586,6 +1586,11 @@ public class BubbleStackView extends FrameLayout
            Log.d(TAG, "setSelectedBubble: " + bubbleToSelect);
        }

        if (bubbleToSelect == null) {
            mBubbleData.setShowingOverflow(false);
            return;
        }

        // Ignore this new bubble only if it is the exact same bubble object. Otherwise, we'll want
        // to re-render it even if it has the same key (equals() returns true). If the currently
        // expanded bubble is removed and instantly re-added, we'll get back a new Bubble instance
@@ -1594,10 +1599,11 @@ public class BubbleStackView extends FrameLayout
        if (mExpandedBubble == bubbleToSelect) {
            return;
        }
        if (bubbleToSelect == null || bubbleToSelect.getKey() != BubbleOverflow.KEY) {
            mBubbleData.setShowingOverflow(false);
        } else {

        if (bubbleToSelect.getKey() == BubbleOverflow.KEY) {
            mBubbleData.setShowingOverflow(true);
        } else {
            mBubbleData.setShowingOverflow(false);
        }

        if (mIsExpanded && mIsExpansionAnimating) {