Add window layout affinity.
Window layout affinity is used to combine launch params records for activities from the same UID that have the same value. I didn't choose to replace component name as the key to launch params map by window layout affinity because keeping both has some good traits when app is updated with some window layout affinity changes: 1) The record with component name is still updated even if it starts to have a window layout affinity so we don't have to worry about the orphaned record; 2) Activity that changes/loses window layout affinity can always use the last launch param that activity saves, instead of starting from default launch behavior again; 3) App removal can still naturally clean up all useless records. Those come at a cost that we need to iterate all activities in the same window layout affinity when getting the launch params, but it's OK because it's not very common to have specific task affinities and in cases where they do the number of activities sharing the same task affinities is limited. Bug: 146015757 Test: Manual test that 2 activities in a single test app shares the same launch params record. Test: atest LaunchParamsPersisterTests Change-Id: Idb2e7509c6bdf22ac6c9cf41059e9c696419028b
Loading
Please register or sign in to comment