diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-09-14 15:20:45 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2012-09-14 15:20:45 -0700 |
commit | 8b681cb8813454aac8a626bf3d7adaa8beca4d75 (patch) | |
tree | 07b7f6abafb5a0ec3e3926db1b27f1c44003be70 /services/java/com/android/server/accessibility/TouchExplorer.java | |
parent | 3efa8babf581b107f63e29dedb56166e5db1bfdb (diff) | |
download | frameworks_base-8b681cb8813454aac8a626bf3d7adaa8beca4d75.zip frameworks_base-8b681cb8813454aac8a626bf3d7adaa8beca4d75.tar.gz frameworks_base-8b681cb8813454aac8a626bf3d7adaa8beca4d75.tar.bz2 |
Some formatting missed in the previous patch
Change-Id: I299090ca67b1d90cf75a46dc85b13970d32511e5
Diffstat (limited to 'services/java/com/android/server/accessibility/TouchExplorer.java')
-rw-r--r-- | services/java/com/android/server/accessibility/TouchExplorer.java | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/services/java/com/android/server/accessibility/TouchExplorer.java b/services/java/com/android/server/accessibility/TouchExplorer.java index d620624..cb6b31a 100644 --- a/services/java/com/android/server/accessibility/TouchExplorer.java +++ b/services/java/com/android/server/accessibility/TouchExplorer.java @@ -333,24 +333,18 @@ class TouchExplorer implements EventStreamTransformation { // The event for gesture end should be strictly after the // last hover exit event. - if (mTouchExplorationGestureEnded) { - switch (eventType) { - case AccessibilityEvent.TYPE_VIEW_HOVER_EXIT: { - mTouchExplorationGestureEnded = false; - sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END); - } break; - } + if (mTouchExplorationGestureEnded + && eventType == AccessibilityEvent.TYPE_VIEW_HOVER_EXIT) { + mTouchExplorationGestureEnded = false; + sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END); } // The event for touch interaction end should be strictly after the // last hover exit and the touch exploration gesture end events. - if (mTouchInteractionEnded) { - switch (eventType) { - case AccessibilityEvent.TYPE_VIEW_HOVER_EXIT: { - mTouchInteractionEnded = false; - sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_END); - } break; - } + if (mTouchInteractionEnded + && eventType == AccessibilityEvent.TYPE_VIEW_HOVER_EXIT) { + mTouchInteractionEnded = false; + sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_END); } // If a new window opens or the accessibility focus moves we no longer @@ -393,9 +387,9 @@ class TouchExplorer implements EventStreamTransformation { switch (event.getActionMasked()) { case MotionEvent.ACTION_DOWN: - // The delayed enter not delivered implies that we have delivered - // TYPE_TOUCH_INTERACTION_START and not TYPE_TOUCH_INTERACTION_END, - // therefore we need to deliver the interaction end event here. + // The delayed enter not delivered implies that we have delivered + // TYPE_TOUCH_INTERACTION_START and not TYPE_TOUCH_INTERACTION_END, + // therefore we need to deliver the interaction end event here. if (mSendHoverEnterDelayed.isPending()) { sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_END); } @@ -1157,16 +1151,16 @@ class TouchExplorer implements EventStreamTransformation { } if (Build.IS_DEBUGGABLE) { - if (mSendHoverEnterDelayed.isPending()) { - throw new IllegalStateException("mSendHoverEnterDelayed must not be pending."); - } - if (mSendHoverExitDelayed.isPending()) { - throw new IllegalStateException("mSendHoverExitDelayed must not be pending."); - } - if (!mPerformLongPressDelayed.isPending()) { - throw new IllegalStateException( - "mPerformLongPressDelayed must not be pending."); - } + if (mSendHoverEnterDelayed.isPending()) { + throw new IllegalStateException("mSendHoverEnterDelayed must not be pending."); + } + if (mSendHoverExitDelayed.isPending()) { + throw new IllegalStateException("mSendHoverExitDelayed must not be pending."); + } + if (!mPerformLongPressDelayed.isPending()) { + throw new IllegalStateException( + "mPerformLongPressDelayed must not be pending."); + } } // Remove pending event deliveries. |