Update window configuration for reused ResourcesImpl
This aligns the same behavior as if a new ResourcesImpl is created
for a override configuration with different WindowConfiguration:
The resource configuration has the values as override configuration.
The update of windowConfiguration is needed because
Display#getRotation() reads the rotation from WindowConfiguration#
getDisplayRotation() in resource configuration.
The case may happen when display rotates 180 degree that there is
no size change (all public fields of Configuration are the same) but
only the rotation in WindowConfiguration.
Bug: 413273054
Flag: android.content.res.ignore_non_public_config_diff_for_resources_key
Test: atest FrameworksCoreTests:ResourcesManagerTest# \
testUpdateResourcesForActivityUpdateWindowConfiguration
Test: atest AttachedSurfaceControlTest# \
testOnBufferTransformHintChangesFromLandToSea
Change-Id: Iad35be1c9a6dc9517b9a8febae36e67349f70163
Loading
Please register or sign in to comment