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

Commit 955278e4 authored by Joshua Tsuji's avatar Joshua Tsuji
Browse files

Delete BubbleTouchHandler in favor of more traditional touch handling.

This will scale better as we add more views and gestures.

Test: manual (fixing test suite now, just getting out for review!)
Bug: 152877243
Change-Id: I46001c24f4de58c3d70b7629a22b930fa791b77a
parent 035cf31b
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -718,13 +718,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
        return mBubbleData.isExpanded();
    }

    /**
     * Tell the stack of bubbles to expand.
     */
    public void expandStack() {
        mBubbleData.setExpanded(true);
    }

    /**
     * Tell the stack of bubbles to collapse.
     */
@@ -753,12 +746,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
        return (isSummary && isSuppressedSummary) || isBubbleAndSuppressed;
    }

    @VisibleForTesting
    void selectBubble(String key) {
        Bubble bubble = mBubbleData.getBubbleWithKey(key);
        mBubbleData.setSelectedBubble(bubble);
    }

    void promoteBubbleFromOverflow(Bubble bubble) {
        bubble.setInflateSynchronously(mInflateSynchronously);
        mBubbleData.promoteBubbleFromOverflow(bubble, mStackView, mBubbleIconFactory);
@@ -777,13 +764,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
        }
    }

    /**
     * Tell the stack of bubbles to be dismissed, this will remove all of the bubbles in the stack.
     */
    void dismissStack(@DismissReason int reason) {
        mBubbleData.dismissAll(reason);
    }

    /**
     * Directs a back gesture at the bubble stack. When opened, the current expanded bubble
     * is forwarded a back key down/up pair.
+13 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.content.Context;
import android.service.notification.NotificationListenerService;
import android.util.Log;
import android.util.Pair;
import android.view.View;

import androidx.annotation.Nullable;

@@ -751,6 +752,7 @@ public class BubbleData {
    }

    @VisibleForTesting(visibility = PRIVATE)
    @Nullable
    Bubble getBubbleWithKey(String key) {
        for (int i = 0; i < mBubbles.size(); i++) {
            Bubble bubble = mBubbles.get(i);
@@ -761,6 +763,17 @@ public class BubbleData {
        return null;
    }

    @Nullable
    Bubble getBubbleWithView(View view) {
        for (int i = 0; i < mBubbles.size(); i++) {
            Bubble bubble = mBubbles.get(i);
            if (bubble.getIconView() != null && bubble.getIconView().equals(view)) {
                return bubble;
            }
        }
        return null;
    }

    @VisibleForTesting(visibility = PRIVATE)
    Bubble getOverflowBubbleWithKey(String key) {
        for (int i = 0; i < mOverflowBubbles.size(); i++) {
Loading