Fix ATMS#focusTopTask set to PiP task even the activity is not focusable
When swiping up to the overview from the split-screen task with showing IME and PiP, normally the WM shell enables the recents input consumer to call ATM#focusTopTask, and it should choose home (or recents) task as the focus app, but the issue case will find PiP as the top task, even the PiP activity was not focusable, this affects InputMonitor ends up missing to apply dismissing IME logic because the current focus app is not the home (or recents) task. As a result, uses isTopActivityFocusable in focusTopTask to align with the PiP activity focusable check to ensure PiP task won't be selected by focusTopTask. Fix: 285218009 Test: atest ActivityTaskManagerServiceTests#testFocusTopTask Test: manual as issue steps: 1) start 2 apps to enter split-screen mode (e.g Settings & Message) 2) start Youtube app to enter PiP mode 3) tap Settings's editor to show IME 4) swiping up to the overview 5) expect IME should be dismissed after entering to the overview. Change-Id: Ib48a24a0024fa0e28079c90dd5388ae8a6b39581
Loading
Please register or sign in to comment