am cb38a97c: am 90abd6d1: Merge "Ensure accessibility node cache is synced with service state" into klp-dev
* commit 'cb38a97c08ea69902120e333297597af2a62a743': Ensure accessibility node cache is synced with service state
This commit is contained in:
@@ -67,11 +67,12 @@ public class AccessibilityNodeInfoCache {
|
||||
if (ENABLED) {
|
||||
final int eventType = event.getEventType();
|
||||
switch (eventType) {
|
||||
case AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END:
|
||||
case AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED:
|
||||
case AccessibilityEvent.TYPE_VIEW_HOVER_ENTER:
|
||||
case AccessibilityEvent.TYPE_VIEW_HOVER_EXIT: {
|
||||
// If the active window changes, clear the cache.
|
||||
final int windowId = event.getWindowId();
|
||||
// If a new window, we clear the cache.
|
||||
if (mWindowId != windowId) {
|
||||
mWindowId = windowId;
|
||||
clear();
|
||||
|
||||
@@ -736,9 +736,9 @@ class TouchExplorer implements EventStreamTransformation {
|
||||
+ "there is at least one pointer down!");
|
||||
}
|
||||
case MotionEvent.ACTION_UP: {
|
||||
mAms.onTouchInteractionEnd();
|
||||
// Announce the end of a the touch interaction.
|
||||
sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_END);
|
||||
mAms.onTouchInteractionEnd();
|
||||
mLongPressingPointerId = -1;
|
||||
mLongPressingPointerDeltaX = 0;
|
||||
mLongPressingPointerDeltaY = 0;
|
||||
@@ -822,6 +822,7 @@ class TouchExplorer implements EventStreamTransformation {
|
||||
AccessibilityManager accessibilityManager = AccessibilityManager.getInstance(mContext);
|
||||
if (accessibilityManager.isEnabled()) {
|
||||
AccessibilityEvent event = AccessibilityEvent.obtain(type);
|
||||
event.setWindowId(mAms.getActiveWindowId());
|
||||
accessibilityManager.sendAccessibilityEvent(event);
|
||||
switch (type) {
|
||||
case AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_START: {
|
||||
|
||||
Reference in New Issue
Block a user