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

Commit 488b792e authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix not being able to dismiss panel with single tap

Bug: 16562847
Change-Id: Ic409b9dd23df7e79a20b83a8a63eaaf1f76b3dd0
parent dd5b8868
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -853,6 +853,12 @@ public abstract class PanelView extends FrameLayout {
        }
    }

    private final Runnable mPostCollapseRunnable = new Runnable() {
        @Override
        public void run() {
            collapse();
        }
    };
    private boolean onMiddleClicked() {
        switch (mStatusBar.getBarState()) {
            case StatusBarState.KEYGUARD:
@@ -862,7 +868,10 @@ public abstract class PanelView extends FrameLayout {
                mStatusBar.goToKeyguard();
                return true;
            case StatusBarState.SHADE:
                collapse();

                // This gets called in the middle of the touch handling, where the state is still
                // that we are tracking the panel. Collapse the panel after this is done.
                post(mPostCollapseRunnable);
                return false;
            default:
                return true;