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

Commit e9648c63 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove pattern matching instanceof" into main

parents 2e9054c5 73dec3eb
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2087,8 +2087,9 @@ public class BubbleController implements ConfigurationChangeListener,

            BubbleLogger.Event event = isExpanded ? BubbleLogger.Event.BUBBLE_BAR_EXPANDED
                    : BubbleLogger.Event.BUBBLE_BAR_COLLAPSED;
            if (mBubbleData.getSelectedBubble() instanceof Bubble bubble) {
                mLogger.log(bubble, event);
            BubbleViewProvider selectedBubble = mBubbleData.getSelectedBubble();
            if (selectedBubble instanceof Bubble) {
                mLogger.log((Bubble) selectedBubble, event);
            } else {
                mLogger.log(event);
            }
@@ -2099,8 +2100,9 @@ public class BubbleController implements ConfigurationChangeListener,
            // Only need to update the layer view if we're currently expanded for selection changes.
            if (mLayerView != null && mLayerView.isExpanded()) {
                mLayerView.showExpandedView(selectedBubble);
                if (selectedBubble instanceof Bubble bubble) {
                    mLogger.log(bubble, BubbleLogger.Event.BUBBLE_BAR_BUBBLE_SWITCHED);
                if (selectedBubble instanceof Bubble) {
                    mLogger.log((Bubble) selectedBubble,
                            BubbleLogger.Event.BUBBLE_BAR_BUBBLE_SWITCHED);
                }
            }
        }