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

Commit f4f6be60 authored by Jon Miranda's avatar Jon Miranda Committed by Android (Google) Code Review
Browse files

Merge "Let BubbleTextHolder extend IconLabelDotView" into tm-dev

parents d8a37c2e a0fb57dc
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import com.android.launcher3.model.data.ItemInfoWithIcon;
/**
 * Views that contain {@link BubbleTextView} should implement this interface.
 */
public interface BubbleTextHolder {
public interface BubbleTextHolder extends IconLabelDotView {
    BubbleTextView getBubbleText();

    /**
@@ -32,4 +32,14 @@ public interface BubbleTextHolder {
     */
    default void onItemInfoUpdated(ItemInfoWithIcon itemInfo) {
    }

    @Override
    default void setIconVisible(boolean visible) {
        getBubbleText().setIconVisible(visible);
    }

    @Override
    default void setForceHideDot(boolean hide) {
        getBubbleText().setForceHideDot(hide);
    }
}
+3 −11
Original line number Diff line number Diff line
@@ -587,7 +587,7 @@ public class FloatingIconView extends FrameLayout implements
        view.matchPositionOf(launcher, originalView, isOpening, positionOut);

        // We need to add it to the overlay, but keep it invisible until animation starts..
        view.setVisibility(INVISIBLE);
        setIconAndDotVisible(view, false);
        parent.addView(view);
        dragLayer.addView(view.mListenerView);
        view.mListenerView.setListener(view::fastFinish);
@@ -596,16 +596,8 @@ public class FloatingIconView extends FrameLayout implements
            view.mEndRunnable = null;

            if (hideOriginal) {
                if (isOpening) {
                setIconAndDotVisible(originalView, true);
                view.finish(dragLayer);
                } else {
                    originalView.setVisibility(VISIBLE);
                    if (originalView instanceof IconLabelDotView) {
                        setIconAndDotVisible(originalView, true);
                    }
                    view.finish(dragLayer);
                }
            } else {
                view.finish(dragLayer);
            }