Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a95bd4a8 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Attempt to use snapshot starting window for task trampoline

When launching a singleTask activity, it may find an existing
task to add. If the app uses it as trampoline/splash activity
(finished after redirecting to main), then it will still be
created every time.

For example: (A and B are in the same task)
First launch: Launch A from launcher, A starts B, A finished.
Second launch: Launch A from launcher, A finished, resume B.

Because it satisfies task-switch and activity-creation, by
default there will be a splash screen activity. But because the
new activity will finish itself immediately, it may be weird to
see the splash screen starting window at the second launch.

This approach infers that if the launching activity is the one
that started the task with other existing activities, it is
usually a temporal trampoline activity. So if the original top
activity of the task matches the existing snapshot, then use
snapshot starting window to make the visual result more continuous.

Bug: 229959739
Test: Second launch an app which declares singleTask for its
      trampoline and main activity. There should not show a
      splash screen starting window.
Change-Id: Ib0a39545e5b354fdb61d1cc0cb259900dba35a12
parent 9736fb2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment