summaryrefslogtreecommitdiff
path: root/libs/androidfw/ResourceTimer.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2022-10-26 18:42:22 +0800
committer Riddle Hsu <riddlehsu@google.com> 2022-11-02 16:21:26 +0800
commit286bf02f2f93c28159c1317a4c65312e34fdb306 (patch)
tree8b928a106908dee235f0f7566b55e1e8b8e02c20 /libs/androidfw/ResourceTimer.cpp
parent8a283d04f02dc11e41e795b50b194b3fc2f7f382 (diff)
Simplify the association of shared starting window
The issue case is launching an existing embedded activity with clear-task and then a new activity is started in a new task fragment. E.g. resume left panel -> finish right panel -> create right panel. And the transition starts until the right panel is drawn instead of the drawn starting window. That would feel a noticeable delay. This is mainly for showing starting window on a task with embedded activities, but also generalizes the common cases. 1. Move mSharedStartingData from ActivityRecord to Task. So if there is a new embedded activity launched in the task, it doesn't need to take care whether/when to assign the field. And no need to traverse all embedded activities in the task to make sure the shared starting data is up to date. 2. Move startingDisplayed from ActivityRecord to StartingData. The state of flag startingDisplayed is covered by the lifetime of StartingData. So it no longer needs to reset the flag. This also provides the ability to know whether the starting window is drawn or not without based on an activity or window. With above changes, any activity without owned starting window can know if the shared starting window is ready to execute transition. Also use a non-empty reference activity in createRemoteAnimationTarget, so the OPENING transition animation won't be skipped (the right panel is the top non-finishing activity but it hasn't a child window yet). Bug: 255688302 Test: atest ActivityRecordTests#testStartingWindowInTaskFragment Change-Id: I7adeed8801ea3a837afa3d46f1975cf6c5b3f99a
Diffstat (limited to 'libs/androidfw/ResourceTimer.cpp')
0 files changed, 0 insertions, 0 deletions