From dd3f6bdf28d3ab0f53860b12124ec0e965059601 Mon Sep 17 00:00:00 2001 From: d34d Date: Tue, 19 May 2015 14:44:55 -0700 Subject: [PATCH] Remove use of mCanceled It is possible for mCanceled to be set to true even though it was canceled without ever playing back the cancelation message. This can end up putting us in an incorrect state where the user must release both fingers so ACTION_UP finally sets mCanceled to false. The cancel() method was still being called and since it does the proper checks for removing/sending messages, the use of mCanceled is unneccessary. Change-Id: I38679d3bf65157a9ba5ca3d898c5c8d55e5df9f5 REF: LETTUCE-293 (cherry picked from commit a726a3d99013e750419169bf1ceff4dc051e7319) (cherry picked from commit 8bcb714b056d9909cadd37f9268f459e8a206964) --- .../setupwizard/util/EnableAccessibilityController.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java b/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java index 440129b1..56f3f601 100644 --- a/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java +++ b/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java @@ -91,7 +91,6 @@ public class EnableAccessibilityController { private final float mTouchSlop; private boolean mDestroyed; - private boolean mCanceled; private float mFirstPointerDownX; private float mFirstPointerDownY; @@ -177,12 +176,6 @@ public class EnableAccessibilityController { public boolean onTouchEvent(MotionEvent event) { final int pointerCount = event.getPointerCount(); final int action = event.getActionMasked(); - if (mCanceled) { - if (action == MotionEvent.ACTION_UP) { - mCanceled = false; - } - return true; - } switch (action) { case MotionEvent.ACTION_POINTER_DOWN: { if (pointerCount > 2) { @@ -218,7 +211,6 @@ public class EnableAccessibilityController { } private void cancel() { - mCanceled = true; if (mHandler.hasMessages(MESSAGE_SPEAK_WARNING)) { mHandler.removeMessages(MESSAGE_SPEAK_WARNING); } else if (mHandler.hasMessages(MESSAGE_ENABLE_ACCESSIBILITY)) {