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

Commit 86478aac authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Clean up FLAG_ENABLE_BUBBLE_SWIPE_UP_CLEANUP" into main

parents c7647280 0c771da1
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -226,16 +226,6 @@ flag {
    }
    }
}
}


flag {
    name: "enable_bubble_swipe_up_cleanup"
    namespace: "multitasking"
    description: "Enable clean up of bubbles swipe gesture handling"
    bug: "391909607"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
flag {
    name: "enable_enter_split_remove_bubble"
    name: "enable_enter_split_remove_bubble"
    namespace: "multitasking"
    namespace: "multitasking"
+0 −2
Original line number Original line Diff line number Diff line
@@ -314,7 +314,6 @@ class BubbleStackViewTest {
        }
        }
    }
    }


    @EnableFlags(Flags.FLAG_ENABLE_BUBBLE_SWIPE_UP_CLEANUP)
    @Test
    @Test
    fun expandStack_clearsImeRunnable() {
    fun expandStack_clearsImeRunnable() {
        val bubble = createAndInflateBubble()
        val bubble = createAndInflateBubble()
@@ -344,7 +343,6 @@ class BubbleStackViewTest {
        assertThat(bubbleStackViewManager.onImeHidden).isNull()
        assertThat(bubbleStackViewManager.onImeHidden).isNull()
    }
    }


    @EnableFlags(Flags.FLAG_ENABLE_BUBBLE_SWIPE_UP_CLEANUP)
    @Test
    @Test
    fun collapseStack_clearsImeRunnable() {
    fun collapseStack_clearsImeRunnable() {
        val bubble = createAndInflateBubble()
        val bubble = createAndInflateBubble()
+1 −2
Original line number Original line Diff line number Diff line
@@ -2680,8 +2680,7 @@ public class BubbleController implements ConfigurationChangeListener,
                mSysuiProxy.requestNotificationShadeTopUi(true, TAG);
                mSysuiProxy.requestNotificationShadeTopUi(true, TAG);
            }
            }


            if (Flags.enableBubbleSwipeUpCleanup() && !update.removedBubbles.isEmpty()
            if (!update.removedBubbles.isEmpty() && !mBubbleData.hasBubbles()) {
                    && !mBubbleData.hasBubbles()) {
                // This update removed all the bubbles. Send an update to SystemUI to mark the stack
                // This update removed all the bubbles. Send an update to SystemUI to mark the stack
                // collapsed. This should be sent by the UI classes (BubbleStackView or
                // collapsed. This should be sent by the UI classes (BubbleStackView or
                // BubbleBarLayerView), but if we fail to send this, home gesture stops working.
                // BubbleBarLayerView), but if we fail to send this, home gesture stops working.
+5 −7
Original line number Original line Diff line number Diff line
@@ -2459,13 +2459,11 @@ public class BubbleStackView extends FrameLayout
        if (mPositioner.isImeVisible()) {
        if (mPositioner.isImeVisible()) {
            hideCurrentInputMethod(onImeHidden);
            hideCurrentInputMethod(onImeHidden);
        } else {
        } else {
            if (Flags.enableBubbleSwipeUpCleanup()) {
            // Clear out the existing runnable if one was scheduled to run after IME was hidden.
            // Clear out the existing runnable if one was scheduled to run after IME was hidden.
            // IME hide action can take time or in some cases not trigger at all. And we can
            // IME hide action can take time or in some cases not trigger at all. And we can
            // get a second call to expand in during it. Make sure we don't run a previous
            // get a second call to expand in during it. Make sure we don't run a previous
            // runnable in that case.
            // runnable in that case.
            mManager.clearImeHiddenRunnable();
            mManager.clearImeHiddenRunnable();
            }
            // the IME is already hidden, so run the runnable immediately
            // the IME is already hidden, so run the runnable immediately
            onImeHidden.run();
            onImeHidden.run();
        }
        }