In order to support APK split features, the resource
table needs to support loading multiple resource
tables with the same package but potentially new set
of type IDs.
This adds some complexity as the type ID space changes
from dense and ordered to potentially sparse.
A ByteBucketArray is used to store the type IDs in
a memory efficient way that allows for fast retrieval.
In addition, the IDMAP format has changed. We no longer
need random access to the type data, since we store the
types differently. However, random access to entries of
a given type is still required.
Change-Id: If6f5be680b405b368941d9c1f2b5d2ddca964160
When aapt sees @SystemApi in the XML comment associated with a resource,
it will now remove this tag from the comment (since is it not meaningful as
a Javadoc tag) and instead add an @android.annotation.SystemApi annotation
to the declared type or member. This enables easy downstream processing of
this annotation from generated code.
Change-Id: If984908477648c0c90be52fdc955fbb891d99b28
AAPT dumps data from a bad ResTable, which
causes crashes. Prevent this by checking if
there were errors when creating the ResTable.
Bug:14902008
Change-Id: I5e04ebf967c60b78c511dd175785a13bca52f09a
The framework allows references in the <meta-data>
element in an AndroidManifest.xml, so badging should
do the same.
Bug:14088271
Change-Id: Ia8157655e21adaf11b7ace90a98a9cca3c8a476c
With a malformed StringPool, AAPT dump badging would
crash trying to retrieve the name of an XML tag.
Bug:14658555
Change-Id: I6aa6c53c60b20725a461da2d3a39685c174b4d35
This is a quick fix. A refactoring is already underway to properly
solve this problem.
Bug:14857725
Change-Id: Ic0c475aa0b180803a687904ad9f71eb87e137a25
Build multiple APKs, each containing a disjoint subset
of configurations. These can then be loaded into the device
AssetManager and should operate as if they were never split.
Use the idea of building multiple sets of files, where each
set represents an APK. An ApkBuilder can place files
in a set based on its configuration, but you can actually
add directly to a set, in the case of the resources.arsc and
generated AndroidManifest.xml for splits.
Change-Id: Ic65d3f0ac1bbd290185695b9971d425c85ab1de3
* commit '867680342e12af59a26756f30cf817a131724943':
Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice.
* commit 'b593ad60682a6f8c945c4c2ffc3d278df3f6e360':
Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice.
during packaging if pseudolocalization was done automatically.
This prevents attemts to add same resource twice.
Change-Id: I51e17f961ac44047bf466ce4aa0d4d17f4ded0d6
AAPT would attempt to warn if an unprefixed 'id'
attribute was used in an XML resource file even
if that XML file failed to compile. The result
was undefined behaviour, including crashing the
process.
Change-Id: I1a9464ec937760e8d38bbe1af8d1b5d6b2c105a2
Fixes accented pseudolocalization and adds RTL pseudolocale.
This change contains following modifications in the pseudolocalization logic:
1) zz_ZZ pseudolocale was removed;
2) en_XA pseudolocale was added for pseudo-accented;
3) ar_XB pseudolocale was added for pseudo-rtl;
4) Pseudo RTL localization functionality was implemented;
5) Text expansion functionality was implemented;
6) Text bracketing was implemented;
7) Couple of issues of previous implementation were fixed.
Change-Id: I9f7f27bed717e39e82717d15c398decffc8bec3c
Signed-off-by: Anton Krumin <antkrumin@google.com>
Shared libraries can now export resources for applications
to use.
Exporting resources works the same way the framework exports
resources, by defining the public symbols in res/values/public.xml.
Building a shared library requires aapt to be invoked with the
--shared-lib option. Shared libraries will be assigned a package
ID of 0x00 at build-time. At runtime, all loaded shared libraries
will be assigned a new package ID.
Currently, shared libraries should not import other shared libraries,
as those dependencies will not be loaded at runtime.
At runtime, reflection is used to update the package ID of resource
symbols in the shared library's R class file. The package name of
the R class file is assumed to be the same as the shared library's
package name declared in its manifest. This will be customizable in
a future commit.
See /tests/SharedLibrary/ for examples of a shared library and its
client.
Bug:12724178
Change-Id: I60c0cb8ab87849f8f8a1a13431562fe8603020a7
- Attributed source of problems to the correct file.
- Only verify string localizations against valid
locales.
Bug:13140015
Change-Id: I9dabc5efa0510649caee8af0c8ebb803d6f48269
- Attributed source of problems to the correct file.
- Only verify string localizations against valid
locales.
Bug:13140015
Change-Id: I9dabc5efa0510649caee8af0c8ebb803d6f48269
The Res_png_9patch struct had several pointer members
whose size differed between 32 and 64 bit platforms.
These members have been replaced by uint32_t offsets
to serialized data. The serialized form for 9patches
places a Res_png_9patch object at the beginning of
serialized data, followed by int32_t arrays of xDivs,
yDivs and colors.
Note that these offsets are not strictly required,
since they can be computed from the values of numXDivs,
numYDivs & numColors, however they are called in tight
loops so having them computed once is a beneficial.
This change also removed the unused patch_equals function
from aapt's Image.cpp.
Change-Id: I3b9ac8ae5c05510d41377cae4dff1c69b40c2531