OSDN Git Service

Deliver key events to the system if no accessibility service handles them.
authorSvetoslav <svetoslavganov@google.com>
Fri, 26 Apr 2013 20:11:11 +0000 (13:11 -0700)
committerSvetoslav <svetoslavganov@google.com>
Fri, 26 Apr 2013 20:58:09 +0000 (13:58 -0700)
commitca523d6e95061f99455589512100839118044d43
tree2e07e34a660730362dcf01cc2ce08bfddcd4e06b
parent5866570947a7ef325f74d9dbfc1ccbdd02d3e7b6
Deliver key events to the system if no accessibility service handles them.

We have APIs that allow an accessibility service to filter key events. The
service has to declare the capability to toggle event filtering in its
manifest and then it can set a flag to toggle the feature at runtime. The
problem was that even if no accessibility service was handling key events
these events were not fed back to the input system.

This change adds a new feature flag in the accessibility input filter that
is set only if at least one service can and wants to filter key events. If
the feature flag is set then the filter will deliver events to services and
,if they are not handled, to the system. This change also cleaned the logic
for updating the input filter.

bug:8713422

Change-Id: I4bc0c1348676569d1b76e9024708d1ed43ceb26a
services/java/com/android/server/accessibility/AccessibilityInputFilter.java
services/java/com/android/server/accessibility/AccessibilityManagerService.java