Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit dbd60043 authored by Josh Yang's avatar Josh Yang
Browse files

Allow focused window to override stem primary key.

This change hooks StemPrimaryKeyRule to DeferredKeyActionExecutor so
that stem primary key events get deferred until the focused app doesn't
handle the DOWN key event.

Several key points of this change:

1. Only send stem primary key events to apps with permission
   OVERRIDE_SYSTEM_KEY_BEHAVIOR_IN_FOCUSED_WINDOW.
2. We also need to send KEYCODE_STEM_PRIMARY to status bar only if it's
   not handled by the app.
3. We want to make sure the triple-press accessibility gesture always
   get triggered regardless of if the gesture is consumed by app.

Bug: 308482931
Test: atest WmTests:StemKeyGestureTests
      manually tested using a test app
Change-Id: I84791ca71416ec6c5d2f1c603c647031c76e059b
parent 78502b2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment