Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c01bcf2 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent a21b506c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment