Override process config to match activity config
Some apps use Application context to get display configuration and metrics for their activities. This leads to incorrect configuration used for activities on secondary screens. This is an issue on the application side, but the framework can provide some compatibility - override process-level config to match the display where the first activity was launched. This CL makes the process follow the activity configuration. For simplicity, it will always follow the configuration of the activity that was last added to the process. Additional optimizations might be added in future. This CL also adds new merged override configuration listener interface to report the combined config overrides from the current node and its parents. This is necessary for cases like sending a config override to WindowProcessController, when the subscriber is interested in a complete override vs the override on the current level of the hierarchy. E.g. when an Activity is registered as a config override provider for WPC, then we should also send the overrides from Task, Stack and Display levels. Bug: 131179060 Bug: 132986140 Bug: 131915789 Test: atest WmTests:ActivityRecordTests#testSetProcessOverridesConfig Test: Launch GMail on secondary screen Change-Id: I5c4342646858a77aeebc274265aab41dc753fbca
Loading
Please register or sign in to comment