431 Commits

Author SHA1 Message Date
Adam Lesinski
34dd2cdd41 am f2d2c871: AAPT should not process XML that failed to compile
* commit 'f2d2c871813656012420faa89080d8e3cda1f308':
  AAPT should not process XML that failed to compile
2014-05-05 21:09:49 +00:00
Adam Lesinski
f2d2c87181 AAPT should not process XML that failed to compile
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
2014-05-05 12:01:21 -07:00
John Spurlock
6c191299a7 Introduce new UI_MODE_TYPE_WATCH and qualifier.
Default ui mode to watch if we have FEATURE_WATCH.

Bug:13395758
Change-Id: Ie5ff95de60e69e91ad3612c7d2f1fca7f49061bd
2014-04-04 15:21:53 -04:00
Tim Kilbourn
b559b37150 Merge "Dump leanback info in aapt dump badging." into klp-modular-dev 2014-03-08 00:55:48 +00:00
Tim Kilbourn
0a5a5d6996 Dump leanback info in aapt dump badging.
Leanback launcher activities are reported, including the banner.

Change-Id: Ifa496736ad3ba4239ec95e166768af895ff4dc53
2014-03-07 16:47:42 -08:00
Ying Wang
74bebf6fae Exclude the host aapt and aidl from PDK build.
Bug: 13028632
Change-Id: I0f774b19be77462d0fa271088a4a5a152729d13c
2014-03-07 15:56:14 -08:00
Adam Lesinski
203356a34a Merge "Add support for multiple asset dirs (-A)" into klp-modular-dev 2014-02-04 18:31:23 +00:00
Narayan Kamath
745d4efc83 AssetManager cookies should be int32_t and not void*.
Cookies are really indices into vectors and arrays, so
they don't need to be void*. We choose int32_t instead
of size_t to allow their width to be well specified.

(cherry picked from commit ebfdd0f467e39c3af8d92cade78263935340acb7)
(cherry picked from commit a7fa2e592e2e579e5acdb903dba83fc074ebc215)
(cherry picked from commit a9d5701b034ed2d9771b3f0943e1add00741d7cd)

Change-Id: I2aed3db568b6fdc487bf99e2c5dd123206736fda
2014-01-27 11:20:24 +00:00
Adam Lesinski
09384303de Add support for multiple asset dirs (-A)
Bug: 12608034
Change-Id: I02c5a1a73b83498d799570428cca3dd914f8ac11
2014-01-23 12:43:42 -08:00
Narayan Kamath
3da645f307 Merge "Don't pseudolocalize untranslatable strings." 2013-12-18 12:46:41 +00:00
Narayan Kamath
d21752dff4 Merge "Reimplement ZipFileRO in terms of libziparchive." 2013-12-11 11:41:10 +00:00
Narayan Kamath
7e1b8ff3e1 Don't pseudolocalize untranslatable strings.
bug: https://code.google.com/p/android/issues/detail?id=63004
Change-Id: I8e47a53d887144dc867111e42313d0e113b83ea1
2013-12-10 13:37:32 +00:00
Narayan Kamath
afd31e0829 Reimplement ZipFileRO in terms of libziparchive.
This lets us share zip archive processing code with both
the runtime (Art, dalvik) and critical java code
(StrictJarFile).

This change also moves several utility methods to ZipUtils
and dedups code across several zip inflation methods.

One of the side effects of this change is that several
processing loops are now O(n) instead of O(n^2).

bug: 10193060

Change-Id: I3c7188496837a47246c4f342e45485a70fef3169
2013-12-09 16:23:16 +00:00
The Android Open Source Project
dbccd44a63 Merge commit 'b873a17ce7be0a9771c24999adca6964431728f6' into HEAD
Change-Id: I938755073e70602cc8f51ce9bd420fdcf870cecd
2013-11-22 11:18:57 -08:00
Elliott Hughes
ed84dea928 am 8f592378: am 69920427: Merge "Fix a variety of small publicly-reported bugs."
* commit '8f592378a1ea7f31d57253dc202f42707ef4da36':
  Fix a variety of small publicly-reported bugs.
2013-10-29 13:35:04 -07:00
Elliott Hughes
c367d48c55 Fix a variety of small publicly-reported bugs.
Possible NULL dereference in cmds/bootanimation/BootAnimation.cpp.
https://code.google.com/p/android/issues/detail?id=61556

Missing fclose in core/jni/android_os_Debug.cpp.
https://code.google.com/p/android/issues/detail?id=61546

Bad loop guards in core/jni/android_util_Process.cpp.
https://code.google.com/p/android/issues/detail?id=61557

Assignment to wrong variable in libs/androidfw/AssetManager.cpp.
https://code.google.com/p/android/issues/detail?id=61560

Missing delete[]s in libs/androidfw/ObbFile.cpp.
https://code.google.com/p/android/issues/detail?id=61549

Leaks on error in tools/aapt/Images.cpp.
https://code.google.com/p/android/issues/detail?id=61552

Two missing fclose calls in tools/aapt/Resource.cpp.
https://code.google.com/p/android/issues/detail?id=61553

Missing fclose in tools/aidl/aidl.cpp.
https://code.google.com/p/android/issues/detail?id=61554

Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a
2013-10-29 13:12:55 -07:00
Adam Lesinski
91b47365f6 am 16e8c4f7: am 7d292145: Merge "Prune unneeded density resources from APK" into klp-dev
* commit '16e8c4f7db87d743410751410c7f761350792fe2':
  Prune unneeded density resources from APK
2013-10-18 13:45:19 -07:00
Adam Lesinski
9438c2df13 Prune unneeded density resources from APK
When a preferred density is specified, prune all but the
closest matching density when the exact density resource does not
exist.

If a preferred density resource does not exist and a higher density
resource exists, prune all but the resource with the next highest
density relative to the preferred density.

If a preferred density resource does not exist and there is no
higher density resource, prune all but the resource with the next
lowest density relative to the preferred density.

bug:11224465
Change-Id: I99b3950fe3d8116a5625968ed383442315ae8526
2013-10-15 17:18:51 -07:00
Adam Lesinski
f2163cb0d1 am ea4e0751: am c884fc9f: Merge "AAPT emits error for res with no \'default\' product" into klp-dev
* commit 'ea4e07518cd1844b1654175ef27cf9501e0dd7eb':
  AAPT emits error for res with no 'default' product
2013-10-07 16:02:13 -07:00
Adam Lesinski
2b8e82fd51 AAPT emits error for res with no 'default' product
Rather than ignoring resources that do not match the specified
product, we keep track of the ignored ones and make sure that
some variant of the resource that matches the product was processed.

bug:10860838
Change-Id: I804cd04a053269a35b7e1c1cc743b77493337bf9
2013-10-04 15:14:09 -07:00
Adam Lesinski
4056c94adf am 0c923b7c: Merge "Add badging of Payment apps" into klp-dev
* commit '0c923b7ce1f4e40b401bcd342f4ee4399f4ad9d7':
  Add badging of Payment apps
2013-09-30 17:09:58 -07:00
Adam Lesinski
db239f91d6 am 5223a5ff: Merge "Add support for dumping new badging" into klp-dev
* commit '5223a5ff24bed6d0a0ac618083a3ed050bdd98b2':
  Add support for dumping new badging
2013-09-30 17:09:54 -07:00
Adam Lesinski
d831e80a2f Add badging of Payment apps
HCE apps that declare themselves as payment apps will receive
that badge when running aapt dump badging.

bug:10899864
Change-Id: I7c095214412465ad7a925285d6167e12de16b600
2013-09-27 11:22:46 -07:00
Adam Lesinski
b1249b822c Add support for dumping new badging
APKs with AccessibilityServices, PrintServices, and or DeviceAdmin
will have those services dumped when running 'aapt dump badging'.

bug:10899864
Change-Id: I9c1f1f36c397b128dca802510368573a54977459
2013-09-27 11:10:37 -07:00
Michael Wright
f17e8ee379 am 86974463: Merge "Added support for supports-input manifest element" into klp-dev
* commit '86974463e9e28108e14fa255efd3c429358c0605':
  Added support for supports-input manifest element
2013-09-05 18:31:04 -07:00
Michael Wright
eaeb190486 Added support for supports-input manifest element
Change-Id: Ifa7c87908081585c1940b5a47fdf5138a287d9ea
2013-09-05 18:15:57 -07:00
Chet Haase
09ed072028 am 49ee555f: Merge "Transition API changes from API council recommendations" into klp-dev
* commit '49ee555f239c79871b661e5ff135061f26665e1c':
  Transition API changes from API council recommendations
2013-09-04 16:49:39 -07:00
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
Victoria Lease
c27bc4fbb2 am adae1e91: am 1b8c33c6: Merge "Forward compatibility fixes"
* commit 'adae1e91de4b2be7a67a33e8f3c3161f5cec15e1':
  Forward compatibility fixes
2013-08-27 09:57:26 -07:00
John Reck
e982b7231f Forward compatibility fixes
Change-Id: Iaf387a10c387e5e157bb16d120a1e033b3d1a6e8
2013-08-26 16:53:40 -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