Skip to content
Commit 3c0078e8 authored by Darryl L Johnson's avatar Darryl L Johnson
Browse files

Don't override config of display contexts with activity display.

This change migrates the previous usages of
ResourcesManager#getResources() from using the display id of expected
resources to an override display ID which will override the display
properties from the parent token resources. This ensures that all
contexts derived from a display context keep the overrides for their
intended display.

This also changes the meaning of ResourcesKey#mOverrideConfiguration and
ResourcesKey#mDisplayId. Previously mDisplayId was used as both the
current display of the ResourcesKey and used to apply overrides
to mOverrideConfiguration. This made it unclear whether a particular key
should keep its display override when an activity changes display or
whether it should inherit the new display from the activity. Now the
display IDs and overrides are managed by the ActivityResources struct and the
ResourcesKey is expected to only contain the final display ID expected
for the resources in 'mDisplayId' and the final configuration that should
be applied to the global configuration in 'mOverrideConfiguration'.

Fixes: 153866583
Fixes: 156758475
Fixes: 163813210
Fixes: 163812902
Fixes: 163813227

Test: ActivityThreadTest
Test: ResourcesManagerTest
Test: AppConfigurationTests#testActivityContextDerivedDisplayContextOrientationWhenRotating

Change-Id: If93f98f93ee15b27d8c7292a2f830c2cc0f49277
parent 60f5ff4f
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