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
Loading
Please register or sign in to comment