OSDN Git Service

AAPT2: Support id reference chaining from AAPT
authory <rtmitchell@google.com>
Wed, 18 Apr 2018 18:29:09 +0000 (11:29 -0700)
committery <rtmitchell@google.com>
Wed, 18 Apr 2018 18:46:53 +0000 (11:46 -0700)
commit9efbbef2e060cd5e05f5b652ba5c7aaf687f64d6
treea906595eedebc28b14a4e86e135b225eb1d5d79b
parent34a0b18a5c730e4fa16e27c63ed0cd79a6df188e
AAPT2: Support id reference chaining from AAPT

AAPT would allow for ids to be declared in the form:

<item name="name" type="id>@id/other</item>

@id/name should hold a reference to @id/other. When
getResources().getValue() is called on R.id.name with resolveRefs
enabled, the resuling reference should be R.id.other.

Bug: 69445910
Test: Created tests for correct parsing of id references and correct
resolving of deep references

Change-Id: Id1feb37b2565c213dc6a19b4c401906260d7fc14
libs/androidfw/tests/AssetManager2_test.cpp
libs/androidfw/tests/data/basic/basic.apk
libs/androidfw/tests/data/basic/res/values/values.xml
tools/aapt2/ResourceParser.cpp
tools/aapt2/ResourceParser_test.cpp