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

Commit 1473ddd7 authored by Christine Franks's avatar Christine Franks
Browse files

Dismiss CAB when tap elsewhere

Bug: 33104975
Test: manual - open CAB, touch anywhere else on screen and CAB
will dismiss itself.

Change-Id: I2bfc981acb6b0d618daa42750ab625cce2f571d2
parent 7485df50
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -568,6 +568,17 @@ public class Calculator extends Activity
        }
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent e) {
        if (e.getActionMasked() == MotionEvent.ACTION_DOWN) {
            stopActionModeOrContextMenu();
            if (mDragLayout.isOpen()) {
                mHistoryFragment.stopActionModeOrContextMenu();
            }
        }
        return super.dispatchTouchEvent(e);
    }

    @Override
    public void onBackPressed() {
        if (!stopActionModeOrContextMenu()) {