70 Commits

Author SHA1 Message Date
Xavier Ducrohet
84be06e4ce resolved conflicts for merge of ea9e6d24 to honeycomb-plus-aosp
Change-Id: I8e047147a4d2c899b6654c03a5f32b04d929e602
2011-07-20 17:45:11 -07:00
Xavier Ducrohet
a125c937de resolved conflicts for merge of 2c311be7 to honeycomb-plus-aosp
Change-Id: I806c7b4ae95f66df621587e52497dd8739a115fe
2011-07-20 16:31:25 -07:00
Josiah Gaskin
8a39da80b3 Added Caching for PreProcessed PNGs
Added a cache management system for pre-processed PNG files
along with unit tests. The cache system will be used if
the --no-crunch flag is passed to AAPT during the package
phase. The cache can be updated by a call to 'aapt crunch'
(see usage statement). Also put in benchmarking code.

Change-Id: I58271fb2ee2f5f9075fd74d4ff6f15e7afabd05c
2011-07-20 15:20:26 -07:00
Xavier Ducrohet
9139868b6c am ba6c98db: am 82943ecf: am d40c93f6: Merge "Add dependency generation to Aapt for R.java"
* commit 'ba6c98db8f21016f81ecac35bb0ea3c433044bb7':
  Add dependency generation to Aapt for R.java
2011-07-19 10:18:28 -07:00
Xavier Ducrohet
bf31250ba0 am d5431ed5: am 2e659ae5: am 42755155: Merge "Copy once-created R.java into library projects"
* commit 'd5431ed5505a42e5e33c8bf7cc2ff72792979be9':
  Copy once-created R.java into library projects
2011-07-19 10:18:25 -07:00
Josiah Gaskin
03589cc653 Add generation of dependency file for .ap_ package
Make Aapt generate a dependency file in the same directory as the
output ap_ file if the --generate-dependencies flag is set.
This dependency file can then be read by the ant exec loop task
to see whether to repackage resources.

Change-Id: I763679414daf76369700aa599c26dcf78d4de099
2011-07-18 16:37:55 -07:00
Josiah Gaskin
9bf34ca6f8 Add dependency generation to Aapt for R.java
Make Aapt generate a dependency file in the location specified
by RClassDir for R.java if the --generate-dependencies flag is set.
This dependency file is then read by the ant exec loop task
to see whether to recreate R.java.

Change-Id: I7152dac86b6ea0e448ef65e3a95694afe233c789
2011-06-27 16:44:57 -07:00
Josiah Gaskin
ce89f1531e Copy once-created R.java into library projects
This change adds functionality in Aapt to allow specification of
library projects to copy the generated R.java file into rather
than regenerating the file for each library project.

Change-Id: I05939d1dc875bd875be9298ca47cb639235070c6
2011-06-27 16:29:38 -07:00
Dianne Hackborn
f77ae6e65a New orientation handling. Only impacts SDK (aapt dump badging).
This is a new way of determining whether an application requires
specific orientations, done by looking at any requirements in its
activity tags.  Note that this won't catch all possible issues,
because applications can still force an orientation through Java
APIs, but the vast majority of applications that actually require
a specific orientation should be doing it this way because it the
easiest way and the only way to cleanly launch into the app from
a different orientation without doing some serious activity tricks.

Change-Id: I11d32104f6bc3d2a72aeeff1ca150b8f1c9f5588
2011-06-16 11:13:20 -07:00
Dianne Hackborn
e289bff0ec Add new landscape and portrait orientation features.
Updates aapt to know about these.  Also updates aapt badging to:

- No longer crash due to the change to how we match unspecified
configuration resources.
- Report the new "smallest screen" supported screen configs.
- Infer old screen size buckets based on new smallest width attrs.
- Report all of the different labels and icons in an app.

Change-Id: I7376042b817391bd070f549cebbc7f03be4635c8
2011-06-14 11:23:52 -07:00
Dan Morrill
00db2213bf am 0ccc8b73: am 5441a9ff: Merge "GL texture filtering changed from AND to OR, so rename tag name to match. (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen)." into gingerbread
* commit '0ccc8b7345eac0b507c221be47e55926cbda8957':
  GL texture filtering changed from AND to OR, so rename tag name to match. (<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs. supports-screen).
2010-12-14 11:31:29 -08:00
Dan Morrill
096b67f655 GL texture filtering changed from AND to OR, so rename tag name to match.
(<uses-foo> == AND, <supports-foo> == OR, e.g. uses-feature vs.
supports-screen).

Change-Id: I0f20aed7f95169d9adfc7fe128191eb6e49d116f
2010-12-13 16:25:54 -08:00
Scott Main
41a4833bf2 am 4da6efc8: am 46151652: Merge "fix xlarge support in aapt for gingerbread" into gingerbread
* commit '4da6efc8a3ecfcf46a8988ad1d277ae00ed1f58c':
  fix xlarge support in aapt for gingerbread
2010-11-06 16:24:28 -07:00
Scott Main
d58fb97ddf fix xlarge support in aapt for gingerbread
Change-Id: I4d8872fb839a6eadc538055215d4455af328846c
2010-11-04 18:33:05 -07:00
Dianne Hackborn
a0b46c9c44 Implement issue #3116702: New manifest tags for supported screen sizes
Merged from GB.

Change-Id: I94730b54bcacd083f77708e84c35f4932a7b9d2e
2010-10-22 16:18:43 -07:00
Dianne Hackborn
a6d9c7c04c Implement issue #3116702: New manifest tags for supported screen sizes DO NOT MERGE
Change-Id: Iabf64d86c89d387ffbfbc39f950d308a73fe17eb
2010-10-21 15:32:06 -07:00
Dan Morrill
1785627fb3 am b58af2b8: am 5c62ab0a: Merge "Adding a new <uses-gl-texture/> tag, to be used to enable apps to specify filtering based on support for OpenGL ES texture and texture compression formats." into gingerbread
Merge commit 'b58af2b8b3871436942d0e2c878c906bffaa2fb0'

* commit 'b58af2b8b3871436942d0e2c878c906bffaa2fb0':
  Adding a new <uses-gl-texture/> tag, to be used to enable apps to specify
2010-10-15 08:33:00 -07:00
Dan Morrill
6f51fc14d0 Adding a new <uses-gl-texture/> tag, to be used to enable apps to specify
filtering based on support for OpenGL ES texture and texture compression
formats.

Change-Id: I993209a673579b296007ae2ba830d0275770dd11
2010-10-13 14:33:43 -07:00
Dianne Hackborn
f156e752b5 am 31103928: am 192b56d4: Merge "Implement #2964234: Add support for <uses-package> element to aapt" into gingerbread
Merge commit '31103928ed5b9091bcd7de74c8a49675d10c87e7'

* commit '31103928ed5b9091bcd7de74c8a49675d10c87e7':
  Implement #2964234: Add support for <uses-package> element to aapt
2010-09-02 17:59:51 -07:00
Dianne Hackborn
43b6803095 Implement #2964234: Add support for <uses-package> element to aapt
Change-Id: Ifb381f387cab7e5a99006691e330d0e3d9d0f250
2010-09-02 17:14:41 -07:00
Kenny Root
dc05980466 am eb0e0f46: am 2e7427f3: Merge "Add LFH offset to verbose list of APK" into gingerbread
Merge commit 'eb0e0f465155bc9ec2c79741890fb65bd403e33a'

* commit 'eb0e0f465155bc9ec2c79741890fb65bd403e33a':
  Add LFH offset to verbose list of APK
2010-08-25 17:25:15 -07:00
Kenny Root
fb2a9467ad Add LFH offset to verbose list of APK
The Local File Header (LFH) offset is printed in debugging cases when
the platform is inspecting APKs. This adds the LFH offset field to the
list of contents of an APK, so that it can be checked easily against the
Central Directory (CD).

Change-Id: I08f9a13256bfe6563c1a963c4f0289789b2e7857
2010-08-25 07:38:33 -07:00
Dianne Hackborn
cc5239b78b am 8b569c8d: am 42f90ca5: Merge "Fix aapt dump badging to support xlarge screens." into gingerbread
Merge commit '8b569c8d49924d849793513a5418ef0350320962'

* commit '8b569c8d49924d849793513a5418ef0350320962':
  Fix aapt dump badging to support xlarge screens.
2010-08-24 09:02:43 -07:00
Dianne Hackborn
f43489d7d5 Fix aapt dump badging to support xlarge screens.
Change-Id: Ieeb757cd48ad9b3f46c5e4aed9d5efaeac834049
2010-08-20 12:44:33 -07:00
Steve Block
f1ff21ac62 Fixes a few minor problems with AAPT
- Fixes casting problems with stricter compilers
- Adds a couple of missing ifdef guards

This is a first step toward being able to generate APKs on the fly on the device.

Bug: 2766918
Change-Id: Icaaee5a4032afa313256add321b447443861dd85
2010-06-25 11:02:15 +01:00
Dan Morrill
6b22d81aa3 As Donut (API=4) devices and earlier do not have a Bluetooth API, .apk files
that have minSdkLevel (or targetSdkLevel) set to 4 or lower should not be
presumed to require Bluetooth just because they take the permission.

Change-Id: Ia629e9ef0425a577e4e14f9b348f5aa2b39c1e74
2010-06-15 21:57:33 -07:00
Dan Morrill
89d97c1418 Adding the backward-compatible filtering heuristics for the new device
features definitions added in FroYo.

Change-Id: I5024e45c62813fe2fd2ff4d222df816a86a94f86
2010-05-04 08:39:03 -07:00
Dianne Hackborn
cf244ada58 Add ability for some manifest attributes to reference resources.
This loosens our restriction on many manifest attributes requiring
literal string values, to allow various ones to use values from
resources.  This is only allowed if the resource value does not change
from configuration changes, and the restriction is still in place
for attributes that are core to security (requesting permissions) or
market operation (used libraries and features etc).

Change-Id: I4da02f6a5196cb6a7dbcff9ac25403904c42c2c8
2010-03-09 17:18:05 -08:00
Dianne Hackborn
ef05e076ce Fix issue #2448075: aapt doesn't fix up activity-alias android:targetActivity links
And related:

- The aapt tool now sets a resource configurations sdk level to match any configs
  that have been set (for example if you specify density your sdk level will be
  at least 4).
- New option to modify the targetPackage attribute of instrumentation.
- Clean up of aapt options help.
- Fix of UI type values to leave 0 for "unspecified".
- Make the UI mode config APIs public.
2010-03-01 20:42:14 -08:00
Jeff Hamilton
e2c17f9174 Dump original-package entries.
Change-Id: I29b20811847555ff9858ef47cca69c8b992b24ea
2010-02-12 13:45:16 -06:00
Dianne Hackborn
93cee56d87 am ce56857e: am cb2d50d0: Fix issue #2357259: aapt tool prints "uses-configuation:"
Merge commit 'ce56857ef72538c197afd91b9f30dc868d2667d9'

* commit 'ce56857ef72538c197afd91b9f30dc868d2667d9':
  Fix issue #2357259: aapt tool prints "uses-configuation:"
2010-01-07 09:21:52 -08:00
Dianne Hackborn
ce56857ef7 am cb2d50d0: Fix issue #2357259: aapt tool prints "uses-configuation:"
Merge commit 'cb2d50d0d6e2e37ae02b014999da23ecd32038b8' into eclair-plus-aosp

* commit 'cb2d50d0d6e2e37ae02b014999da23ecd32038b8':
  Fix issue #2357259: aapt tool prints "uses-configuation:"
2010-01-06 13:46:50 -08:00
Dianne Hackborn
cb2d50d0d6 Fix issue #2357259: aapt tool prints "uses-configuation:"
Change-Id: Id3ea3a86bd4d385441b05fcbe85b8ab62c35afff
2010-01-06 11:29:54 -08:00
Jean-Baptiste Queru
926d1a2200 am a5a8cc13: resolved conflicts for merge of ce307f88 to eclair-mr2
Merge commit 'a5a8cc13d3f906650a1eb17e20e1b26d68b78453' into eclair-mr2-plus-aosp

* commit 'a5a8cc13d3f906650a1eb17e20e1b26d68b78453':
  Add --custom-package to aapt
2009-12-10 17:57:04 -08:00
Jean-Baptiste Queru
a5a8cc13d3 resolved conflicts for merge of ce307f88 to eclair-mr2 2009-12-10 17:53:27 -08:00
Xavier Ducrohet
9af0c6facb am ce307f88: Merge change Ie4cdb5a3 into eclair
Merge commit 'ce307f889b509143899a2221359219fbc91b618c' into eclair-plus-aosp

* commit 'ce307f889b509143899a2221359219fbc91b618c':
  Add --custom-package to aapt
2009-12-09 18:25:28 -08:00
Kenny Root
5cd6fcd518 am e6c0e993: Merge change I129483f8 into eclair-mr2
Merge commit 'e6c0e99334bc2f47e5d36db253ac8f166047c03b' into eclair-mr2-plus-aosp

* commit 'e6c0e99334bc2f47e5d36db253ac8f166047c03b':
  Optional use of UTF-8 strings in resource bundles
2009-12-09 15:51:21 -08:00
Kenny Root
19138468ca Optional use of UTF-8 strings in resource bundles
Allows the use of UTF-8 for packing resources instead of the
default of UTF-16 for Java. When strings are extracted from the
ResStringPool, they are converted to UTF-16 and the result is
cached for subsequent calls.

When using aapt to package, add in the "-8" switch to pack the
resources using UTF-8. This will result in the value, key, and
type strings as well as the compiled XML string values taking
significantly less space in the final application package in
most scenarios.

Change-Id: I129483f8b3d3b1c5869dced05cb525e494a6c83a
2009-12-07 15:14:15 -08:00
Xavier Ducrohet
63459ad555 Add --custom-package to aapt
This is needed to add library support to the SDK.

The goal is to have libraries and main project use the same
package for the R/Manifest classes to that they can share code
and resources.

BUG 2293994

Change-Id: Ie4cdb5a3bdabe1760a91316fd8969e4f53344bf9
2009-11-30 18:05:10 -08:00
Doug Zongker
16b696af61 am 617262d8: Merge change I37c4157d into eclair
Merge commit '617262d8f57362536ddc00a070c1c0994741de44' into eclair-plus-aosp

* commit '617262d8f57362536ddc00a070c1c0994741de44':
  add "junk path" -k option to aapt (DO NOT MERGE)
2009-10-20 13:36:06 -07:00
Doug Zongker
37c4157d7c add "junk path" -k option to aapt (DO NOT MERGE)
Adds a "junk path" option to aapt so that you can do:

   aapt add -k archive.zip path/to/some.file

and have the file stored in the zip under the name "some.file"
(without the path).  Needed so that we can use 'aapt add' in place of
'zip -j' when building jar files, which will lead to smaller
incremental OTAs.

(This is a cherry-pick of a change already submitted to eclair-mr2;
the change was approved for mr1.)
2009-10-19 17:04:21 -07:00
Doug Zongker
b80d1d0cc8 am afbf8afa: Merge change I564b5b00 into eclair-mr2
Merge commit 'afbf8afa858a78b66c19f11cfda030e913b34085' into eclair-mr2-plus-aosp

* commit 'afbf8afa858a78b66c19f11cfda030e913b34085':
  add "junk path" -k option to aapt
2009-10-13 13:47:54 -07:00
Doug Zongker
dbe7a68cc1 add "junk path" -k option to aapt
Adds a "junk path" option to aapt so that you can do:

   aapt add -k archive.zip path/to/some.file

and have the file stored in the zip under the name "some.file"
(without the path).  Needed so that we can use 'aapt add' in place of
'zip -j' when building jar files, which will lead to smaller
incremental OTAs.
2009-10-13 13:33:31 -07:00
Suchi Amalapurapu
e8e977bc4a am f1871e27: Merge change 26009 into eclair
Merge commit 'f1871e273e1bf49d72a7f2ef51a4ef377d8f3112' into eclair-plus-aosp

* commit 'f1871e273e1bf49d72a7f2ef51a4ef377d8f3112':
  Fix issue with printing gles version in aapt dump badging option
2009-09-20 14:35:24 -07:00
Suchi Amalapurapu
40b94725dc Fix issue with printing gles version in aapt dump badging option
If the name attribute for uses-feature or uses-permission is empty
the error value is still empty indicating error and preventing the
else part from being checked as it should be.
2009-09-20 13:40:02 -07:00
Jean-Baptiste Queru
3c193a4a8d merge from open-source master 2009-09-04 07:54:30 -07:00
Jean-Baptiste Queru
be8e36e32b merge from donut 2009-09-03 15:19:21 -07:00
Kenny Root
44b283dc27 Fix %p vs %s typo in aapt message
When trying to print an xmltree or xmlstrings from aapt, the error
message if the resource didn't exist erroneously printed a pointer
instead of a string.

Change-Id: I317bbbdc1200e0f10922e80a36e41a22b2d50d0d
2009-09-01 19:07:48 -05:00
Jean-Baptiste Queru
72b1f379d5 donut snapshot 2009-08-31 09:17:57 -07:00
Joe Onorato
1553c82e08 Add a flag (-G) to aapt to have it output the classes that shouldn't be obfuscated by ProGuard. 2009-08-30 16:51:29 -07:00