History log of /frameworks/base/libs/androidfw/tests/data/styles/R.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
57cd195c4303ff248c6e016d51e3b7632cf69bae 12-Apr-2018 y <rtmitchell@google.com> AAPT2: GetBag infinite recursion fix

Style resources with circular parental dependencies caused infinite
recursion when calling AssetManager2::GetBag. This fix allows recursion
to cease when a circular dependency is found.

Bug: 77928512
Change-Id: Ib900c36ab1aef5da5b03234a9484c4dad3b63c02
Test: Manual test of b/77928512 and duplicates of 74493983
/frameworks/base/libs/androidfw/tests/data/styles/R.h
32e7501a27f0f19bccdf9e91f9b87869c093f695 10-May-2017 Adam Lesinski <adamlesinski@google.com> Fix support for @empty in style resolution

If @empty is encountered in XML, do not fallback
to searching through the theme.

Bug: 36891052
Test: make aapt2_tests
Test: bit CtsContentTestCases:android.content.res.cts.TypedArrayTest
Change-Id: Ie3bf7b70af9c7913513a1092afd95d26bec5e635
/frameworks/base/libs/androidfw/tests/data/styles/R.h
7ad1110ecd6a840fcd2895c62668828a1ca029c6 29-Oct-2016 Adam Lesinski <adamlesinski@google.com> New implementation of AssetManager/ResTable

The multiwindow model and Resources-per-activity
model that came in N puts greater demands on AssetManagers.
They are created whenever window dimensions change, which
can be frequently. There is a need to be able to cheaply
create a new AssetManager for each Activity, which shares
a lot of underlying state.

In order to make the creation of AssetManagers cheap,
we need a new implementation of the native AssetManager
and ResTable to support immutable representations of
APKs. This new data structure/class is ApkAssets.

ApkAssets have the same functionality of an AssetManager, except
that they operate on a single APK, and they do not do any caching.
Once loaded, they are immutable.

ApkAssets will be exposed as a Java object, with its implementation in
native code. The existing Java StringBlock will be owned by ApkAssets,
which means that Strings can be shared across AssetManagers.

ApkAssets can be cached by the ResourcesManager. Creating an AssetManager
requires only a list of ApkAssets and a configuration.

AssetManager2 (named with the suffix '2' for now while transitioning
to the new implementation) caches bags that are accessed.

Since ApkAssets are expected to be kept around longer, they do more validation
of the resource table, which cause slower load times. Measured on an angler-userdebug,
loading the framework assets takes 11ms with ApkAssets, and 2ms with the old
AssetManager implementation.

The tradeoff is that there does not need to be any security checks once an ApkAssets
is loaded, and regular resource retrieval is faster. Measured on an angler-userdebug,
accessing resource (android:string/ok) with many locales takes 18us with AssetManager2,
and 19us with AssetManager (this is per resource, so these add up).

Test: make libandroidfw_tests
Change-Id: Id0e57ee828f17008891fe3741935a9be8830b01d
/frameworks/base/libs/androidfw/tests/data/styles/R.h
4c67a475a334e4f65238d439a3339195e03c03be 11-Nov-2016 Adam Lesinski <adamlesinski@google.com> Make tests use APKs instead of exploded APKs

Tests would expect parts of the APK to be unzipped and
maintained. Instead, we now decompress the required files
from the test APKs on test setup. This simplifies
test maintenance substantially.

Test: make libandroidfw_tests && libandroidfw_tests --testdata=frameworks/base/libs/androidfw/tests/data
Change-Id: I3d2100af22df913e02401dedcf9842cdb32b2a3b
/frameworks/base/libs/androidfw/tests/data/styles/R.h
7a37b74d37ff79e805c9e97d977e07bfec753c5a 12-Oct-2016 Adam Lesinski <adamlesinski@google.com> Add tests for attribute resolution

- Adds unit tests for attribute resolution. These include
some test data resource tables and compiled XML files.
- Convert touched files to Google style guide.

Test: make libandroidfw_tests
Change-Id: Ib3a36061dc874de5f6a266b4e82c0a12ef435f23
/frameworks/base/libs/androidfw/tests/data/styles/R.h