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

Skip to content
Commit 9c906fbc authored by Shivam Agrawal's avatar Shivam Agrawal
Browse files

Include Activities That Have Not Been Assigned...

...to a Process Yet in TaskFragmentInfo

TaskFragmentInfo might be reported before an activity
has been assigned to a process, which would prevent
the activity from being reported in the TaskFragmentInfo
activities array because the activity process id does
not match the TaskFragmentOrganizer process id. However,
the activity is still reported in the running activity
count and makes the TaskFragment non-empty.

This discrepency results in unnecessary split info
callbacks because the change in TaskFragmentInfo#isEmpty
or runningActivityCount triggers an onTaskFragmentInfoChanged
callback in SplitController, which triggers a split info
callback. However, this split info callback will soon be stale
information because once the activity has been attached to a
process, the activity lifecycle listener in SplitController
will send a split info callback.

This CL uses a combination of uid and process name to check
that the activity belongs to the TaskFragmentOrganizer process
instead of the process id. uid and process name are set
during activity creation whereas pid is set afterwards, which
causes the discrepency.

Bug: b/204193051 b/205240942 b/204721225 b/204405410
Test: atest CtsWindowManagerJetpackTestCases:ActivityEmbeddingLaunchTests
Change-Id: Icfa28325da0278d2fb70e1111ffd39412b370bdb
parent d6cf8c85
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