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

Skip to content
Commit 4abc8285 authored by Donald Chai's avatar Donald Chai
Browse files

Fix deserialization of @id aliases

I didn't realize that this was actually a thing, but:

  <resources>
    <item name="id1" type="id"></item>
    <item name="id2" type="id">@id/id1</item>
  </resources>

leads to a resource table which 'aapt dump resources' will render as:

    resource 0x7f030000 com.pkg:id/id1: t=0x03 d=0x00000001 (s=0x0008 r=0x00)
    resource 0x7f030001 com.pkg:id/id2: t=0x01 d=0x7f030000 (s=0x0008 r=0x00)

while 'aapt2 dump resources' printed:

  type id id=03 entryCount=2
    resource 0x7f030000 id/id1
      () (id)
    resource 0x7f030001 id/id2
      () (id)

After this change, it prints:

  type id id=03 entryCount=2
    resource 0x7f030000 id/id1
      () (id)
    resource 0x7f030001 id/id2
      () @id/id1

Bug: 69445910
Change-Id: I0001ff09345434577ac4c1d32f96a781f4190d8d
Tested: manual, see above
parent d406123c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment