Loading services/accessibility/accessibility.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,16 @@ flag { bug: "198018180" } flag { name: "do_not_reset_key_event_state" namespace: "accessibility" description: "Don't reset the event stream state when receiving an event without policy flag FLAG_PASS_TO_USER. Just pass it through the pipeline." bug: "331900630" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enable_a11y_checker_logging" namespace: "accessibility" Loading services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java +13 −2 Original line number Diff line number Diff line Loading @@ -347,8 +347,13 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo final int eventSource = event.getSource(); final int displayId = event.getDisplayId(); if ((policyFlags & WindowManagerPolicy.FLAG_PASS_TO_USER) == 0) { if (!Flags.doNotResetKeyEventState()) { state.reset(); clearEventStreamHandler(displayId, eventSource); } if (DEBUG) { Slog.d(TAG, "Not processing event " + event); } super.onInputEvent(event, policyFlags); return; } Loading Loading @@ -503,9 +508,15 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo private void processKeyEvent(EventStreamState state, KeyEvent event, int policyFlags) { if (!state.shouldProcessKeyEvent(event)) { if (DEBUG) { Slog.d(TAG, "processKeyEvent: not processing: " + event); } super.onInputEvent(event, policyFlags); return; } if (DEBUG) { Slog.d(TAG, "processKeyEvent: " + event); } // Since the display id of KeyEvent always would be -1 and there is only one // KeyboardInterceptor for all display, pass KeyEvent to the mEventHandler of // DEFAULT_DISPLAY to handle. Loading Loading
services/accessibility/accessibility.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,16 @@ flag { bug: "198018180" } flag { name: "do_not_reset_key_event_state" namespace: "accessibility" description: "Don't reset the event stream state when receiving an event without policy flag FLAG_PASS_TO_USER. Just pass it through the pipeline." bug: "331900630" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enable_a11y_checker_logging" namespace: "accessibility" Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java +13 −2 Original line number Diff line number Diff line Loading @@ -347,8 +347,13 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo final int eventSource = event.getSource(); final int displayId = event.getDisplayId(); if ((policyFlags & WindowManagerPolicy.FLAG_PASS_TO_USER) == 0) { if (!Flags.doNotResetKeyEventState()) { state.reset(); clearEventStreamHandler(displayId, eventSource); } if (DEBUG) { Slog.d(TAG, "Not processing event " + event); } super.onInputEvent(event, policyFlags); return; } Loading Loading @@ -503,9 +508,15 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo private void processKeyEvent(EventStreamState state, KeyEvent event, int policyFlags) { if (!state.shouldProcessKeyEvent(event)) { if (DEBUG) { Slog.d(TAG, "processKeyEvent: not processing: " + event); } super.onInputEvent(event, policyFlags); return; } if (DEBUG) { Slog.d(TAG, "processKeyEvent: " + event); } // Since the display id of KeyEvent always would be -1 and there is only one // KeyboardInterceptor for all display, pass KeyEvent to the mEventHandler of // DEFAULT_DISPLAY to handle. Loading