ApplicationPackageManager: use display aware Configuration for Resources
When calling getResourcesForApplication from an external display, the
returned Resources should have the same Configuration as the Resources
provided by the Context associated with the Display.
If we don't specify the specific Configuration, the Configuration from
the default display will be used, which may lead to wrong qualifiers
being used, due to different display dimensions.
Test: Unable to add unit test, as it is not possible to instantiate
ApplicationPackageManager with ContextImpl in tests.
Test: Connect an external display with different dimensions to the
default display, and see that the system status bar icons display
correctly.
Bug: 420905041
Flag: com.android.graphics.flags.use_resources_from_context_to_create_drawable_icons
Change-Id: I51e935971a8b67b20f17d8807bb2dfc66292c9fa
2 files changed