402 Commits

Author SHA1 Message Date
Chet Haase
d82c8ac4db Transition API changes from API council recommendations
Issue #10460684 KLP API Review: android.view.transition and android.animation
Issue #10570740 Transitions: inflate transition targets from xml

Change-Id: I7a3f6d3aece2fcafc5efd555d033f79e86635c98
2013-09-04 14:46:38 -07:00
Wink Saville
f2c89b9ed6 am 9516ed45: am cfc23ac6: Merge "Add support for MNC=00"
* commit '9516ed4598948eea5623c57e443bce08c1f48ab6':
  Add support for MNC=00
2013-07-30 12:28:05 -07:00
Mattias Petersson
1d766b5321 Add support for MNC=00
This adds support for operators with MNC (Mobile Network Code) zero
to add customized resources. For example, it makes it possible to
add a folder called "/res/values-mnc00/" in an application. This will
cause resources in that folder to be used when MNC is zero.
(There is a total of 14 countries that have an operator with MNC
zero.)

Without this fix, the resource framework gets confused, because MNC 0
is normally used when the MNC is undefined (not set).

Bug: 7170488
Change-Id: Icfd39fd0c739216e89446252ea0e7ceba6f002c6
2013-07-26 18:42:34 +00:00
Jeff Brown
9d3b1a424c Move input library code to frameworks/native.
No longer compile libandroidfw as a static library on the device
since it already exists as a shared library.  Keeping the static
library would force us to provide a static library version of
libinput for the device as well which doesn't make sense.

Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
2013-07-01 20:11:42 -07:00
Stephen Hines
5675b97f65 Switch to shared libpng/libz dependency.
Bug: 9593270
Change-Id: I1eec2590cca046d6e030c73d31a6b400019e1ebd
2013-06-26 17:27:35 -07:00
Dima Zavin
3b9831f6a2 Merge "aapt: move qsort_r_compat here as it is sole client" 2013-05-08 07:35:34 +00:00
Mathias Agopian
1f5762e646 libutils clean-up
Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
2013-05-07 17:09:46 -07:00
Dima Zavin
823abb6314 aapt: move qsort_r_compat here as it is sole client
This code is only used on the host for MacOS X compatibility.
Apparently, glibc and Apple's libc disagree on the parameter
ordering.

Change-Id: I214edcf2870b6ac88316306ac5af43f1dadf9b2e
Signed-off-by: Dima Zavin <dima@android.com>
2013-05-07 16:19:41 -07:00
Jeff Sharkey
f1301d86fb Merge commit 'b3f66877' into afdmerge
Change-Id: I319863cf23b2e6eacfa4508f7b111fba7b1cbc24
2013-04-29 15:29:13 -07:00
Christopher Tate
2167516634 am bd1730de: Merge "Document the \'aapt dump strings\' command"
* commit 'bd1730dec7356e042ee885ff4a63b40f36733062':
  Document the 'aapt dump strings' command
2013-04-29 15:19:24 -07:00
Bjorn Bringert
7bb9471ea7 Merge "Allow compiling aapt for the device" 2013-04-29 10:10:52 +00:00
Mårten Kongstad
08822df147 Document the 'aapt dump strings' command
Update the usage page for aapt to mention 'strings' as a valid
subcommand to 'dump'.

Change-Id: Iadb2b8ce36951ff36ffbf6b5ea349ba1e2b12582
2013-04-29 09:57:19 +02:00
Jeff Brown
5ae02e92e4 am eb6403e9: resolved conflicts for merge of bfdd2566 to jb-mr2-dev-plus-aosp
* commit 'eb6403e95d601b62be7b4610599e72fd329f2666':
  Generate SDK docs for v7 support library packages.
2013-04-26 12:06:15 -07:00
Bjorn Bringert
fb903a45d7 Allow compiling aapt for the device
Changes:

- The static device version of libandroidfw now includes
  the extra functions needed by aapt. I could only find
  a few host tools that use the static library, so this is
  hopefully not a problem.

- The pseudolocalization code is moved into aapt.
  It was previously in libhost, but only used by aapt.

Change-Id: Ib393ebb7dcebee8abbb628cbe5255ea1679674ac
2013-04-26 15:07:09 +01:00
Jeff Brown
caf7b0a155 Generate SDK docs for v7 support library packages.
This change required fixing some bugs in how AAPT handles
qualified symbols such as "android:layout_height"
when generating JavaDoc links.  The links were being
generated using the package name of the generated R file
rather than the package name of the referenced symbol.
These broken links caused the JavaDoc build to fail.

Bug: 8175766
Change-Id: I52fbef27825a25abca960cb44b59c2132267e9d6
2013-04-26 00:20:42 -07:00
Chet Haase
faebd8f079 First draft of Scenes & Transitions feature
This checkin has preliminary API (in flux, definitely changes still
to be made) and implementation for a new "Scenes & Transitions" feature.
The current implementation allows you to define different Scenes
(via layout resource IDs or callbacks) and Transitions to be used when
changing to those scenes. By default, scene changes will use AutoTransition,
which generally does the right thing.

There are no overview docs or tutorials yet. The best way to learn how things
work is to see the code for the various tests in
frameworks/base/tests/TransitionTests.

Expect the API to change. Expect the implementation to change (mostly to add
more functionality). Expect bugs, but tell me if things do not work
as expected.

Change-Id: Ib025a9f565678b225afa4759325cf6d496cc7215
2013-04-18 13:33:13 -07:00
Xavier Ducrohet
a068eeddc9 Revert "Make --non-constant-id generates non final IDs for styleable."
This reverts commit 8730f46ae5ba9021a0e01c068ffc6b552b6c4510.
2013-04-13 09:48:01 -07:00
Xavier Ducrohet
8730f46ae5 Make --non-constant-id generates non final IDs for styleable.
This was already done for all other types of resources, but not
for styleable (or the constants for the styleable array indices).

This fixes this. This only affects the SDK as this is used by the
SDK toolchain only.

Change-Id: Idfc2f7915be2b0e88590f38fd660610ffc7e160c
2013-04-12 16:02:54 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Nick Kralevich
1bcc3d691f aapt: add support for optional uses-permission
Applications can request a permission with android:required="false".
For example:

<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false" />

Make aapt understand such permissions.

Bug: 8522021
Change-Id: I7d3af64e7c3eca608316d5bea19c4ea639dd2b7a
2013-04-03 16:32:40 -07:00
Dianne Hackborn
ec559ff78c Fix typo.
Change-Id: I71c8458e02dc9b9a4c59e51ded37b57a930038f9
2013-02-25 15:42:07 -08:00
Dianne Hackborn
56a2301c7a Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!
Change-Id: Ib05a2eb6a03db50074805a437a3639a7d10684a0
2013-02-12 15:41:49 -08:00
Justin Koh
73d94a30a2 am ba1992f8: Merge "Remove doSingleCrunch call DO NOT MERGE" into jb-mr1-aah-dev
* commit 'ba1992f8e9e50ca58f007ff528d2f6d2c2b18223':
  Remove doSingleCrunch call DO NOT MERGE
2013-01-16 16:21:28 -08:00
Justin Koh
3944abbb50 Remove doSingleCrunch call DO NOT MERGE
Remove doSingleCrunch call as it's breaking jb-mr1-aah-dev.

Change-Id: I0d8ee55344792fd868e74e07f31641a85e71168a
2013-01-16 14:51:29 -08:00
Xavier Ducrohet
b7de2194d5 resolved conflicts for merge of c71c678e to master
Change-Id: I9e1a6a1151af00f0a13e2010776276b240e0ac3a
2013-01-15 16:41:29 -08:00
Xavier Ducrohet
c71c678e9b am a4e10cc7: am 6080cc5f: resolved conflicts for merge of dd52dfed to jb-mr1.1-ub-dev
* commit 'a4e10cc746caea514216f436e2065b3bbefb25ef':
  Fix the single crunch command to return the right error code.
2013-01-15 14:50:37 -08:00
Xavier Ducrohet
a4e10cc746 am 6080cc5f: resolved conflicts for merge of dd52dfed to jb-mr1.1-ub-dev
* commit '6080cc5fd7c332c79098a50605c0c37d99d4c481':
  Fix the single crunch command to return the right error code.
2013-01-15 14:48:02 -08:00
Xavier Ducrohet
6080cc5fd7 resolved conflicts for merge of dd52dfed to jb-mr1.1-ub-dev
Change-Id: I839981af97e54c39f0ea0b8141a4dd02959263a0
2013-01-15 14:24:56 -08:00
Xavier Ducrohet
c75d3f5c10 Fix the single crunch command to return the right error code.
Casting from status_t to int doesn't work for return values
if the lower 8 bits are all 0.

Change-Id: I88e910dfe46cb72acd1595352e71da3c8eff4ca9
2013-01-15 10:37:20 -08:00
Xavier Ducrohet
22d7cf239d Add single crunch command to aapt. do not merge.
Previously the crunch command would work on a full res folder
and output a full res folder (with only the drawables). This
was only used in the SDK.

The incremental logic is moved to the SDK build system so we
change the crunch command (or rather add a new one) to only
crunch a single file.

(cherry picked from commit b1f6ad82dd8d1702617a757a88430604b3131fac)

Change-Id: I3653f67ee321eac37cb8a6d228b1ef6d104ff0be
2013-01-02 15:41:52 -08:00
Xavier Ducrohet
b1f6ad82dd Add single crunch command to aapt.
Previously the crunch command would work on a full res folder
and output a full res folder (with only the drawables). This
was only used in the SDK.

The incremental logic is moved to the SDK build system so we
change the crunch command (or rather add a new one) to only
crunch a single file.

Change-Id: I635ee3e871d035b9db2fb593802d914e48241abf
2013-01-02 10:30:25 -08:00
Christopher Tate
fac7b0a603 am 5f958e9b: am 67b38c44: Cache resource ID lookups in aapt
* commit '5f958e9bfc793b3b653dfc88418bbd7745e633e1':
  Cache resource ID lookups in aapt
2012-11-29 10:58:26 -08:00
Christopher Tate
67b38c44e8 Cache resource ID lookups in aapt
This speeds up certain workloads considerably, particularly
those involved in buildling apps via the SDK.  Windows-based
use should particularly benefit from the change.

(cherry picked from commit d8dde13a63565dcd72bcf03a5088407b737ba793)

Change-Id: I33835bc64ade77688d41e8bfcd371b0a5f59d8fd
2012-11-28 15:32:46 -08:00
Christopher Tate
d8dde13a63 Cache resource ID lookups in aapt
This speeds up certain workloads considerably, particularly
those involved in buildling apps via the SDK.  Windows-based
use should particularly benefit from the change.

Change-Id: I29f4b3a77400b201ee219729cc28a5e359c0c5e8
2012-11-27 18:28:49 -08:00
Xavier Ducrohet
0122a3db31 Fix writing text version of styleable IDs. do not merge.
(cherry picked from commit d16047434bca24b2811de7ea9d22de6ee0f87f79)

Change-Id: Ic679080d5157daf77c35516c8f682bd13e2b4d96
2012-09-26 11:14:50 -07:00
Xavier Ducrohet
05113163a9 am 253f7635: am fb34490f: Merge "Fix writing text version of styleable IDs."
* commit '253f76357dc9acdb329f321190eca4f0b049b4af':
  Fix writing text version of styleable IDs.
2012-09-26 10:46:46 -07:00
Xavier Ducrohet
253f76357d am fb34490f: Merge "Fix writing text version of styleable IDs."
* commit 'fb34490f4dca7aac623fb9a80fe9a2371107a786':
  Fix writing text version of styleable IDs.
2012-09-26 10:44:22 -07:00
Xavier Ducrohet
d16047434b Fix writing text version of styleable IDs.
Change-Id: I3f2614689a597de3fd46628c020cf649a808c82f
2012-09-26 10:11:54 -07:00
Xavier Ducrohet
a41d5db235 am 79c95c3b: am 5de96035: am 31820a35: Merge "Add --output-text-symbols option to aapt."
* commit '79c95c3b50ff332f9c92430fd10a15eb648a0b02':
  Add --output-text-symbols option to aapt.
2012-09-17 12:08:36 -07:00
Xavier Ducrohet
9ff22e41d0 am 8a67598e: am cc9747ed: am d7252571: Merge "Add --error-on-failed-insert option to aapt."
* commit '8a67598eb780560b7efe4e1d9944c7cbcf83bbb1':
  Add --error-on-failed-insert option to aapt.
2012-09-17 12:08:29 -07:00
Xavier Ducrohet
5de9603529 am 31820a35: Merge "Add --output-text-symbols option to aapt."
* commit '31820a35b2cf864a8dcb71d43e6fd21d54f49a2d':
  Add --output-text-symbols option to aapt.
2012-09-17 12:03:19 -07:00
Xavier Ducrohet
cc9747ed45 am d7252571: Merge "Add --error-on-failed-insert option to aapt."
* commit 'd72525718ea7ef3e1f97cf557365b143c8919a5b':
  Add --error-on-failed-insert option to aapt.
2012-09-17 12:03:12 -07:00
Xavier Ducrohet
f5de650ff1 Add --output-text-symbols option to aapt.
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).

Change-Id: I4db959fec372cf3ead9950e4b2b82fa1ae7eed2d
2012-09-11 18:19:00 -07:00
Xavier Ducrohet
7714a2429b Add --error-on-failed-insert option to aapt.
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.

Change-Id: I8938ec1238da407a8562c974e9598db39001ffd9
2012-09-11 18:17:22 -07:00
Elliott Hughes
e3e5349874 am 61d09810: am 3150feef: am bfe1ab82: Merge "Fix aapt to get expat header files from the approved location."
* commit '61d09810a7b478810adc15af2495136255377e25':
  Fix aapt to get expat header files from the approved location.
2012-09-09 16:13:11 -07:00
Elliott Hughes
3150feef0b am bfe1ab82: Merge "Fix aapt to get expat header files from the approved location."
* commit 'bfe1ab825731d365fef169deab646d7ceeafc998':
  Fix aapt to get expat header files from the approved location.
2012-09-09 16:09:15 -07:00
Elliott Hughes
ee15e15475 Fix aapt to get expat header files from the approved location.
Change-Id: Ic7c796e048cfe98ee355c18b3708fee5ea716e2e
2012-09-09 14:45:32 -07:00
Fabrice Di Meglio
8a802dbdab 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"

Change-Id: Id43e948103707e09bef63ebd54ac1779dde58e72
2012-09-06 11:13:24 -07:00
Fabrice Di Meglio
5f79799939 Add support for "-rtl" in resources
- fix bug #7035019 Need to have "-rtl" support for Resource

Change-Id: Ic82145c2ac672729d8a6c695a5f343276a1a0a2c
2012-08-23 14:55:33 -07:00
Jean-Baptiste Queru
c1c55afb47 am e67f8c8c: Merge "Normalize output from aapt d xmltree"
* commit 'e67f8c8c279e20fff5f426eccd062b709e6280ed':
  Normalize output from aapt d xmltree
2012-08-08 12:01:35 -07:00