summaryrefslogtreecommitdiff
path: root/tests/SystemUIDemoModeController
diff options
context:
space:
mode:
author Evan Rosky <erosky@google.com> 2023-02-18 19:39:50 -0800
committer Evan Rosky <erosky@google.com> 2023-02-21 23:44:09 +0000
commitfdfb944f3116a3874ee0a5ce845e6799396accbb (patch)
tree23a3f04accb8916052ae05816573df1e5671f0b8 /tests/SystemUIDemoModeController
parent62190cc28c31db40e90b389db0643bb710c89aef (diff)
Fix multi-activity pip flickers
The flicker on enter is a simple fix, the original pip task wasn't collected so it's surface hide wasn't part of the sync transaction. Just collect it to solve that. For disappearing in overview, the problem is more subtle: With shell-transitions, pip-entry happens at the end of the transient-launch transition. This means the pipping activity is starting off behind the home task. With multi-activity, a new task is created to host the pip, but it is placed on TOP, so when we reparent the pip activity into it, because it is going from visibleRequested=false to visReq=true, it triggers focus logic with in-turn triggers RecentTasks logic. Because it is a temporary task, RecentTasks gets confused and marks the pip's original task as hidden. This then triggers removal on idle which in-turn removes the pip activity since it's really part of the original task. To fix this, we set the windowing-mode of the new (temporary) task to PINNED *before* reparenting the activity into it. That way it doesn't try to grab focus. Also, to make things clearer, this re-arranges some things: multi-activity pip-task doesn't have fragments, so moved the fragment code into the singleActivity case so its more obvious that this is the case. Did the same thing with "reparent to activity TDA" because the new task is created there already. Also made the temporary task match the original task's override windowing mode (instead of UNDEFINED), otherwise it can create flickers when pipping from a task in a different mode from the display. Bug: 269910373 Test: open multi-activity pip app, then swipe to home. Change-Id: I9e1b36b47e7de331db2fcea3d1b1b6cfd2d34a26
Diffstat (limited to 'tests/SystemUIDemoModeController')
0 files changed, 0 insertions, 0 deletions