Reduce unnecessary creation of ResourcesImpl for position change
When the position of an activity is changed (e.g. moving a freeform
window), only the bounds in Configuration#windowConfiguration is
changed. The case shouldn't need to create a new ResourcesImpl
because AssetManager#setConfiguration doesn't care that.
But if ResourcesKey#equals uses Configuration#equals that compares
WindowConfiguration, it will cause ResourcesManager's
findResourcesImplForKeyLocked to not find a reusable instance.
Note that Configuration#hashCode also excludes WindowConfiguration.
Bug: 413273054
Flag: android.content.res.ignore_non_public_config_diff_for_resources_key
Test: atest FrameworksCoreTests:ResourcesManagerTest# \
testNonPublicDiffOverrideConfigShareImpl
Change-Id: I98fa1a9190456f83503bf6276647b9aec3bf901a
Loading
Please register or sign in to comment