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

Commit 259b7c0c authored by Gavin Williams's avatar Gavin Williams Committed by Android (Google) Code Review
Browse files

Merge "Autoclick: Fix panel closing logic" into main

parents f7735d3e a550f9bd
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -371,6 +371,12 @@ public class AutoclickTypePanel {

    /** Reset panel as collapsed state and only displays selected button. */
    public void collapsePanelWithClickType(@AutoclickType int clickType) {
        // When collapsing the panel show these buttons again.
        if (mIsExpandedPanelWiderThanScreen) {
            mPauseButton.setVisibility(View.VISIBLE);
            mPositionButton.setVisibility(View.VISIBLE);
        }

        hideAllClickTypeButtons();
        final ImageButton selectedButton = getButtonFromClickType(clickType);
        selectedButton.setVisibility(View.VISIBLE);
@@ -486,12 +492,6 @@ public class AutoclickTypePanel {
    /** Toggles the panel expanded or collapsed state. */
    private void togglePanelExpansion(@AutoclickType int clickType) {
        if (mExpanded) {
            // When collapsing the panel show these buttons again.
            if (mIsExpandedPanelWiderThanScreen) {
                mPauseButton.setVisibility(View.VISIBLE);
                mPositionButton.setVisibility(View.VISIBLE);
            }

            // If the panel is already in expanded state, we should collapse it by hiding all
            // buttons except the one user selected.
            collapsePanelWithClickType(clickType);
+0 −2
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -42,7 +41,6 @@ import platform.test.desktop.DesktopMouseTestRule

@RunWith(AndroidJUnit4::class)
@RequiresFlagsEnabled(Flags.FLAG_ENABLE_AUTOCLICK_INDICATOR)
@Ignore("b/435284589")
class AutoclickPanelTests {
    @Rule(order = 0)
    @JvmField