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

Commit 35f5cf4d authored by Pawan Kumar's avatar Pawan Kumar Committed by Giulio Cervera
Browse files

SystemUI: Fix RecentsPanel deadlock on rapidly pressing

Make sure mShwoing is false when view is not visible to
avoid deadlock.

CRs-Fixed: 380332
Change-Id: I301e24809765d47a5a2ac729790541030f328d6e
parent 00f5b58a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -461,6 +461,13 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe
    // tasks on touch down
    @Override
    public boolean onTouch(View v, MotionEvent ev) {
        /* When recent panel button pressed rapidly with 5+ apps open,
         * deadlock happen between view not visible and mShowing
         * remains true.
         * Make sure mShowing is false when view is not visible.*/
        if (getVisibility() != VISIBLE)
            mShowing = false;

        if (!mShowing) {
            int action = ev.getAction() & MotionEvent.ACTION_MASK;
            if (action == MotionEvent.ACTION_DOWN) {