595 Commits

Author SHA1 Message Date
Adam Lesinski
4dfff4e727 am 5fa90218: am f7ffcaa7: Merge "Build the split-select tool without C++11 support" into lmp-mr1-dev
* commit '5fa9021822577f1e4676db49a6b5cb5d36e4614a':
  Build the split-select tool without C++11 support
2014-11-04 02:20:47 +00:00
Adam Lesinski
3fd340028f Merge commit '78be0498' into manualmerge
Conflicts:
	libs/androidfw/ResourceTypes.cpp
	tools/aapt/Android.mk
	tools/aapt/StringPool.cpp
	tools/aapt/StringPool.h

Change-Id: I9d69efdfb892032895ace12159d193304f02dc6c
2014-11-03 18:06:22 -08:00
Adam Lesinski
f7ffcaa7a4 Merge "Build the split-select tool without C++11 support" into lmp-mr1-dev 2014-11-03 23:38:56 +00:00
Adam Lesinski
c3dc0b57b8 Build the split-select tool without C++11 support
It was complicated to get the tool building on Windows, Linux,
and OSX with C++11 support.

OSX uses Clang to build C++11 binaries, which requires the libc++
standard library. Since most of the dependencies of this program
are built against libstdc++, this was difficult to resolve.

Now we build without C++11 support.

Change-Id: I4e537c113734508a8f480a1c402ed237de4f0e60
2014-11-03 12:09:58 -08:00
Adam Lesinski
4bf58108d4 Fix issues that will be present in C++11
- char16_t is a distinct type, so stay consistent
  with it throughout the code base.
- char16_t is defined as minimum size of 16 bits.
  Since we mmap and cast data structures onto raw memory,
  we need a precise definition (uint16_t), so we cast between
  that (and static_assert that they are the same size).

Change-Id: I869c32637543bbcfb39d2643e7d9df10d33acd3c
2014-11-03 11:49:47 -08:00
Tim Kilbourn
a9aecc0c29 Merge "aapt updates for Android TV" into lmp-mr1-dev automerge: 6af7d76
automerge: 181c18e

* commit '181c18efd438f7a5e8cc18327367c49bf51795be':
  aapt updates for Android TV
2014-10-24 21:24:59 +00:00
Tim Kilbourn
d9b1cad71e aapt updates for Android TV
- Output whether an app claims to be a game (android:isGame)
- Output android:banner if it is specified at the application level.

Change-Id: I7118b524f62cdfc4effeef21b32b3cdd814d9bfa
2014-10-24 12:59:24 -07:00
Adam Lesinski
08d1c80847 Merge commit 'cd8442d4' into manualmerge
Conflicts:
	tools/aapt/ResourceIdCache.cpp

Change-Id: I5341d47ed0fe891d6fefb174f644e636ce966eb8
2014-10-23 14:55:57 -07:00
Adam Lesinski
40e8eefbed First commit of split-select tool
This tool emits a set of rules as JSON for when a Split APK
should match a target device.

Change-Id: I8bfbdfbdb51efcfc645889dd03e1961f16e39645
2014-10-23 10:39:31 -07:00
Dan Albert
11d3d1016b am 9295a135: am e40974d9: Merge "Fix an overflow found by ASAN."
* commit '9295a1354eb8220be9a0a40985253c6cdfac35c3':
  Fix an overflow found by ASAN.
2014-10-20 22:01:04 +00:00
Dan Albert
d395f79133 Fix an overflow found by ASAN.
Sometimes len is 0.

Change-Id: I031000188edc57663a5519b00cbbb751600d32f4
2014-10-20 14:45:55 -07:00
Adam Lesinski
217b17a915 am d3969d92: am 6dfe03ae: am 73a8c596: am 3f8c7dec: Merge "AAPT: Fix path for final generated resources on Windows" into lmp-dev
* commit 'd3969d927eef2f04ec097244c5f2bff5e7c0689e':
  AAPT: Fix path for final generated resources on Windows
2014-10-20 21:16:17 +00:00
Adam Lesinski
6dfe03ae6c am 73a8c596: am 3f8c7dec: Merge "AAPT: Fix path for final generated resources on Windows" into lmp-dev
* commit '73a8c5962d4d28a2e8aa6fa0b0b18e39782ee79c':
  AAPT: Fix path for final generated resources on Windows
2014-10-20 21:05:04 +00:00
Adam Lesinski
aff7c2447d AAPT: Fix path for final generated resources on Windows
Change-Id: Id11ac79b281b51747c73f90406ebd60023c54f92
2014-10-20 12:15:25 -07:00
Adam Lesinski
10db7553ec am dd64fc43: am effd416e: am 83fae208: am 3cd840f4: Merge "AAPT: Fix an issue where a resource name was incorrectly derived on Windows" into lmp-dev
* commit 'dd64fc43a6c560d3c545132adc16cd4a079f9600':
  AAPT: Fix an issue where a resource name was incorrectly derived on Windows
2014-10-17 23:12:28 +00:00
Adam Lesinski
effd416ee3 am 83fae208: am 3cd840f4: Merge "AAPT: Fix an issue where a resource name was incorrectly derived on Windows" into lmp-dev
* commit '83fae208fee402d8a6a51362f99660f9a49bd5a4':
  AAPT: Fix an issue where a resource name was incorrectly derived on Windows
2014-10-17 23:01:44 +00:00
Adam Lesinski
9306a474e1 AAPT: Fix an issue where a resource name was incorrectly derived on Windows
Calling String8::getLeaf() will assume the system's file path separator,
however the source string was already converted to a unix path.
getLeaf() would therefore not find any occurence of '\' and would
return the full path.

Bug:18036805
Change-Id: Ic2bfac0cc553406740204a296327e266b05c0eff
2014-10-17 21:46:52 +00:00
Adam Lesinski
7dd87312c9 am 87a529c8: am 12c84b5d: Merge "Minor resource notation/compatibility fixes" into lmp-mr1-dev
* commit '87a529c899045cf2785b86e4e289dd6c6cf56c1a':
  Minor resource notation/compatibility fixes
2014-10-17 20:28:47 +00:00
Adam Lesinski
9086562a6a Minor resource notation/compatibility fixes
- Change the format of mnc/mcc when printing a resource-qualifier
  formatted string from a Configuration object.
- Correctly bump the SDK to 21 when using anydpi in a resource qualifier.

Change-Id: I3c31e344dc5384d45398d6e9f264a073abab65d1
2014-10-17 01:21:50 +00:00
Jerome Dochez
b51644c3c7 am e36550dc: am 0757e5fd: am c9c512e0: am f47f8855: Merge "Added a daemon mode to aapt to receive streams of commands from gradle." into lmp-dev
* commit 'e36550dc9e202450d0921bf65d00d14e7e3e8a54':
  Added a daemon mode to aapt to receive streams of commands from gradle.
2014-10-10 23:21:01 +00:00
Jerome Dochez
f47f885517 Merge "Added a daemon mode to aapt to receive streams of commands from gradle." into lmp-dev 2014-10-10 19:21:49 +00:00
Adam Lesinski
5787920f5b am 85035d90: am b2b166a5: am 397001b2: am a80aba70: Merge "AAPT: Gate v21 resource synthesizing logging behind -v flag" into lmp-dev
* commit '85035d90257beedd54641385674ce2dfb29ae241':
  AAPT: Gate v21 resource synthesizing logging behind -v flag
2014-10-04 00:01:21 +00:00
Adam Lesinski
f15de2e215 AAPT: Gate v21 resource synthesizing logging behind -v flag
This is verbose information and should be hidden behind the -v flag.

Bug:17822471
Change-Id: I36e2c6beb54669a31cde73416427477a80ded8a6
2014-10-03 14:57:28 -07:00
Jerome Dochez
6f1280cf17 Added a daemon mode to aapt to receive streams of commands from gradle.
When crunching png, we used to spawn a separate aapt process from java
which is slow and resource intensive.
Introduced a daemon mode to appt which when invoked with -m parameter
will listen from commands on stdin and give report of command execution
on stdout.

One one command is supported so far :
s f1 f2

This command perform a single png crunch, f1 pointing to the input
png file to crunch, and f2 pointing to the path for the resulting
crunced file.

Expected output from the command is "Done" or "Error".

Change-Id: Iaf1d865e8d5ee5d36abe39dea6443715865a98d3
2014-10-02 15:43:55 -07:00
Stephen Hines
f08384c763 am 25a8e43b: am 7d92ae6d: am 5b3be618: am 70de9c0d: Merge "include direct.h for _mkdir" into lmp-dev
* commit '25a8e43b13e719ff97edd174f8b1ed175e6f91b0':
  include direct.h for _mkdir
2014-10-02 12:41:58 +00:00
Andreas Gampe
5e77475b5d am 152d9aae: am 31629651: Merge "Frameworks/base: Fix more aapt issues"
* commit '152d9aae631381ea28f5701168d372a1486a7502':
  Frameworks/base: Fix more aapt issues
2014-10-02 12:31:16 +00:00
Andreas Gampe
87332a7109 resolved conflicts for merge of 1dcc75b2 to lmp-mr1-dev-plus-aosp
Change-Id: I8f7cbd971beae3ab134195e612d705860665142f
2014-10-01 23:26:06 -07:00
Andreas Gampe
b8dc7bc582 Frameworks/base: Fix more aapt issues
Change-Id: I6da7dc674e9f9e3b0886a3cfd1e3194d6b5ac948
2014-10-01 20:42:00 -07:00
Andreas Gampe
2412f84064 Frameworks/base: Fix AAPT warnings
Turn on -Wall -Werror. Fix warnings.

Change-Id: I287fb3c1e851c654479bcf9ea8c73bd354a6b2a1
2014-10-01 16:18:06 -07:00
Dan Albert
47c23a228d resolved conflicts for merge of fe50cfd5 to lmp-mr1-dev-plus-aosp
Change-Id: Id09c2786db18fa7e747cd1652ea95f575c3f5c46
2014-10-01 13:52:49 -07:00
Dan Albert
0de19adc80 Use std::sort instead of qsort_r wrapper.
The HAVE_(BSD|GNU)_QSORT_R in AndroidConfig.h has never worked, and we
should just be using something standard anyway.

Change-Id: I784d6212f6c890a11c4af2f83d1ce2d279708652
2014-10-01 11:34:17 -07:00
Andrew Hsieh
c9d32390e5 include direct.h for _mkdir
Bug: 14416410

The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 no longer
declares _mkdir in io.h.

Change-Id: I624b52d2f35db54a7f28df09f997fc883b0f0557
2014-09-30 02:28:05 -07:00
Adam Lesinski
61b8bfa5d3 am a196e203: am 98e858b1: am 581dfee1: am 0a6c5ea4: Merge "AAPT: Fix issue with synthesized resource not actually showing up" into lmp-dev
* commit 'a196e203076cb810a21a702b41f6a1d82d029318':
  AAPT: Fix issue with synthesized resource not actually showing up
2014-09-26 05:03:49 +00:00
Adam Lesinski
978ab9d929 AAPT: Fix issue with synthesized resource not actually showing up
AAPT keeps around a few pieces of state that are disjoint, so
simply adding to a collection won't add the resource to the final
flattened output. Instead, we create the resource from the top
and then copy over the values into the newly created resource.

Bug:17647890
Change-Id: I214263e84c18f9370c6e6a5aa53aa2d833fc842d
2014-09-24 19:02:52 -07:00
Adam Lesinski
dc03c9f292 am d4e5b601: am 37e3df38: am 1aa4db07: am 81745c51: Merge "AAPT: Continuation of public/private attribute fix" into lmp-dev
* commit 'd4e5b601c7da5c662d8cf9c46177810fdeeed23f':
  AAPT: Continuation of public/private attribute fix
2014-09-22 19:45:27 +00:00
Adam Lesinski
e572c011fe AAPT: Continuation of public/private attribute fix
XML files like layouts are now scanned and checked
for v21 attributes. If those kinds of attributes
are found, then we remove them in the original
version and synthesize a new xml file under the
v21 configuration.

Bug:17520380
Change-Id: Icf984cb96134180a2e35349c1dbf2cef9a8f0bda
2014-09-22 10:51:20 -07:00
Dan Albert
8ab25d82b5 resolved conflicts for merge of 1a4527ce to lmp-mr1-dev-plus-aosp
Change-Id: If649bd9ef98181a1e1e341cc5b73d237586fb72c
2014-09-19 16:13:49 -07:00
Adam Lesinski
0fa7511db2 am 9ee3ba23: am e7e9ad6d: am 863b1a90: am 19f9d54f: Merge "Fix backwards compat problem with AAPT public attrs" into lmp-dev
* commit '9ee3ba23395bd1a13bbfd3fe523ee611a5ca001b':
  Fix backwards compat problem with AAPT public attrs
2014-09-19 19:08:50 +00:00
Adam Lesinski
82a2dd8efe Fix backwards compat problem with AAPT public attrs
AAPT has traditionally assigned resource IDs to public attributes,
and then followed those public definitions with private attributes.

--- PUBLIC ---
| 0x01010234 | attr/color
| 0x01010235 | attr/background

--- PRIVATE ---
| 0x01010236 | attr/secret
| 0x01010237 | attr/shhh

Each release, when attributes are added, they take the place of the private
attributes and the private attributes are shifted down again.

--- PUBLIC ---
| 0x01010234 | attr/color
| 0x01010235 | attr/background
| 0x01010236 | attr/shinyNewAttr
| 0x01010237 | attr/highlyValuedFeature

--- PRIVATE ---
| 0x01010238 | attr/secret
| 0x01010239 | attr/shhh

Platform code may look for private attributes set in a theme. If an app
compiled against a newer version of the platform uses a new public
attribute that happens to have the same ID as the private attribute
the older platform is expecting, then the behavior is undefined.

We get around this by detecting any newly defined attributes (in L),
copy the resource into a -v21 qualified resource, and delete the
attribute from the original resource. This ensures that older platforms
don't see the new attribute, but when running on L+ platforms, the
attribute will be respected.

We still need to address this problem in the platform moving forward,
as this will only help us in the transition from pre L to L.

Bug:17520380
Change-Id: Ia2a985798b50006c21c7c3431d30d9598f27cd91
2014-09-18 14:05:24 -07:00
Dan Albert
88ba339aef Clean up makefile cruft.
The build system already takes care of all these things.

Change-Id: Idef80b554e07cef5e5ed2adf1b5740a76f13ef6d
2014-09-11 16:21:19 -07:00
Marcin Kosiba
0bdcb84b55 am 972628dc: am 5128e88e: Merge "Don\'t use reflection when generating the onResourcesLoaded callback." into lmp-dev
* commit '972628dc8c63b02b75f9e976b3ab67e3913da1a8':
  Don't use reflection when generating the onResourcesLoaded callback.
2014-09-11 18:49:07 +00:00
Marcin Kosiba
a0a9466476 Merge "Don't use reflection when generating the onResourcesLoaded callback." into lmp-dev 2014-09-11 18:34:33 +00:00
Marcin Kosiba
0f3a5a6559 Don't use reflection when generating the onResourcesLoaded callback.
BUG: 17466240
Change-Id: I74608f3d8b3617281639a9d387face97e15fb616
2014-09-11 16:02:13 +01:00
Adam Lesinski
017d1bdca7 am 716c7279: am 799dc748: Merge "AAPT: Don\'t crash on illegal symbol name" into lmp-dev
* commit '716c7279854318eeabad39b7bb187aa69ad41c97':
  AAPT: Don't crash on illegal symbol name
2014-09-10 00:51:15 +00:00
Adam Lesinski
3fb8c9b50e AAPT: Don't crash on illegal symbol name
We never checked the return value when adding a nested
symbol, which would be NULL if the symbol name was invalid.

External bug: https://code.google.com/p/android/issues/detail?id=75876

Change-Id: I5211f4d4b87897d52f2b6e5907113d31930bb92d
2014-09-09 16:05:10 -07:00
Dan Albert
6800165351 resolved conflicts for merge of 1d99636f to lmp-dev-plus-aosp
Change-Id: Ic5f808de7d9722056112c6a73c718892e00bc9df
2014-09-09 09:51:01 -07:00
Dan Albert
8085477fb9 Merge "Don't check for null references." 2014-09-09 16:25:41 +00:00
Dan Albert
20ec4fa229 resolved conflicts for merge of 6c585756 to lmp-dev-plus-aosp
Change-Id: I5a25f2bac44ac5efcd7462af91005e09680a1d96
2014-09-08 22:25:54 -07:00
Dan Albert
ddb605d4b2 am de86cf13: am 5a6934c0: Merge "Don\'t pollute the namespace for two uses."
* commit 'de86cf1362ef0461b589fa85bdd5c58921010c6a':
  Don't pollute the namespace for two uses.
2014-09-09 05:19:06 +00:00
Dan Albert
2ffa4aabd7 Merge "Use char16_t for char things." 2014-09-09 04:30:35 +00:00