Commit Graph

5662 Commits

Author SHA1 Message Date
TreeHugger Robot
8cd22b7cfe Merge "AAPT2: Fix multi APK output" 2017-08-30 17:09:54 +00:00
TreeHugger Robot
d1ae6e2bf4 Merge "AAPT: Dump badging should pickup strings from the right package" 2017-08-30 17:02:38 +00:00
Adam Lesinski
123a19bc3a Merge "AAPT2: Fixup namespace implementation" 2017-08-29 17:32:24 +00:00
Colin Cross
f6756d603b Merge "Use guava 21.0" am: edb2e0c722 am: f1c99fb47f am: a119b38d9e
am: fde2fcaaa0

Change-Id: I6658192a8434d908dd237207fe6e6ab5e2dff08e
2017-08-29 00:53:20 +00:00
Colin Cross
fde2fcaaa0 Merge "Use guava 21.0" am: edb2e0c722 am: f1c99fb47f
am: a119b38d9e

Change-Id: If9ac959f83de3627ff9950ee727acb3ab07c7b9c
2017-08-29 00:38:13 +00:00
Colin Cross
f1c99fb47f Merge "Use guava 21.0"
am: edb2e0c722

Change-Id: Icf8873b268677a631659a7ee0f7816495f6acd38
2017-08-29 00:03:24 +00:00
Michael Wright
1a6585fc20 Merge "O MR1 is API 27" into oc-mr1-dev am: d489d122f4
am: 800af77f9c

Change-Id: If3e76e14e60573d8f2e188abd95e3ef634eda3a2
2017-08-26 02:53:45 +00:00
Michael Wright
800af77f9c Merge "O MR1 is API 27" into oc-mr1-dev
am: d489d122f4

Change-Id: I7e4e4a710ce874502b1e749a9892e46619a988df
2017-08-26 02:41:46 +00:00
Adam Lesinski
3b8e9e2468 AAPT: Dump badging should pickup strings from the right package
A bug in the dump badging command caused strings to be looked up in the
first loaded package only.

Bug: 64948230
Test: none
Change-Id: Ia804777fe3f963004a5c053129ef6e0c94b7f6a3
2017-08-25 17:29:47 -07:00
TreeHugger Robot
3f65d09936 Merge "Add checks for Kotlin keywords and operator functions." 2017-08-25 23:57:59 +00:00
Colin Cross
3b0ea225ab Use guava 21.0
guava 20.0 is being removed.

Test: m -j checkbuild
Change-Id: I48ac4f641da3567985339c061dad5d60829aeee0
2017-08-25 11:27:46 -07:00
Adam Lesinski
43f6f77a72 AAPT2: Change the daemon mode to be line based
Accept a set of arguments separated by newlines.
This avoids path separator conflicts with the argument
format for passing splits.

Test: manual
Change-Id: Ia68122cb77b7dde2292a0fd953e79f02996ac01c
2017-08-25 14:20:24 +01:00
TreeHugger Robot
159d677664 Merge "AAPT2: Fix regression in Manifest.java permissions" 2017-08-24 19:54:02 +00:00
TreeHugger Robot
c706588091 Merge "AAPT2: better error handling for daemon mode" 2017-08-24 19:41:53 +00:00
Shane Farmer
3d66afe208 AAPT2: Fix multi APK output
- Ensure that the output directory exists before generating APKs
- Only use the file name (and not the path) for creating output
  file names

Test: manually ran optimize command

Change-Id: I5f5ecb5dcec4d17cdbca5709f2dd17e6d53df986
2017-08-24 11:35:09 -07:00
Yi Jin
ebec2b8639 Merge "Implement PII stripper in incidentd, part 1" 2017-08-24 18:24:36 +00:00
Izabela Orlowska
4a4ebe25f4 AAPT2: better error handling for daemon mode
Test: manual
Change-Id: Ia1997800ad94f386dbbb4195011395ecee1ba91f
2017-08-24 16:19:45 +01:00
Yi Jin
0ed9b68a3f Implement PII stripper in incidentd, part 1
1. automatically parse privacy options and generate lookup table
2. create FdBuffer iterator API in order to remove dependency on Reporter.h

Bug: 64687253
Test: Unit test for iterator API, and manually tested lookup table
Change-Id: I1ea376a4481fc4afc7bdf447936f767b63690fd3
2017-08-23 18:13:01 -07:00
TreeHugger Robot
e605167e0d Merge "AAPT2: Define intermediate compiled XML proto" 2017-08-23 21:27:51 +00:00
Michael Wright
eec01ac5a3 O MR1 is API 27
Bug: 64982450
Test: manual
Change-Id: I4be170f9f1021899db3ef0bce3eaeada21f8b475
2017-08-23 13:49:14 -07:00
Adam Lesinski
4ffea04064 AAPT2: Define intermediate compiled XML proto
This proto format is meant to encapsulate more information
that is specific to Android and allows for easier validation
and manipulation across tools.

Test: make aapt2_tests
Change-Id: I13bc34a460671fc0a36246be0d287a3d37d244d6
2017-08-23 11:54:38 -07:00
Adam Lesinski
1ef0fa9d72 AAPT2: Fixup namespace implementation
A few pieces were missing in the namespace mangling implementation.
Namespace aware libraries now work, along with R class generation.

Bug: 64706588
Test: make AaptTestNamespace_App
Change-Id: I12f78d6aa909e782c0faf7ceaa36058f2e6c864a
2017-08-23 11:30:54 -07:00
Jake Wharton
9e6738f101 Add checks for Kotlin keywords and operator functions.
Test: Ran against current.txt and observed warnings.
Change-Id: I071d564885be3a0c97bca77d93c9a107ecde583c
2017-08-23 14:22:31 -04:00
TreeHugger Robot
d714a97464 Merge "AAPT2: Add a daemon mode" 2017-08-22 00:44:48 +00:00
Adam Lesinski
448a15c84f AAPT2: Add a daemon mode
Gradle and other build tools that need to frequently interact with aapt2
can use the daemon mode to issue regular CLI commands without paying
the process start cost for each invocation.

Test: manual
Change-Id: I543858ed46496278bad643f0dae688c924ec6c3f
2017-08-21 15:38:53 -07:00
Adam Lesinski
d73dbd93b0 Merge "AAPT2: Fix mkdirs implementation" 2017-08-21 19:58:42 +00:00
Adam Lesinski
f852dd0eb8 AAPT2: Fix regression in Manifest.java permissions
Permissions defined with the same leaf name emit the same
string symbol, which causes collisions. AAPT would override
the symbol with the last one seen.

Do the same thing as AAPT, but emit a warning.

Bug: 64472942
Test: make aapt2_tests
Change-Id: I17b9dc7e8d8bd80db98869394c93695cb453bebd
2017-08-19 08:40:33 -07:00
Adam Lesinski
940f49f5db AAPT2: Fix mkdirs implementation
Once switched to using std::string, the mkdirs implementation was
trying to create an empty string when an absolute file path on
linux or macOS was used.

Bug: 62336414
Test: manual
Change-Id: I52f3050b410a923ca48f353b0983667c16d00ee8
2017-08-18 19:33:03 -07:00
Yi Jin
822885d2cc Merge "Automatically generate section_list.cpp file from incident.proto with the SectionFlags field annotations" 2017-08-18 00:55:53 +00:00
Yi Jin
f860184599 Automatically generate section_list.cpp file from incident.proto
with the SectionFlags field annotations

Bug: 64728679
Test: tested manually on device
Change-Id: I5b067b09cd6ccc3528f0845d7290cc9e2bc63a07
2017-08-17 15:04:21 -07:00
Adam Lesinski
2def7dcf22 Merge "AAPT2: Change XmlDom to exclude Namespace as a node" 2017-08-17 17:43:53 +00:00
Adam Lesinski
6b37299129 AAPT2: Change XmlDom to exclude Namespace as a node
In preparation for exporting an XML proto format for UAM to consume,
this change brings the XML DOM API more in line with other APIs that
do not make the Namespace a separate node.

Treating Namespace declarations as just properties of an Element
node makes the implementation of algorithms much simpler, as
the constraints that Namespace nodes have only one child
are now built in and traversing to find Element nodes
is much simpler.

Also made a bunch of quality of life improvements, like formatting and
comment style.

Test: make aapt2_tests
Change-Id: Ib97ff1c4252b7907e2cc1f13a448dc4ca3b809a4
2017-08-17 17:43:08 +00:00
Shane Farmer
0a5b201156 AAPT2: Add a APK filtering.
Allow resource files to be removed from the final artifact based on the
density and locale configuration in the config file. The APK is split
along the density, locale and ABI axis. Each split is generated from the
original APK without modifying the original. The new resource table is
written back to the file system with unneeded assets etc removed.

Test: Unit tests
Test: Manually run optimize command against an APK and inspect results
Test: Installed split searchlite APK (after resigning) and ran on N6

Change-Id: If73597dcfd88c02d2616518585d0e25a5c6a84d1
2017-08-16 19:19:54 +00:00
Adam Lesinski
38ef937bad Merge "AAPT2: Make sure to fail when XML linking fails" 2017-08-15 18:33:47 +00:00
Steven Moreland
4126f4651f Merge "Revert "aapt2_jni: use proper nativehelper headers"" into stage-aosp-master am: e59c1b1b50 am: bc6d35e698
am: 8e22616fb8

Change-Id: Ie23fe137a0cc6df2be34c1c57bb550631654d61b
2017-08-12 03:44:52 +00:00
Steven Moreland
39c5f424b4 Merge "aapt2_jni: use proper nativehelper headers" into stage-aosp-master am: e17aa09136 am: 1c7ae6507e
am: 5c65590564

Change-Id: Ie3c13f03658a2a5ac8fae7edadb4833b86716386
2017-08-12 03:32:29 +00:00
Yi Jin
f32af48069 Fix parsing enum types in incident report tool as well as adding
some additional loggings

Test: manually flashed to device and test calling IncidentManager.java
functions
Change-Id: I69610414edde865b20ba632837f037fbe43f99db
2017-08-11 17:28:12 -07:00
Steven Moreland
8e22616fb8 Merge "Revert "aapt2_jni: use proper nativehelper headers"" into stage-aosp-master am: e59c1b1b50
am: bc6d35e698

Change-Id: Ida9cc1c9c2a64920ce094f2305e2e7bc1abaec1b
2017-08-11 22:17:51 +00:00
Steven Moreland
5c65590564 Merge "aapt2_jni: use proper nativehelper headers" into stage-aosp-master am: e17aa09136
am: 1c7ae6507e

Change-Id: I31224c1a0bef8074c4d569137b3134d28039ee58
2017-08-11 22:06:57 +00:00
Steven Moreland
e59c1b1b50 Merge "Revert "aapt2_jni: use proper nativehelper headers"" into stage-aosp-master 2017-08-11 21:41:00 +00:00
Steven Moreland
fe028b0d0f Revert "aapt2_jni: use proper nativehelper headers"
This reverts commit 8eebd694e5.

Reason for revert: TH skipped PS run

Change-Id: Iab0e71d985819880146476ba3648e8b94201a839
2017-08-11 21:38:39 +00:00
TreeHugger Robot
e17aa09136 Merge "aapt2_jni: use proper nativehelper headers" into stage-aosp-master 2017-08-11 21:35:31 +00:00
Steven Moreland
8eebd694e5 aapt2_jni: use proper nativehelper headers
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using aapt2_jni find headers
Bug: 63762847
Change-Id: Id51354d533bfef66ecd71f5d89599b8adc688c1f
2017-08-11 11:01:23 -07:00
TreeHugger Robot
a27ca01955 Merge "AAPT2: Forward @TestApi in resource comments to JavaDoc" 2017-08-09 18:32:13 +00:00
Adam Lesinski
49f0aa41f1 Merge "AAPT2: Fix windows unicode path issues" 2017-08-08 22:18:55 +00:00
Adam Lesinski
09f4d706d9 AAPT2: Forward @TestApi in resource comments to JavaDoc
Bug: 37894597
Test: make aapt2_tests
Change-Id: I357fb84941bfbb3892a8c46feb47f55b865b6649
2017-08-08 10:51:23 -07:00
Adam Lesinski
e2ba325d27 Merge "AAPT2: Fix typo in Config parsing" 2017-08-08 17:41:00 +00:00
TreeHugger Robot
1c9f0fb7ec Merge "AAPT2: Change proto format to reduce usage of StringPool" 2017-08-08 00:26:31 +00:00
Adam Lesinski
ff9914ee56 Merge "AAPT2: Add targetConfig to AndroidManifest.xml" into oc-mr1-dev
am: a5fc11d78e

Change-Id: Id751b5a4c087fa062a31e88e153302a326fe34a8
2017-08-07 22:28:43 +00:00
Adam Lesinski
e5ebdc3c97 Merge "AAPT2: Ensure style strings are always first in StringPool" into oc-mr1-dev
am: 0dcfee3154

Change-Id: Id820dff95bf26f0186f64b31a14f4032bd3f76ec
2017-08-07 22:25:35 +00:00