When a resource does not have a default config value defined, and the
resource only has config values defined for language translations, that
resource should be removed; however, if the resource also contains a
density specific config value, the resource should not be removed.
This is because a density specific value should have the same content as
what the default value would have, just higher or lower quality.
Bug: 76413048
Test: aapt2_tests
Change-Id: I52fe37a7aa3aefb694d3af6c8adfd6269fa26f54
According to our docs:
https://developer.android.com/guide/topics/resources/localization.html#defaults-r-important
Some resources *require* that there is a default definition. So far,
the pain is felt when doing translations for strings that have been
renamed, etc.
This CL strips out resources that don't have a default value and define
a resource for a locale. This is conservative, but should be expanded
to other configuration properties moving forward.
Bug: 36572857
Test: make aapt2_tests
Change-Id: Ife94a1f8a2ee221f8532ffa856541a9c8c4e7143