Add --output-text-symbols option to aapt. do not merge.
Library projects in the SDK are built using --non-constant-id
to generate a temporary R.java class.
When the library is packaged with the application to generate an
apk, the R class is recreated with the proper IDs due to all the
resources coming from the app and all the libraries.
However for large apps with many libraries (each with their own
R class in their package), this means a lot of unnecessary IDs:
all R classes contains all the IDs including for resources from
by projects they don't have access through the dependency graph.
For really large apps (X,000 resources), with lots of libraries
(10+), this can generate tens of thousands of resources, which
can trigger dalvik's limit of 65K fields and methods per dex
files.
This changes lets aapt generate not only the R class but a simple
text file containing the list of all those IDs so that it is
easier to parse back. The SDK build system will not ask aapt
to generate the R class of the libraries (through the
--extra-packages option), instead it will then read this
file to know what IDs are needed for each library and generate
a much smaller R class for each library (using the same text
file output from compiling all the resources to get the final
integer value).
Library projects in the SDK are built using --non-constant-id
to generate a temporary R.java class.
When the library is packaged with the application to generate an
apk, the R class is recreated with the proper IDs due to all the
resources coming from the app and all the libraries.
However for large apps with many libraries (each with their own
R class in their package), this means a lot of unnecessary IDs:
all R classes contains all the IDs including for resources from
by projects they don't have access through the dependency graph.
For really large apps (X,000 resources), with lots of libraries
(10+), this can generate tens of thousands of resources, which
can trigger dalvik's limit of 65K fields and methods per dex
files.
This changes lets aapt generate not only the R class but a simple
text file containing the list of all those IDs so that it is
easier to parse back. The SDK build system will not ask aapt
to generate the R class of the libraries (through the
--extra-packages option), instead it will then read this
file to know what IDs are needed for each library and generate
a much smaller R class for each library (using the same text
file output from compiling all the resources to get the final
integer value).
The new SDK build system give the ability to insert
versionCode/Name and min/targetSdkVersion in the manifest
but aapt won't replace those if they already exist.
The main problem is that aapt doesn't actually fail when
it doesn't replace them, making the output not what the
developer wanted.
This patch set adds an option to aapt to make it return
an error if the insert failed because the attribute
already existed.
Use "ldrtl" and "ldltr" config qualifiers for RTL / LTR resources
- we cannot use "rtl" / "ltr" qualifiers as they can conflict with ISO-639 Alpha-3
codespace which uses 3 letters for identifying a language code (and could use either
"rtl" or "ltr" strings for defining a language in the future).
- we are using instead "ldrtl" for RTL and "ldltr" for LTR resources. Those qualifiers
are defined by more than 3 chars and outside of what is defined into ISO-639. They
are also more understandable as "ld" prefix is for "layoutdirection"
am 2606fc48: Reconcile with jb-mr0-release jb-release
* commit '2606fc48cb2e65489056096227430b054c558767':
Fix NPE on some phones at startup.
Fix 6804479: "Emergency calls only" in notification shade
Implement CMAS service category program results.
Fix detection of CDMA cell broadcast messages.
Fix our interpretation of apn setting's bearer.
Implement CMAS service category program results.
Fix detection of CDMA cell broadcast messages.
Fix our interpretation of apn setting's bearer.
Fix aapt -G to properly support class attr in fragment.
The code added attributes android:name and class to a
KeyedVector under the same key (fragment) so the 2nd
add (android:name) removed class with was never checked.
This replace the value type in the KeyedVector to be
Vector<NamespaceAttributePair> instead of just
NamespaceAttributePair.
When using aapt dump xmltree to dump an XML which has a content element with newlines, the output contains a
newline. This makes it very difficult, sometimes impossible, to understand what is part of the content, and
what is the meta-data.
We now pass XML content through the same normalizer used for other tags.
* commit '5158db8b07e9512788ecf1f887643e8bc25ce48f':
Fix an NPE and possible unsynchronized call of Locked method.
Fix 6665117: ACTION_ASSIST visual improvements
Capture window manager's last ANR state in bug report.
Capture input dispatcher's last ANR state in bug report.
Fix issue #6636731: Mariner animation ring gets stuck
Jelly Bean ringtone Bug: 6619980
Remove Disco video from builds.
Change snap behavior for lock screen
Improve ANR diagnostics.
Detect bad behavior earlier in Choreographer.
Revert "Fix fake bold for fallback fonts in frameworks."
Include important native processes in watchdog stacks.
Fix issue #6641368: can't launch gallery
Raphael Moll [Mon, 7 May 2012 23:16:46 +0000 (16:16 -0700)]
Merge "AAPT: support a new --ignore-assets flag."
AAPT has a fixed built-in list of files and directories
to ignore when parsing resource files. Over the years we
always had developers requiring specific patterns.
Added a command-line option for it:
aapt di --ignore-assets "foo*:*.blah"
If the env var ANDROID_AAPT_IGNORE is set, it is parsed
to find which file/directory patterns to ignore.
Otherwise a default is used that matches the current behavior.
Raphael Moll [Mon, 7 May 2012 23:16:46 +0000 (16:16 -0700)]
Support a new ANDROID_AAPT_IGNORE env var.
AAPT has a fixed built-in list of files and directories
to ignore when parsing resource files. Over the years we
always had developers requiring specific patterns.
If the env var ANDROID_AAPT_IGNORE is set, it is parsed
to find which file/directory patterns to ignore.
Otherwise a default is used that matches the current behavior.
Added a command-line option for it:
aapt di --ignore-assets "foo*:*.blah"
Add new aapt dump badging output explaining implicit badging.
New uses-implied-feature and uses-implied-permission tell you
about any features or permissions that aapt is automatically
adding to your app, and why it is doing so.
Dan Morrill [Wed, 11 Apr 2012 00:13:17 +0000 (17:13 -0700)]
Merge "Adding a line for android-debuggable to 'dump badging' if AndroidManifest.xml is configured as such. This is to be used by e.g. Play Store to warn the developer that they are about to publish a security hole."
- Added a new custom PNG chunk that carries the layout padding ints.
- Extract the padding ticks from .9.png images and store in the chunk.
- Load the padding information at runtime into Bitmap and NinePatchDrawable.
- The new chunk is ordered first so that it doesn't cause a problem in older
versions of the platform.
Dan Morrill [Tue, 3 Apr 2012 19:44:40 +0000 (12:44 -0700)]
Adding a line for android-debuggable to 'dump badging' if AndroidManifest.xml
is configured as such. This is to be used by e.g. Play Store to warn the
developer that they are about to publish a security hole.
Nobuhiro Hayashi [Mon, 30 Jan 2012 09:42:20 +0000 (18:42 +0900)]
aapt: Remove terminal pointer incrementaion
When initialization, 'end' pointer refers terminal
character in a string. But it is incremented in
while loop. It occurs the access to non-secure memory.
Ben Gruver [Thu, 8 Mar 2012 05:19:16 +0000 (21:19 -0800)]
Fix an issue where a non-styled string could be made into a styled string
If a styled version of an otherwise identical string is encountered before
a non-styled version, aapt merges the two, effectively making the
non-styled string have a spurious style.