189 Commits

Author SHA1 Message Date
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
Conley Owens
4a4d96e7ee Merge changes I0ab47e2f,Ib8016996
* changes:
  Remove errant tag terminator
  Normalize output of XMLtree content
2011-04-27 13:06:46 -07:00
Shachar Shemesh
7c94b34b52 Normalize output of XMLtree content
Make the output from aapt dump xmltree normalized, so that it is unambigously
displayed regardless of the content of the strings. Previous patch left out
handling of XML element content.

Change-Id: Ib8016996c769f3dde7a87f7ecbdf850333f2426a
2011-04-11 13:32:19 +03:00
Mårten Kongstad
57f4b77c89 Runtime resource overlay, iteration 1.
Runtime resource overlay allows unmodified applications to appear
as if they had been compiled with additional resources defined. See
libs/utils/README for more information.

This commit is the first iteration of runtime resource overlay. It
provides the actual overlay modifications and loading of trusted overlay
packages (ie residing in /vendor) targeting framework-res.apk.

This commit loads exactly one overlay package. The overlay,
if present, must target framework-res.apk and be located at
/vendor/overlay/framework/framework-res.apk.

Change-Id: If26ee7754813004a96c043dba37fbe99fa3919db
2011-04-01 14:12:10 +02:00
Xavier Ducrohet
6504490cde am dff6b8e7: Merge "Add --non-constant-id to aapt."
* commit 'dff6b8e71dda9f5d841fa26408714aec2aef1505':
  GpsLocationProvider: Clean up HAL initialization/cleanup sequence
  Fixed GSM encoded network initiated position request
  Ensuring thread-safe usage of DateFormat.
  Fixing infinite loop for zero duration.
  Fix for an infinite loop while scrolling lists.
  WAPPushManager, WAP Push over SMS message handler
  Add --non-constant-id to aapt.
2011-02-28 09:16:38 -08:00
Xavier Ducrohet
d06c1afbb9 Add --non-constant-id to aapt.
This option enbables creating resource constant in the R class
that are not actual constant, but simply static fields.

The goal is to build library projects with these types of
IDs so that the constant does not get inlined in the library
code, since the ID for the library resources only are not
the final values.

The final resource IDs, generated from the main project and
its library(ies), will have proper constant with the final
values.

This allows us to generate binary library bundle (a jar file
and associated resources) that can be distributed. Additionally,
this will let us make the library project support in Eclipse
much more robust and a better user experience overall.

Change-Id: Ibe2f08d68493fde658fc3f7606abf7446f312ad2
2011-02-14 17:06:19 -08:00
Dianne Hackborn
a1f5e82f37 am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit 'a30063d80c08434ac3c7316f338c6d54110449ab':
  Normalize output from aapt d
2011-01-29 23:04:50 -08:00
Dianne Hackborn
25eb04642c Merge "Normalize output from aapt d" 2011-01-29 22:53:20 -08:00
Dianne Hackborn
e802b59280 am 2107757d: am bbb5a5ce: Merge "Make AaptGroupEntry::getMncName accept mnc00"
* commit '2107757dde0b3159119edcc9084fcb9a87985e88':
  Make AaptGroupEntry::getMncName accept mnc00
2011-01-29 15:05:30 -08:00
Dianne Hackborn
bbb5a5ce19 Merge "Make AaptGroupEntry::getMncName accept mnc00" 2011-01-29 14:38:48 -08:00
Dianne Hackborn
1240719ae0 am bcf2adeb: Merge "aapt: Allow raw "%" in unformatted string-arrays"
* commit 'bcf2adeb10c41becec3baa2bcb8de9212272399a':
  aapt: Allow raw "%" in unformatted string-arrays
2011-01-23 12:57:33 -08:00
Josh Stone
bf50322a24 aapt: Allow raw "%" in unformatted string-arrays
Commit 15fe2cb added format checking for translatable strings, enforcing
the use of positional args.  This check can be disabled on <string>
values with translatable="false" or formatted="false".  But they didn't
check for those attributes on <string-array>, so some of CM's strings
fail when they're not really format strings, just because they contain
percent signs.  (e.g. brightness widget's "Auto/Dim/40%/100%")

So now the formatted/translatable attributes are checked in string-array
too, and we can restore our proper percent signs.

Change-Id: I3478ab7e0b939e61fe0cec20201ac55096264080
2011-01-22 21:13:12 -08:00
Shachar Shemesh
9872bf4a2d Normalize output from aapt d
Make the output from aapt dump --values resources and aapt dump xmltree normalized, so that it is unambigously displayed
regardless of the content of the strings.

Change-Id: Ia3bff36c4ee1e9a44f474534e154830948beabdf
2011-01-04 20:52:08 +02:00
Johan Redestig
5ef0b9d724 Make AaptGroupEntry::getMncName accept mnc00
MNC 00 is a valid network code and is used by
some operators, see http://en.wikipedia.org/wiki/Mobile_Network_Code.

Remove the test that checks if atoi returns zero.
The string is validated to contain only numbers
already.

Also discussed here:
https://code.google.com/p/android/issues/detail?id=3657

Change-Id: I3220d7980abe4067c9e7aa4cbc10b5fd0b8c9ea7
2011-01-04 07:30:32 +01:00
Dan Morrill
0ccc8b7345 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 '5441a9ff2128cf2c5088974c74b79d2d1734f755':
  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:28:50 -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
Jean-Baptiste Queru
3442611ee1 am 5580e44c: Merge "Support changing style parent in overlays"
* commit '5580e44c250944f5cd011b2682eea5cc2de9706c':
  Support changing style parent in overlays
2010-11-05 14:05:41 -07:00
Scott Main
d58fb97ddf fix xlarge support in aapt for gingerbread
Change-Id: I4d8872fb839a6eadc538055215d4455af328846c
2010-11-04 18:33:05 -07:00
Jean-Baptiste Queru
5580e44c25 Merge "Support changing style parent in overlays" 2010-11-04 07:26:37 -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
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
Anthony Newnam
0a226d84e1 Avoid pre-processing images when they won't be used
Change-Id: I24db3645c399f66dc7cc0e85909ce34b68ff829e
2010-10-06 18:39:19 -07:00
Dianne Hackborn
407f625a9b Add new API to find out whether external storage is removable.
This is implemented based on whether we are using the "nosdcard"
product.  Needed to tweak aapt to allow use of the product attribute
with other resource definition tags besides strings.

Change-Id: I49922d23b52a34183a8e2f4d2515adaf1fc9149a
2010-10-04 13:58:56 -07:00
Eric Fischer
90964040ca Add an aapt option to allow string variations for different devices.
The --product option to aapt is a comma-separated list of characteristics
of the device being built for.  For example, --product nosdcard,grayscale
for a device with no SD card and a grayscale screen.

Strings can specify a product="characteristic" option to cause that version
of the string to be used only for that type of device.  All such strings
should also specify, at the end of the block, product="default", which
will be used if none of the variations match.  For example:

<string name="choose" product="bw">Choose black or white</string>
<string name="choose" product="grayscale">Choose a shade of gray</string>
<string name="choose" product="default">Choose a color</string>

The default characteristic will also be used when no --product option
is specified.

Change-Id: Ie6c1505599e02e15b7818e8be6ec47bc6ce71aaa
2010-09-23 10:32:47 -07:00
Anthony Newnam
578a57fc6b Avoid pre-processing images when they won't be used
Change-Id: Iffa31228ca95a2e29ccc0aa81bda0fc66922d577
2010-09-03 15:17:09 -05: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
Xavier Ducrohet
8e9bfab2a3 Add a --debug-mode option to aapt.
When passed (with no needed parameters) to the aapt command line,
aapt will insert debuggable=true in the application node of the manifest
automatically.

This is to be used by the SDK tools to make true "debug" builds
that require no code/file change.

Change-Id: I909759caef499a91d10cc9a0902c6448c87e75ef
2010-08-31 15:46:59 -07:00
Xavier Ducrohet
6487b09923 Add a --debug-mode option to aapt.
When passed (with no needed parameters) to the aapt command line,
aapt will insert debuggable=true in the application node of the manifest
automatically.

This is to be used by the SDK tools to make true "debug" builds
that require no code/file change.

Change-Id: I6f0a7af7b7d51f26bb0ec012e6f142a6060b8618
2010-08-31 11:07:56 -07:00
Kenny Root
2e7427f39e Merge "Add LFH offset to verbose list of APK" into gingerbread 2010-08-25 17:20:29 -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
Brian Carlstrom
74b58fc58b Fix linux 64 build
git cherry-pick -e 49416bc658e37a0f4ae4f2b7b8582dd1606fba0f

Change-Id: I37a689acea8aeb5d6ac92ee56b077bafe4fba170
2010-08-24 20:20:50 -07:00
Dianne Hackborn
f43489d7d5 Fix aapt dump badging to support xlarge screens.
Change-Id: Ieeb757cd48ad9b3f46c5e4aed9d5efaeac834049
2010-08-20 12:44:33 -07:00
Martin Nordholts
2fda9f4562 Support changing style parent in overlays
Package overlays makes it possible for vendors to tweak the look of
the platform and the applications without touching any platform or
application code directly. This makes package overlays an important
mechanism in the Android build system.

There is currently a limitation that forbids changing the parent of a
style. If vendors could change the parent of e.g. ‘CalendarTheme’
from Android’s vanilla ‘Theme’ to ‘VendorTheme’, then vendor
specific adjustments could be done without changing any code directly.

From looking at the code it can be seen that the parent value of a
style is stored temporarily in ResourceTable::Entry::mParent while
overlays are gone through in buildResources(), and processed (in
ResourceTable::Entry::assignResourceIds()) at first after all overlays
have been handled, so there aren’t any obvious reasons why changing
parent in an overlay should be forbidden.

Change-Id: I5969bb8aab90df437e1967fc504cc0da79107d13
2010-08-17 13:18:59 +02:00
Ying Wang
e05184f271 Merge "Output proguard keep flags for fragment classes." into gingerbread 2010-08-13 15:26:21 -07:00
Eric Fischer
244152bfb9 Merge "Change aapt's warning message to suggest formatted="false", not "true"." into gingerbread 2010-08-13 14:54:15 -07:00
Eric Fischer
98ee11ddb7 Change aapt's warning message to suggest formatted="false", not "true".
True is the default and specifying it won't suppress the warning.

Change-Id: I8ecc919b4059bf3321e781649cb46dd2d3807592
2010-08-13 14:49:55 -07:00
Ficus Kirkpatrick
588f228d6a Add --max-res-version flag to aapt.
aapt will ignore any versioned resource directories over the
specified version (if used).  e.g. --max-res-version=6 will
cause layout-land-v7 to be ignored.

Merged from froyo.

Change-Id: Ia4eabae535b95b75d18b0c83135d44ed9a95b9eb
2010-08-13 14:20:51 -07:00
Ying Wang
561a91824f Output proguard keep flags for fragment classes.
Change-Id: I28c10fbf18b91f8ba3dfc2575cd41215f65f11ec
Bug: 2916847
2010-08-13 14:06:58 -07:00
hmepas
b7ffaf6ae2 Fix build on some linux machines
This adds -lpthread on linux for aapt and localize, which appear to be
needed on some linux distros.

Signed-off-by: Jean-Baptiste Queru <jbq@google.com>
2010-08-11 09:08:51 -07:00
Dan Morrill
45378f07b8 am 6b22d81a: 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.
Merge commit '6b22d81aa35d9a9b32670995c002e92588b2fe09' into gingerbread

* commit '6b22d81aa35d9a9b32670995c002e92588b2fe09':
  As Donut (API=4) devices and earlier do not have a Bluetooth API, .apk files
2010-06-17 12:36:17 -07: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
Joe Onorato
9a5fcd1c14 am 9d71860e: Merge "The aapt and aidl tools are prebuilt when we\'re doing an apps-only build, so don\'t try to build them." into froyo
Merge commit '9d71860e8cbaf16ddae3cd5d06ede8e6cfc7675a' into gingerbread

* commit '9d71860e8cbaf16ddae3cd5d06ede8e6cfc7675a':
  The aapt and aidl tools are prebuilt when we're doing an apps-only build, so don't try to build them.
2010-06-15 15:21:14 -07:00
Joe Onorato
74905e5b0a The aapt and aidl tools are prebuilt when we're doing an apps-only build, so don't try to build them.
Change-Id: I9896b11a9b90cbbbe2170243c8bdbc40231dfbff
2010-06-10 18:36:57 -07:00
Dianne Hackborn
168585ed68 am 5474902f: Merge "xhdpi" into froyo
Merge commit '5474902fe9fe72c825855c4a77f99a581a9f6594' into kraken

* commit '5474902fe9fe72c825855c4a77f99a581a9f6594':
  xhdpi
2010-06-06 12:10:05 -07:00
Dianne Hackborn
588feee5e7 xhdpi
This is only a tool (aapt) change, and does not impact any current code.

Change-Id: I562063f612af919eaadba8ac4868a95ff41ac840
2010-06-04 14:36:39 -07:00
Kenny Root
15fe2cb73b Add error checking for translatable strings
Translatable strings that have multiple substitutions should use
positional String.format() substitutions. This change makes it an error
not to use that format on translatable strings that have more than one
substitution in its text.

Change-Id: I3a19707f3804aa24e8568dc1653a11576cac5916
2010-06-03 09:33:43 -07:00
Dan Morrill
6a22fb9bef am f7ebcfec: am e17b4e71: Merge "Adding the backward-compatible filtering heuristics for the new device features definitions added in FroYo." into froyo
Merge commit 'f7ebcfeccbd4433be5252857a854a6b565bf3fb9' into kraken

* commit 'f7ebcfeccbd4433be5252857a854a6b565bf3fb9':
  Adding the backward-compatible filtering heuristics for the new device
2010-05-04 12:45:49 -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