Loading services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java +3 −26 Original line number Diff line number Diff line Loading @@ -1180,7 +1180,6 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo } private boolean anyServiceWantsGenericMotionEvent(MotionEvent event) { if (Flags.alwaysAllowObservingTouchEvents()) { final boolean isTouchEvent = event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN); if (isTouchEvent && !canShareGenericTouchEvent()) { return false; Loading @@ -1188,33 +1187,11 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo final int eventSourceWithoutClass = event.getSource() & ~InputDevice.SOURCE_CLASS_MASK; return (mCombinedGenericMotionEventSources & eventSourceWithoutClass) != 0; } // Disable SOURCE_TOUCHSCREEN generic event interception if any service is performing // touch exploration. if (event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN) && (mEnabledFeatures & FLAG_FEATURE_TOUCH_EXPLORATION) != 0) { return false; } final int eventSourceWithoutClass = event.getSource() & ~InputDevice.SOURCE_CLASS_MASK; return (mCombinedGenericMotionEventSources & eventSourceWithoutClass) != 0; } private boolean anyServiceWantsToObserveMotionEvent(MotionEvent event) { if (Flags.alwaysAllowObservingTouchEvents()) { final int eventSourceWithoutClass = event.getSource() & ~InputDevice.SOURCE_CLASS_MASK; return (mCombinedMotionEventObservedSources & eventSourceWithoutClass) != 0; } // Disable SOURCE_TOUCHSCREEN generic event interception if any service is performing // touch exploration. if (event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN) && (mEnabledFeatures & FLAG_FEATURE_TOUCH_EXPLORATION) != 0) { return false; } final int eventSourceWithoutClass = event.getSource() & ~InputDevice.SOURCE_CLASS_MASK; return (mCombinedGenericMotionEventSources & mCombinedMotionEventObservedSources & eventSourceWithoutClass) != 0; } private boolean canShareGenericTouchEvent() { if ((mCombinedMotionEventObservedSources & InputDevice.SOURCE_TOUCHSCREEN) != 0) { Loading Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java +3 −26 Original line number Diff line number Diff line Loading @@ -1180,7 +1180,6 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo } private boolean anyServiceWantsGenericMotionEvent(MotionEvent event) { if (Flags.alwaysAllowObservingTouchEvents()) { final boolean isTouchEvent = event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN); if (isTouchEvent && !canShareGenericTouchEvent()) { return false; Loading @@ -1188,33 +1187,11 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo final int eventSourceWithoutClass = event.getSource() & ~InputDevice.SOURCE_CLASS_MASK; return (mCombinedGenericMotionEventSources & eventSourceWithoutClass) != 0; } // Disable SOURCE_TOUCHSCREEN generic event interception if any service is performing // touch exploration. if (event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN) && (mEnabledFeatures & FLAG_FEATURE_TOUCH_EXPLORATION) != 0) { return false; } final int eventSourceWithoutClass = event.getSource() & ~InputDevice.SOURCE_CLASS_MASK; return (mCombinedGenericMotionEventSources & eventSourceWithoutClass) != 0; } private boolean anyServiceWantsToObserveMotionEvent(MotionEvent event) { if (Flags.alwaysAllowObservingTouchEvents()) { final int eventSourceWithoutClass = event.getSource() & ~InputDevice.SOURCE_CLASS_MASK; return (mCombinedMotionEventObservedSources & eventSourceWithoutClass) != 0; } // Disable SOURCE_TOUCHSCREEN generic event interception if any service is performing // touch exploration. if (event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN) && (mEnabledFeatures & FLAG_FEATURE_TOUCH_EXPLORATION) != 0) { return false; } final int eventSourceWithoutClass = event.getSource() & ~InputDevice.SOURCE_CLASS_MASK; return (mCombinedGenericMotionEventSources & mCombinedMotionEventObservedSources & eventSourceWithoutClass) != 0; } private boolean canShareGenericTouchEvent() { if ((mCombinedMotionEventObservedSources & InputDevice.SOURCE_TOUCHSCREEN) != 0) { Loading