Merge "Touch exploration gesture end not delivered to clients." into jb-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cc822a769e
@@ -384,9 +384,11 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean sendAccessibilityEvent(AccessibilityEvent event) {
|
public boolean sendAccessibilityEvent(AccessibilityEvent event) {
|
||||||
|
final int eventType = event.getEventType();
|
||||||
|
|
||||||
// The event for gesture start should be strictly before the
|
// The event for gesture start should be strictly before the
|
||||||
// first hover enter event for the gesture.
|
// first hover enter event for the gesture.
|
||||||
if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_HOVER_ENTER
|
if (eventType == AccessibilityEvent.TYPE_VIEW_HOVER_ENTER
|
||||||
&& mTouchExplorationGestureStarted) {
|
&& mTouchExplorationGestureStarted) {
|
||||||
mTouchExplorationGestureStarted = false;
|
mTouchExplorationGestureStarted = false;
|
||||||
AccessibilityEvent gestureStartEvent = AccessibilityEvent.obtain(
|
AccessibilityEvent gestureStartEvent = AccessibilityEvent.obtain(
|
||||||
@@ -400,11 +402,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
|
|||||||
notifyAccessibilityServicesDelayedLocked(event, false);
|
notifyAccessibilityServicesDelayedLocked(event, false);
|
||||||
notifyAccessibilityServicesDelayedLocked(event, true);
|
notifyAccessibilityServicesDelayedLocked(event, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event.recycle();
|
||||||
|
mHandledFeedbackTypes = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The event for gesture end should be strictly after the
|
// The event for gesture end should be strictly after the
|
||||||
// last hover exit event for the gesture.
|
// last hover exit event for the gesture.
|
||||||
if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_HOVER_EXIT
|
if (eventType == AccessibilityEvent.TYPE_VIEW_HOVER_EXIT
|
||||||
&& mTouchExplorationGestureEnded) {
|
&& mTouchExplorationGestureEnded) {
|
||||||
mTouchExplorationGestureEnded = false;
|
mTouchExplorationGestureEnded = false;
|
||||||
AccessibilityEvent gestureEndEvent = AccessibilityEvent.obtain(
|
AccessibilityEvent gestureEndEvent = AccessibilityEvent.obtain(
|
||||||
@@ -412,9 +417,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
|
|||||||
sendAccessibilityEvent(gestureEndEvent);
|
sendAccessibilityEvent(gestureEndEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
event.recycle();
|
|
||||||
mHandledFeedbackTypes = 0;
|
|
||||||
|
|
||||||
return (OWN_PROCESS_ID != Binder.getCallingPid());
|
return (OWN_PROCESS_ID != Binder.getCallingPid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user