Loading services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +25 −22 Original line number Diff line number Diff line Loading @@ -1301,25 +1301,24 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub /** Send a motion event to the service to allow it to perform gesture detection. */ public boolean sendMotionEventToListeningServices(MotionEvent event) { synchronized (mLock) { boolean result; event = MotionEvent.obtain(event); if (DEBUG) { Slog.d(LOG_TAG, "Sending event to service: " + event); } return notifyMotionEvent(event); } result = scheduleNotifyMotionEvent(event); return result; } /** * Notifies services that the touch state on a given display has changed. */ public boolean onTouchStateChanged(int displayId, int state) { synchronized (mLock) { if (DEBUG) { Slog.d(LOG_TAG, "Notifying touch state:" + TouchInteractionController.stateToString(state)); } return notifyTouchState(displayId, state); } return scheduleNotifyTouchState(displayId, state); } /** Loading Loading @@ -1650,7 +1649,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub return false; } private boolean notifyMotionEvent(MotionEvent event) { private boolean scheduleNotifyMotionEvent(MotionEvent event) { synchronized (mLock) { AccessibilityUserState state = getCurrentUserStateLocked(); for (int i = state.mBoundServices.size() - 1; i >= 0; i--) { AccessibilityServiceConnection service = state.mBoundServices.get(i); Loading @@ -1659,10 +1659,12 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub return true; } } } return false; } private boolean notifyTouchState(int displayId, int touchState) { private boolean scheduleNotifyTouchState(int displayId, int touchState) { synchronized (mLock) { AccessibilityUserState state = getCurrentUserStateLocked(); for (int i = state.mBoundServices.size() - 1; i >= 0; i--) { AccessibilityServiceConnection service = state.mBoundServices.get(i); Loading @@ -1671,6 +1673,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub return true; } } } return false; } Loading Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +25 −22 Original line number Diff line number Diff line Loading @@ -1301,25 +1301,24 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub /** Send a motion event to the service to allow it to perform gesture detection. */ public boolean sendMotionEventToListeningServices(MotionEvent event) { synchronized (mLock) { boolean result; event = MotionEvent.obtain(event); if (DEBUG) { Slog.d(LOG_TAG, "Sending event to service: " + event); } return notifyMotionEvent(event); } result = scheduleNotifyMotionEvent(event); return result; } /** * Notifies services that the touch state on a given display has changed. */ public boolean onTouchStateChanged(int displayId, int state) { synchronized (mLock) { if (DEBUG) { Slog.d(LOG_TAG, "Notifying touch state:" + TouchInteractionController.stateToString(state)); } return notifyTouchState(displayId, state); } return scheduleNotifyTouchState(displayId, state); } /** Loading Loading @@ -1650,7 +1649,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub return false; } private boolean notifyMotionEvent(MotionEvent event) { private boolean scheduleNotifyMotionEvent(MotionEvent event) { synchronized (mLock) { AccessibilityUserState state = getCurrentUserStateLocked(); for (int i = state.mBoundServices.size() - 1; i >= 0; i--) { AccessibilityServiceConnection service = state.mBoundServices.get(i); Loading @@ -1659,10 +1659,12 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub return true; } } } return false; } private boolean notifyTouchState(int displayId, int touchState) { private boolean scheduleNotifyTouchState(int displayId, int touchState) { synchronized (mLock) { AccessibilityUserState state = getCurrentUserStateLocked(); for (int i = state.mBoundServices.size() - 1; i >= 0; i--) { AccessibilityServiceConnection service = state.mBoundServices.get(i); Loading @@ -1671,6 +1673,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub return true; } } } return false; } Loading