Commit Graph

6407 Commits

Author SHA1 Message Date
Chih-hung Hsieh
51025d638d Merge "Allow implicit-fallthrough warnings locally." am: 36afe11a64 am: 9c5738238d
am: 469705cca4

Change-Id: I4bc5f389495ed535762438632e65ccd6c66f3739
2018-10-25 17:58:17 -07:00
Marco Nelissen
6baf5e4e1c Merge "Don't try to compress opus resources" 2018-10-25 19:39:11 +00:00
Marco Nelissen
18f16d6241 Don't try to compress opus resources
Test: build

Change-Id: Ibf398b3afca02d4111d88b126c8d107ac44068a6
2018-10-25 08:31:19 -07:00
Yao Chen
bbdd67d19f Allow atoms to log fields in bytes format.
There are an increasing number of requests to log data in complex format to statsd, while the data
is not expected to be parsed or aggregated by statsd and only to be uploaded as events.

Instead of making an exception for each of these cases in a hard coded way, this CL add a feature to
annotate these field in atoms.proto and the stats-log-api-gen tool will produce byte array
interfaces for them.

Note that log_msg does not have byte array type, and only has string type, when statsd receives the
log, these fields are in string type. Only when the atom is written to proto, we will check if this
field should be bytes field and write it to protobuf in message format.

Change-Id: If53dd95c5826710c76d7fe982bf951a435dfc738
Fix: 118386797
Test: unit test & manual test
2018-10-24 13:12:13 -07:00
Chih-Hung Hsieh
e8abd06776 Allow implicit-fallthrough warnings locally.
It will be a global error by default.

Test: make checkbuild
Bug: 112564944
Change-Id: I26616fd50ccf3639fa7c01d850a14d079273ede7
Exempt-From-Owner-Approval: do not block on new warnings
2018-10-22 09:56:12 -07:00
Mathew Inwood
061b522b91 Merge "Merge hidden API metadata into a single CSV file." am: 5037a7eb93 am: 3ffa1cad11
am: 92b1736e66

Change-Id: I55b39b42411e93adf2716bf59ef15eb5981f526a
2018-10-18 08:23:01 -07:00
Ryan Mitchell
67f94b4002 Merge "Fix incorrect proto apk loading" 2018-10-17 23:53:04 +00:00
Mathew Inwood
3ffa1cad11 Merge "Merge hidden API metadata into a single CSV file."
am: 5037a7eb93

Change-Id: I0efce89576b0ca7ae90d49de3455466a866521de
2018-10-17 10:35:39 -07:00
Ryan Mitchell
ec74f2fbd5 Fix incorrect proto apk loading
If a proto apk is missing resources.pb, AAPT2 would fail to detrmine the
apk format because of an incorrect check. This fixes that check and
removes the checking fuction from the LoadedApk header.

Bug: 117820549
Test: removed resources.pb from proto apks and confirmed that loading in
apks still works

Change-Id: If3628a821e7b59c7dfcbefb502b6080be083cec1
2018-10-17 09:30:01 -07:00
Mathew Inwood
5037a7eb93 Merge "Merge hidden API metadata into a single CSV file." 2018-10-17 09:20:04 +00:00
Dan Willemsen
9ad6ab595d Merge "Stop using DIST_DIR directly, use dist-for-goals instead" am: a8f2601d28 am: 9b767e275e
am: fa5b204029

Change-Id: Ic052f5d1de317c2f271f5a2df83c733c79978679
2018-10-16 18:01:26 -07:00
Dan Willemsen
9b767e275e Merge "Stop using DIST_DIR directly, use dist-for-goals instead"
am: a8f2601d28

Change-Id: Iabb2ddb086dda71887c3d50152db50f813c9556a
2018-10-16 17:43:35 -07:00
Treehugger Robot
a8f2601d28 Merge "Stop using DIST_DIR directly, use dist-for-goals instead" 2018-10-17 00:18:07 +00:00
Paul Duffin
043424db98 Merge "Fix issue with sort_api.sh" am: f943c52105 am: 66e9d98618
am: 1a73c07ab4

Change-Id: I214977be62710e359839acd25fda1b22d7f043f8
2018-10-16 10:41:54 -07:00
Paul Duffin
66e9d98618 Merge "Fix issue with sort_api.sh"
am: f943c52105

Change-Id: I196e57f5d5f96e5f5e1885e893be21ae81b75207
2018-10-16 10:10:45 -07:00
Paul Duffin
c78bea41c6 Fix issue with sort_api.sh
Should use -ne not -neq.

Test: run script manually
Bug: 115609023
Change-Id: I337ed43be1f9250e6c2b2c88d97c68a5c9e8941c
2018-10-16 14:30:01 +01:00
Mathew Inwood
0085baa159 Merge "Add new "max-sdk-p blacklist"." am: adbc7dfc28 am: f0a45a4114
am: 94db534287

Change-Id: Ie0e9cfd4d0f0eff82736741a768f607872589244
2018-10-16 06:10:51 -07:00
Mathew Inwood
f0a45a4114 Merge "Add new "max-sdk-p blacklist"."
am: adbc7dfc28

Change-Id: Ice435ecdef532f3d25b705cc734773deba84322f
2018-10-16 05:38:00 -07:00
Mathew Inwood
ea14c0c36f Merge hidden API metadata into a single CSV file.
Add a python script to merge the CSV files, dealing with the fact that the
source columns may differ due to the annotation properties present in the
source.

Add this new file and the existing greylist.txt files as dependencies of
the 'dist' target, so that they appear as artifacts on the build server.
This allows them to be processed later by reading them from the build
server.

Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
Bug: 117314178
Change-Id: Ib9e5da90e4c32333a3f4f02ee7f159f77086ae5e
2018-10-16 12:12:27 +01:00
Mathew Inwood
50dea42729 Add new "max-sdk-p blacklist".
This will contain greylist entries accessible by apps with a
targetSdkVersion of less than Q. Currently empty, will be populated in
follow up CLs.

For now, these APIs are just merged into the light greylist at build time,
pending support in the runtime for implementing the correct runtime
behavior.

Also fix a bug in sort_api.sh so it deals with empty API lists
correctly.

Bug: 115609023
Test: m
Change-Id: I213874062f393f96d120648a934ae5ad7aba93af
2018-10-15 16:38:12 +01:00
Yangster-mac
b6b77c6fb4 Make state atom field annotation name consistent between google3 and android.
Test: statsd test
Fix: b/117681672

Change-Id: I3b0145516c594cc23565df67acc1cfa9f79d306e
2018-10-13 10:40:09 -07:00
Ryan Mitchell
d4bf08501a Merge "Preserve compression of xml files in convert" 2018-10-12 16:42:34 +00:00
Ryan Mitchell
05aebf46b4 Preserve compression of xml files in convert
Respect the compression the original compression of xml files when using
aapt2 convert. Uncompressed files should remain uncompressed, and
compressed files should remain compressed.

Bug: 117289326
Test: manual
Change-Id: I81b431b4a4abd81f5694ea7dc3b3c6ec8c13ca32
2018-10-11 17:14:29 -07:00
Ryan Mitchell
6ffa32f13d AAPT2: Add the rest of supported manifest elements
am: 00d5548355

Change-Id: I9c8002d2891d762e579d0d987bb52856fb20df17
2018-10-10 16:06:48 -07:00
Ryan Mitchell
840beebdb4 AAPT2: Add supported manifest elements
am: 48d009ad32

Change-Id: Ib620e6c3a5ee6b4a33f4d64a9afa44302de67d7a
2018-10-10 16:00:02 -07:00
Treehugger Robot
e75f2f504e Merge changes from topic "aapt2-manifest-elements"
* changes:
  Remove workarounds for b/79755007
  AAPT2: Add the rest of supported manifest elements
  AAPT2: Add supported manifest elements
2018-10-10 22:29:57 +00:00
Mårten Kongstad
b7c0800fa0 Merge "libandroidfw: move ConfigDescription from aapt2 to libandroidfw"
am: b14c887974

Change-Id: I14be80a2d2c3620919a78da5a42ed56ec1d1737f
2018-10-09 16:04:34 -07:00
Mårten Kongstad
7672daf8e5 Merge changes from topic "idmap2-prerequisites"
am: 62a5d4249f

Change-Id: I8db3f5ba0de6510c3327273c56e9fcc75c836694
2018-10-09 16:00:31 -07:00
Treehugger Robot
b14c887974 Merge "libandroidfw: move ConfigDescription from aapt2 to libandroidfw" 2018-10-09 21:43:38 +00:00
Treehugger Robot
62a5d4249f Merge changes from topic "idmap2-prerequisites"
* changes:
  AssetManager2: optionally keep non-matching configs
  AAPT2: optionally keep resources without default value
  libandroidfw: add resource ID iterator
2018-10-09 21:43:38 +00:00
Dan Willemsen
5cc1700171 Stop using DIST_DIR directly, use dist-for-goals instead
As a preparation in refactoring how we handle dist, I'm making
everything use dist-for-goals. In this case, instead of fully relying on
a phony rule, write the gtest xml into an intermediate folder, and use
dist-for-goals to copy that into the dist dir.

Bug: 117463001
Test: DIST_DIR=dist m aapt2_run_host_unit_tests dist
Test: DIST_DIR=dist m aapt2_run_host_unit_tests dist   (reruns test)
Change-Id: I166c2b3088703875c6028c3479aec7cf09f3f635
2018-10-09 14:28:35 -07:00
Aurimas Liutikas
13e6a1dc3e Add style parents dump command.
This command prints out the parent graph of a given style

Test: out/host/linux-x86/bin/aapt2 dump styleparents \
    --style Widget.MaterialComponents.TextInputLayout.FilledBox \
    out/target/product/generic_x86/system/priv-app/SystemUIGoogle/SystemUIGoogle.apk
Change-Id: Ib2ace7e90bee6f1c4b6a184edc591b1a3993db75
2018-10-09 13:55:31 -07:00
TreeHugger Robot
1e7b9347d7 Merge "Created resuable DumpApkCommand and added "badger"" 2018-10-09 19:15:47 +00:00
Ryan Mitchell
8cf68fcac1 Merge "Add rtmitchell to AAPT2 OWNERS" am: 0d3f4e61c9 am: f1aadaf8c5
am: ca7411c0e9

Change-Id: Ie50f8397291a83194c556e7647fe071788ebcdd9
2018-10-09 10:51:55 -07:00
Ryan Mitchell
214846df59 Created resuable DumpApkCommand and added "badger"
This change refactors the dump commands to inherit from a base
DumpApkCommand and adds a command that prints out an ASCII
image of a badger if the user wrote "badger" instead of
"badging". The command is hidden from the help menu.

Bug: 73535002
Test: manual
Change-Id: I9bdd8a7bbf6a4282c4933e5c478f6d1d8e32d99e
2018-10-09 10:51:25 -07:00
TreeHugger Robot
96af49eb01 Merge "AAPT2: optionally keep resources without default value" 2018-10-09 17:32:29 +00:00
Ryan Mitchell
f1aadaf8c5 Merge "Add rtmitchell to AAPT2 OWNERS"
am: 0d3f4e61c9

Change-Id: I5285ed50123ed2fd219c6b9daa5e460c0cbdaa36
2018-10-09 10:31:54 -07:00
Mårten Kongstad
f99eda450f AAPT2: optionally keep resources without default value
Teach "aapt2 link" about a new flag --no-resource-removal. When given,
aapt2 will not filter out resources that lack default values. This is
useful mostly when building overlay packages that define resources for
non-default configurations, such as only for values-sv.

Test: manual: build package with resource only in values-vs, verify apk with aapt2 dump
Change-Id: Idc513bcb3f43bbff7f073163562c3dfccdb9bc9b
Merged-In: Idc513bcb3f43bbff7f073163562c3dfccdb9bc9b
2018-10-09 14:02:14 +00:00
Mårten Kongstad
d8d290107a AAPT2: optionally keep resources without default value
Teach "aapt2 link" about a new flag --no-resource-removal. When given,
aapt2 will not filter out resources that lack default values. This is
useful mostly when building overlay packages that define resources for
non-default configurations, such as only for values-sv.

Test: manual: build package with resource only in values-vs, verify apk with aapt2 dump
Change-Id: Idc513bcb3f43bbff7f073163562c3dfccdb9bc9b
2018-10-09 07:01:17 -07:00
Mårten Kongstad
5c541f6e36 libandroidfw: move ConfigDescription from aapt2 to libandroidfw
This is to allow idmap2 to access ConfigDescription.

Test: libandroidfw_tests
Test: aapt2_tests
Change-Id: I54210bbbd8dad5903cb7100807df977efa394ad5
Merged-In: I54210bbbd8dad5903cb7100807df977efa394ad5
2018-10-08 09:56:09 -07:00
TreeHugger Robot
6d659e8ceb Merge "libandroidfw: move ConfigDescription from aapt2 to libandroidfw" 2018-10-08 15:41:13 +00:00
Mårten Kongstad
24c9aa6541 libandroidfw: move ConfigDescription from aapt2 to libandroidfw
This is to allow idmap2 to access ConfigDescription.

Test: libandroidfw_tests
Test: aapt2_tests
Change-Id: I54210bbbd8dad5903cb7100807df977efa394ad5
2018-10-08 06:50:22 -07:00
TreeHugger Robot
b61b0e5731 Merge "Implement issue #112113117: Ad library dependency declaration in manifest" 2018-10-05 00:45:06 +00:00
Dianne Hackborn
813d7503c8 Implement issue #112113117: Ad library dependency declaration in manifest
You can now do a new form of <uses-package> that allows you to
specify a type of package along with required cert digests (like
uses-static-library).

This defines the new attribute needed for this and XML tag, and
updates aapt2 to actually allow uses-library in the manifest and
output this data with "dump badging".

While doing this I realized that "dump badging" was not printing
the data for uses-static-library or uses-library, so do those too.

Bug: 112113117
Test: manual
Change-Id: I5d02010aad9cb44675504a317df9cced421be8a1
2018-10-04 15:27:15 -07:00
Ryan Mitchell
2250c93f14 Fix badging meta-data value
Integer meta data values were not printing correctly and instead were
printing as empty strings. Attempt to retrieve the integer value of the
attribute if the value is not a string.

Bug: 117260085
Test: manual
Change-Id: I1cef672e03d07728819ca584b484dc372984c823
2018-10-04 13:15:23 -07:00
Ryan Mitchell
6d0dbbbab3 Add rtmitchell to AAPT2 OWNERS
Per talks with Svet, it is time I became a co-owner of AAPT2 with
toddke. I look forward to continuing to support and improve AAPT2.

Change-Id: I3a0f1c8a708abc41045b95dc958dbeb96a5160ff
2018-10-04 11:54:29 -07:00
Ryan Mitchell
5c5f0cdd04 Merge "Fix failing Windows tests" 2018-10-03 20:56:06 +00:00
Ryan Mitchell
8b7e1a8803 Merge "Restore Proguard behavior and add minimal flag" 2018-10-03 20:54:14 +00:00
Ryan Mitchell
0ce89734d1 Fix failing Windows tests
Some tests were not written to run on Windows correctly. Compile also
has a bug that caused using the --zip flag to fail on Windows.
iswspace does count the non breaking space as Whiespace on Windows but
not on Unix based systems

Bug: 117156986
Change-Id: I999375162bdfdf86fb25992ee88e2962ab90b577
Test: aapt2_tests and wine aapt2_tests.exe
2018-10-03 11:35:37 -07:00
Ryan Mitchell
56e559862d Merge "Use empty data if file in zip has length 0" 2018-10-02 17:23:32 +00:00