diff options
| author | Ryan Mitchell <rtmitchell@google.com> | 2019-05-28 16:30:17 -0700 |
|---|---|---|
| committer | Ryan Mitchell <rtmitchell@google.com> | 2019-05-28 23:44:13 +0000 |
| commit | fc3874ac821b63b07fef089667e4afe3c4528aa5 (patch) | |
| tree | ff2656b1b6d69ed6d4cdd4065c75581d92471fda /docs/html/sdk/api_diff/4/changes | |
| parent | 9c6483c1eb24e90c86fdc200b1f0bfd97cde2669 (diff) | |
Empty attribute values in styles should be strings
In aapt1, if you specified the value of an attribute in a style as an
empty string (eg. <item name="my_attr"></item>), the encoded value would
be an empty string. In aapt2 currently, @null is encoded instead. This
change restores aapt1 behavior. Use @null explicitly if the desired
value is to be @null.
Bug: 133450400
Test: manual comparison of APK created by aapt1 and aapt2
<attr name="my_attr" format="string|reference" />
<style name="MyName">
<item name="my_attr"></item>
</style>
$ aapt p -M AndroidManifest.xml -F out1.apk -S res -f
$ aapt2 compile --dir res-o compiled.flata
$ aapt2 link --manifest AndroidManifest.xml -o out2.apk compiled.flata
$ aapt2 dump out2.apk
Change-Id: I8aa0ba30379dac0b1229da525abbc5482f40114b
Diffstat (limited to 'docs/html/sdk/api_diff/4/changes')
0 files changed, 0 insertions, 0 deletions
