Do not intercept Back Key Event with FLAG_PRE_IME_ONLY in NativePreIme stage
If the Back Key Event has the FLAG_PRE_IME_ONLY set, it should not be intercepted at the NativePreIme stage. Instead, the event is solely intended for the ViewPreImeInputStage to give apps the chance to intercept the back event before the predictive IME back animation commits. Without this change, we would send back events to the active animation callback in some cases (in `doOnBackKeyEvent`) even though the back key event was just injected by WindowOnBackInvokedDispatcher to give the app the chance to intercept it. Bug: 341013064 Flag: android.view.inputmethod.predictive_back_ime Test: Manual, i.e. verifying that no callback methods are called by ViewRootImpl on animation callback during pre-ime handling of injected back key event Change-Id: Icd8a1ff3117f0acb668e4c05c5e353cd8847047c
Loading
Please register or sign in to comment