3 Commits

Author SHA1 Message Date
Mårten Kongstad
24c9aa6541 libandroidfw: move ConfigDescription from aapt2 to libandroidfw
This is to allow idmap2 to access ConfigDescription.

Test: libandroidfw_tests
Test: aapt2_tests
Change-Id: I54210bbbd8dad5903cb7100807df977efa394ad5
2018-10-08 06:50:22 -07:00
Ryan Mitchell
a593605dfa AAPT2: Accept density config as default
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
2018-05-24 09:46:33 -07:00
Adam Lesinski
34a1687a67 AAPT2: Remove resources that define locales but no default values.
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
2018-03-01 11:18:23 -08:00