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

Skip to content
Commit c4c8aadf authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Fix onKeyPreIme not called when enableOnBackInvokedCallback=false

Currently, IME callbacks are registered regardless of enableOnBackInvokedCallback being false. That causes the whole logic of onKeyPreIme in ViewRootImpl to be skipped entirely, because back events are directly dispatched to the IME callback. Instead, we should not register the IME callback if the app has not set enableOnBackInvokedCallback=true. In that case, back events will be dispatched to the compat-callback from ViewRoot which will inject BACK_KEY events which are piped through the usual key handling (including onKeyPreIme).

Bug: 336470108
Flag: NONE
Test: atest FrameworksCoreTests:WindowOnBackInvokedDispatcherTest
Test: Manual, i.e. verifying that onKeyPreIme is called when enableOnBackInvokedCallback=false
Change-Id: I8222cbc94ec25a366ced1139e3f99831114efbd5
parent 02aea3b1
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