summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author Kazuki Takise <takise@google.com> 2022-10-20 13:27:41 +0900
committer Kazuki Takise <takise@google.com> 2022-11-11 12:16:04 +0000
commitb131a1ed37e270382df1e3907457c5e80c7cad54 (patch)
tree119d92924048c7c0ce44fb19f71c6f1b13d54831 /libs/androidfw/misc.cpp
parent2e38249906b5b1b696836eff7cb869d770c33e6a (diff)
Shift focus when a task with multiple activities gets removed
When ActivityTaskManager#removeTask is called for a task with multiple activities in a freeform environment, no activity in other tasks gets resumed, the corresponding transition doesn't run, and it times out. This doesn't happen in fullscreen environments becaue the tasks behind get visible when the top task is removed and one of them gets resumed on another code path. If a task has only one activity in a freeform environment, when the top activity is removed, there's no activity left, so adjustFocusToNextFocusableTask() is called in finishIfPossible() and the corresponding app transition will be eventually run. However, if there are multiple activities, when the top activity is removed, currently finishIfPossible() believes that there are some other activities left in the task although they will be removed just after this. This CL fixes this by reverse the order of removing activities in ActivityTaskManager#removeTask(). This way, at the point the top activity is removed, all the other activities have been gone and adjustFocusToNextFocusableTask() is called properly. Bug: 249658397 Test: WM CTS Change-Id: I769208a7c90a8e82e4bb4c4168f19bca3cf3507e
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions