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

Commit 7577cfda authored by Lyn Han's avatar Lyn Han
Browse files

Remove deprecated code from stack & expanded view

Bug: 161939484
Test: tap manage menu app settings => stack collapses so fast that
there is no discernable difference between waiting and not waiting for
collapse animation to finish before starting the settings activity

Change-Id: I87b8c4418bd8f99821a2f6221fd35f651a98a748
parent b19564f7
Loading
Loading
Loading
Loading
+0 −9
Original line number Original line Diff line number Diff line
@@ -458,15 +458,6 @@ public class BubbleExpandedView extends LinearLayout {
        mPointerView.setBackground(mPointerDrawable);
        mPointerView.setBackground(mPointerDrawable);
    }
    }


    /**
     * Hides the IME if it's showing. This is currently done by dispatching a back press to the AV.
     */
    void hideImeIfVisible() {
        if (mKeyboardVisible) {
            performBackPressIfNeeded();
        }
    }

    @Override
    @Override
    protected void onDetachedFromWindow() {
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        super.onDetachedFromWindow();
+4 −35
Original line number Original line Diff line number Diff line
@@ -1081,11 +1081,10 @@ public class BubbleStackView extends FrameLayout
                    final Bubble bubble = mBubbleData.getSelectedBubble();
                    final Bubble bubble = mBubbleData.getSelectedBubble();
                    if (bubble != null && mBubbleData.hasBubbleInStackWithKey(bubble.getKey())) {
                    if (bubble != null && mBubbleData.hasBubbleInStackWithKey(bubble.getKey())) {
                        final Intent intent = bubble.getSettingsIntent(mContext);
                        final Intent intent = bubble.getSettingsIntent(mContext);
                        collapseStack(() -> {
                        mBubbleData.setExpanded(false);
                        mContext.startActivityAsUser(intent, bubble.getUser());
                        mContext.startActivityAsUser(intent, bubble.getUser());
                        logBubbleEvent(bubble,
                        logBubbleEvent(bubble,
                                SysUiStatsLog.BUBBLE_UICHANGED__ACTION__HEADER_GO_TO_SETTINGS);
                                SysUiStatsLog.BUBBLE_UICHANGED__ACTION__HEADER_GO_TO_SETTINGS);
                        });
                    }
                    }
                });
                });


@@ -1792,36 +1791,6 @@ public class BubbleStackView extends FrameLayout
        }
        }
    }
    }


    /**
     * Dismiss the stack of bubbles.
     *
     * @deprecated
     */
    @Deprecated
    void stackDismissed(int reason) {
        if (DEBUG_BUBBLE_STACK_VIEW) {
            Log.d(TAG, "stackDismissed: reason=" + reason);
        }
        mBubbleData.dismissAll(reason);
        logBubbleEvent(null /* no bubble associated with bubble stack dismiss */,
                SysUiStatsLog.BUBBLE_UICHANGED__ACTION__STACK_DISMISSED);
    }

    /**
     * @deprecated use {@link #setExpanded(boolean)} and
     * {@link BubbleData#setSelectedBubble(Bubble)}
     */
    @Deprecated
    @MainThread
    void collapseStack(Runnable endRunnable) {
        if (DEBUG_BUBBLE_STACK_VIEW) {
            Log.d(TAG, "collapseStack(endRunnable)");
        }
        mBubbleData.setExpanded(false);
        // TODO - use the runnable at end of animation
        endRunnable.run();
    }

    void showExpandedViewContents(int displayId) {
    void showExpandedViewContents(int displayId) {
        if (mExpandedBubble != null
        if (mExpandedBubble != null
                && mExpandedBubble.getExpandedView() != null
                && mExpandedBubble.getExpandedView() != null