History log of /frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5c33fb5408d6c02dc2c73f53d89d1494fe04f208 09-Aug-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Change XmlDom to exclude Namespace as a node

In preparation for exporting an XML proto format for UAM to consume,
this change brings the XML DOM API more in line with other APIs that
do not make the Namespace a separate node.

Treating Namespace declarations as just properties of an Element
node makes the implementation of algorithms much simpler, as
the constraints that Namespace nodes have only one child
are now built in and traversing to find Element nodes
is much simpler.

Also made a bunch of quality of life improvements, like formatting and
comment style.

Test: make aapt2_tests
Bug: 65645766
Change-Id: Ib97ff1c4252b7907e2cc1f13a448dc4ca3b809a4
Merged-In: Ib97ff1c4252b7907e2cc1f13a448dc4ca3b809a4
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
a45893a5c51cc26f1fd63ec1aa4c39f55911c85b 31-May-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Clean up tests a bit

Since the latest gtest has fixed support for
explicit bool operators, remvoe AAPT_ASSERT_* and AAPT_EXPECT_*.

Also switch to use NotNull() matchers, which are more legible.

Test: make aapt2_tests
Change-Id: Idce199ca9d567d70f7aae275fee15e04bb914c9e
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
c744ae8aca97edfb2422598ea620e8219449fa9b 18-May-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Implement attribute compat versioning

This change defines some hardcoded rules to degrade
attributes in newer SDKs to specific older attributes.

An attribute with a degrade rule will generate a new XML for the API
in which the attribute resulting from the degradation was introduced.

Since API 22 (Lollipop MR1), attributes are correctly ignored and do
not need to be versioned. In XML files defined for APIs 22+, the
original and degraded attributes coexist in the same XML file.

One such example is paddingHorizontal, introduced in API 26.
paddingHorizontal degrades to paddingLeft and paddingRight, which
were both introduced in API 1.

Bug: 35763493
Test: make aapt2_tests
Change-Id: I4aa8755a9ee2c0cc5afdc55c3d30093fd3a47f3d
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
48448e8a310e72eb2846ad0f86672ce4f0b47e47 27-Apr-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix string escaping

We were processing escaped strings too early, before
parsing of values into types. Now the escaped strings get
processed when they are being flattened.

Bug: 37715376
Test: make aapt2_tests
Change-Id: Ic59aa2e3a20c40756c219752ff74b2a4f8a602ba
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
38665547bb10f65f72d3358fb16cdc63d5febf15 28-Dec-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Treat non-AAPT attributes as Attributes with no format specified.

Attributes in XML like "class" should be treated as attributes with no
format specified. That means that something like 'version="1"' will
be interpreted as an Integer value instead of as a string.

This is more in line with the old AAPT behaviour.
Bug: 30763349
Test: make libaapt2_tests

Change-Id: I02fe41617e3c62c354714056198ef480d62afee7
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
ce5e56e243d262a9b65459c3bd0bb9eaadd40628 22-Oct-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Rename to match new style

Use Google3 naming style to match new
projects' and open source google projects' style.

Preferred to do this in a massive CL so as to avoid
style inconsistencies that plague legacy code bases.
This is a relatively NEW code base, may as well keep
it up to date.

Test: name/style refactor - existing tests pass
Change-Id: Ie80ecb78d46ec53efdfca2336bb57d96cbb7fb87
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
cacb28f2d60858106e2819cc7d95a65e8bda890b 19-Oct-2016 Adam Lesinski <adamlesinski@google.com> Use Google3 style guide with .clang-format

Test: style change only, builds ok
Change-Id: I885180e24cb2e7b58cfb4967c3bcb40058ce4078
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
58a20a6482a56a262fd83a617482641e3a981db1 26-Jul-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Change accepted notation for resource names in tests

Previously the way to name resources in tests was to use reference
notation (@[package:][type/]name). Now we use name notation (no @).

Change-Id: I68f0a36562d89cc78c582d128f370d9556c58707
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
d0f116b619feede0cfdb647157ce5ab4d50a1c46 09-Jul-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Remove usage of u16string

For legacy reasons, we kept around the use of UTF-16 internally
in AAPT2. We don't need this and this CL removes all instances of
std::u16string and StringPiece16. The only places still needed
are when interacting with the ResTable APIs that only operate in
UTF16.

Change-Id: I492475b84bb9014fa13bf992cff447ee7a5fe588
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
64587af8179affd38ee26543b748f2d63b7f67bb 19-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Support building, linking, and merging static libraries

Android static libraries are like APKs but they contain much more debugging
and source information. We need to treat them differently in 3 ways:

1) When building a static library, we skip things like ID assignment and
product/config stripping. Source information is emitted as well.
2) When building a static library and linking against another
static library, we don't want to merge, we want to simply reference.
3) When building an app that uses static libraries, we want to merge
the static library under the same package with or without mangling.

Bug:25958912
Change-Id: I425e032857936a3e83173c1edc2a6cdc6020b842
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
467f171315f9c2037fcd3eb5edcfabc40671bf7b 17-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Fail compiling when private symbols are referenced

Also moved some XML specific stuff into its own directory,
and refactored ReferenceLinker a bit.

Change-Id: I912247a82023c1bbf72dc191fbdaf62858cbec0c
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp
1ab598f46c3ff520a67f9d80194847741f3467ab 14-Aug-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Separate out the various steps

An early refactor. Some ideas became clearer as
development continued. Now the various phases are much
clearer and more easily reusable.

Also added a ton of tests!

Change-Id: Ic8f0a70c8222370352e63533b329c40457c0903e
/frameworks/base/tools/aapt2/link/XmlReferenceLinker_test.cpp