Skip to content

Commit

Permalink
docs: add comment explaining why the key event relay service is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
sds100 committed Jun 25, 2024
1 parent 3f17f3f commit 7c43679
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ import android.view.KeyEvent
import timber.log.Timber

/**
* Created by sds100 on 30/01/2022.
* This service is used as a relay between the accessibility service and input method service to pass
* key events back and forth. A separate service has to be used because you can't bind to an
* accessibility service. The input method service sends key events to this service by calling
* onKeyEvent(), and the accessibility service registers with the callback to receive the
* key events being sent.
*
* This was implemented in issue #850 for the action to answer phone calls because Android doesn't
* pass volume down key events to the accessibility service when the phone is ringing or it is
* in a phone call.
*/
class KeyEventReceiver : Service() {

Expand Down

0 comments on commit 7c43679

Please sign in to comment.