Move display to top in beforeQueueuing synchronously
When a key targeting a non-focused display is processed, run the 'moveDisplayToTop' synchronously to ensure that setInputWindows with the correct window focus information is completed. For the upcoming focus change, this would ensure that the focus event is enqueued before the key event. The function interceptKeyBeforeQueueing is called into policy without the dispatcher lock held. Currently, we are already holding up the input dispatcher processing when interceptKeyBeforeDispatching is called. The current change is temporary, and several improvements can be made to fix the synchronous nature: 1) Make per-display focus permanently enabled This would allow us to simply get rid of this code block 2) Switch focused display inside input, and move display to top asynchronously. This would mean that the config "per-display-focus" is processed in input, while the windowmanager only adjusts the relative heights, and determines whether activities are resumed or paused. This would also mean that it would now be possible for a window to have focus while an activity is paused. Bug: 70668286 Test: atest WindowFocusTests Change-Id: Id1cfd913babf1a170aeb1045789ceb3f5b8df465
Loading
Please register or sign in to comment