History log of /frameworks/base/libs/androidfw/tests/AttributeFinder_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5dce5e67dbdcd14882edf3f64fba671c77577ee4 10-Dec-2014 Adam Lesinski <adamlesinski@google.com> Fix issue where non-resource attributes would cause obtainStyleAttributes to fail

A sentinal value of 0x00000000 was used to mark the first time an AttributeFinder
was used. If the resource ID of an attribute was also 0x00000000 (which occurs with
non-resource attributes, like 'style'), then it would be mistaken as the sentinel
start value.

Change-Id: I4be353e0f8c940cb6f262d155129f048dcc444ae
a7d1d73a477fe512d9ea69ee2883084630ec24c4 02-Oct-2014 Adam Lesinski <adamlesinski@google.com> Implement back-tracking when searching for attributes in XML or resource bag

Shared libraries have their package ID assigned at run-time, so some
of the guarantees we used to have about sort order of attributes in
bags or XML elements no longer hold.

This CL adds back-tracking and can jump to the nearest attribute with the
same package ID and continue searching.

This means that attributes with the same package ID must be sorted by increasing
resource ID, as was the case before.

Attributes with the same package ID must be grouped together, but the groups can
be in any order. Ex: 0x02010001, 0x02010002, 0x01010000, 0x01010010, 0x7f010032

Change-Id: I9c198bbb6ca788849aac85b6323606ea5d9550d6