Commit Graph

5788 Commits

Author SHA1 Message Date
Adam Lesinski
c2e67f4b5c Merge "AAPT2: Ensure strings are sorted by configuration" into oc-mr1-dev am: 8da74b1bfd
am: 5fae742a1e

Change-Id: I7dfb1a020b1c3da9e0af5a7096fda0775751eab3
2017-10-19 22:23:58 +00:00
Adam Lesinski
5fae742a1e Merge "AAPT2: Ensure strings are sorted by configuration" into oc-mr1-dev
am: 8da74b1bfd

Change-Id: Ifd3555db424136fe8a8057504df414f41fb020a1
2017-10-19 21:43:31 +00:00
TreeHugger Robot
8da74b1bfd Merge "AAPT2: Ensure strings are sorted by configuration" into oc-mr1-dev 2017-10-19 21:31:10 +00:00
Donald Chai
d6912500c3 Merge "AAPT2: Sanitize resource qualifiers before using in split names." 2017-10-19 19:33:56 +00:00
Donald Chai
b8f078c9a0 AAPT2: Sanitize resource qualifiers before using in split names.
Fixes: 67960909
Test: UtilTest.SplitNamesAreSanitized
Change-Id: I9ba1b8430a00cc7ce981075a60388f275c41dbea
2017-10-18 23:58:42 -07:00
Yi Jin
6e66a2cf34 Merge "Fixed several bugs found for incidentd" 2017-10-19 00:16:54 +00:00
Adam Lesinski
8a0b238b13 AAPT2: Ensure strings are sorted by configuration
Keep strings sorted by configuration so that strings likely
to be selected (all match the same locale, for instance) are
close together.

Bug: 67958501
Test: make aapt2_tests
Change-Id: Id17d93bf2e03ce408a6f619d3ea6dc313e393b76
2017-10-18 15:12:42 -07:00
Yi Jin
22769e0123 Fixed several bugs found for incidentd
1. Add logging for proto can't be parsed by incident_report
2. Close opened file descriptor of incident report request!
3. Fix invalid syntax of auto-gen section_list.cpp

Bug: 67849582
Test: manually run incident and checks /proc/<its pid>/fd
Change-Id: I38e6ac28de09aca6243ad536ed41d8059e08ba24
2017-10-18 13:17:32 -07:00
Dan Willemsen
aeff5b880b Merge "Use soong_ui directly, instead of make" am: e994b4b584 am: 0531e5c647 am: 98fc198f1f
am: bfc9e71e0d

Change-Id: I5ef2f58b01632438702ac3bebb19b61000016dfe
2017-10-18 06:33:44 +00:00
Dan Willemsen
bfc9e71e0d Merge "Use soong_ui directly, instead of make" am: e994b4b584 am: 0531e5c647
am: 98fc198f1f

Change-Id: Id17adee4b02cc499261f88c3faed15d889f5b6c3
2017-10-18 06:24:45 +00:00
Dan Willemsen
0531e5c647 Merge "Use soong_ui directly, instead of make"
am: e994b4b584

Change-Id: I406a02af2d5fd1accf5c53609af00f416669e18f
2017-10-18 06:10:06 +00:00
Adam Lesinski
f60d30b682 Merge "AAPT2: Flatten AndroidManifest.xml stringpool in UTF16" into oc-mr1-dev
am: 3bdfe1a251

Change-Id: I3295e61dcf29a7cb242b4ee0017f2fd94a0cfd65
2017-10-18 00:57:26 +00:00
Dan Willemsen
a40118d7b6 Use soong_ui directly, instead of make
This will use ckati instead of make for dumping variables, for
consistent makefile parsing. It may also sandbox executions, etc.

Also skip the legacy make wrapper to build, and use soong_ui instead.
The command line arguments are equivalent, but -j is no longer
necessary, we'll default to a sane value.

Test: bit -b framework
Change-Id: Idc2c9d1abe84b6b783b8702925de5493d47a4509
2017-10-17 17:53:36 -07:00
TreeHugger Robot
37ed703d6b Merge changes from topic "resubmit_joeo_cl"
* changes:
  Fix build error.
  Revert "Revert "Start auto-generating the stats log API.""
2017-10-17 22:27:54 +00:00
Adam Lesinski
9c40250cdf AAPT2: Flatten AndroidManifest.xml stringpool in UTF16
A few OEM devices have introduced a memory corruption bug
that is only triggered when an application's AndroidManifest.xml
uses UTF8 string pools. Workaround this by only encoding
AndroidManifest.xml with UTF16 strings.

Bug: 64434571
Test: manual
Change-Id: I2ee50d1b2b5942d971ef2a544c878de63f67c652
2017-10-17 15:16:41 -07:00
Yao Chen
d54f9dd625 Revert "Revert "Start auto-generating the stats log API.""
Test: builds successfully

This reverts commit 9319453998.

Change-Id: I22bca4a32adf86040b9d72ad5b45999aba28f586
2017-10-17 10:42:44 -07:00
Roozbeh Pournader
7e04dd1859 Enable patterns for Belarusian and Latin languages
The native frameworks code now knows about Belarusian and Latin
patterns.

Also, the fontchain_lint tool needed to know the script for any
hyphenation patterns added, and now it does.

Bug: 65626527
Test: make -j fontchain_lint
Change-Id: I747cbb5ea3d36ca63335bfe6b337fad1e75ee79b
2017-10-17 09:19:48 -07:00
Joe Onorato
bcc8478d2b Merge "Revert "Start auto-generating the stats log API."" 2017-10-16 22:46:21 +00:00
Joe Onorato
9319453998 Revert "Start auto-generating the stats log API."
This reverts commit b81d1a7b9a.

Change-Id: I189684d8913ffffca42d9514ac88ea5cc4a44f05
2017-10-16 22:41:28 +00:00
Joe Onorato
22910ada9a Merge changes Idf402222,I8eb7e341
* changes:
  Start auto-generating the stats log API.
  Make bit able to build native tests.
2017-10-16 21:19:16 +00:00
Chih-hung Hsieh
e1e0785c38 Merge "Use -Werror in frameworks/base" am: 16fbd3a1d8 am: 0bfb717a37 am: 9f004b1752
am: decc397b26

Change-Id: Id4abbc6cb95b2eb96f535b6c1c5295cb27c9d2b0
2017-10-16 20:39:41 +00:00
Chih-hung Hsieh
decc397b26 Merge "Use -Werror in frameworks/base" am: 16fbd3a1d8 am: 0bfb717a37
am: 9f004b1752

Change-Id: I6517ee1689b0247caf830a6c3528bfa9bcf91f75
2017-10-16 19:50:38 +00:00
TreeHugger Robot
f4165c4cf7 Merge "AAPT leave <gradient> alone for VDC" 2017-10-16 19:30:04 +00:00
Chih-hung Hsieh
0bfb717a37 Merge "Use -Werror in frameworks/base"
am: 16fbd3a1d8

Change-Id: Iab69cf4f99cf4bedd12eb7764c773a893bfe5343
2017-10-16 19:24:53 +00:00
ztenghui
ab2a38c03d AAPT leave <gradient> alone for VDC
bug: 62421666
Test: Tested with changes for Gradient of VDC.

Change-Id: I07b39721aeaaafd888416a0f71f6cbd5fce97732
2017-10-16 10:34:27 -07:00
Joe Onorato
b81d1a7b9a Start auto-generating the stats log API.
Both native and java bindings.

TODOs:
- Finish WorkSources.
- Clean up the package names for the protos.
- Put the protos in a more suitable location.

Test: stats-log-api-gen-test
Change-Id: Idf4022225e2be05106dbcf7de8e97a3337fc63e2
2017-10-15 20:25:19 -07:00
Joe Onorato
0520afdade Make bit able to build native tests.
It still can't run them. That's a lot of work.

Test: bit statsd_test
Change-Id: I8eb7e341956e698b4e5d110924f78f0485e02f67
2017-10-15 20:25:18 -07:00
Tobias Thierer
162fbe7844 Merge "Update locked_region_code_injection tool to ASM 6.0-BETA." am: 26817938f6 am: e69366ff27 am: 8e60defe4b
am: b5a80794bb

Change-Id: I4508affe416099033cc497db5fb1894e48a9726e
2017-10-15 03:54:47 +00:00
Tobias Thierer
b5a80794bb Merge "Update locked_region_code_injection tool to ASM 6.0-BETA." am: 26817938f6 am: e69366ff27
am: 8e60defe4b

Change-Id: Ic425066feb4288c37154d8b0c487aeda93a6ac59
2017-10-15 03:18:47 +00:00
Tobias Thierer
e69366ff27 Merge "Update locked_region_code_injection tool to ASM 6.0-BETA."
am: 26817938f6

Change-Id: I193d04b7a4ebf0f39f60ac275a7eeb93499ded9d
2017-10-15 02:38:05 +00:00
TreeHugger Robot
8e1c391791 Merge "AAPT2: Flatten AndroidManifest.xml stringpool in UTF16" 2017-10-14 02:40:16 +00:00
Chih-Hung Hsieh
c7edf078f9 Use -Werror in frameworks/base
* Fix unused variable and return value warnings.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I890e65a20848d00559ba5a4f9691be1347b456af
2017-10-13 16:25:16 -07:00
Adam Lesinski
ea13c1a234 AAPT2: Flatten AndroidManifest.xml stringpool in UTF16
A few OEM devices have introduced a memory corruption bug
that is only triggered when an application's AndroidManifest.xml
uses UTF8 string pools. Workaround this by only encoding
AndroidManifest.xml with UTF16 strings.

Bug: 64434571
Test: manual
Change-Id: I2ee50d1b2b5942d971ef2a544c878de63f67c652
2017-10-13 12:42:47 -07:00
Adam Lesinski
ec58a00635 AAPT2: Update SDK development codename to P
Also deleted unused method of finding attribute API levels.

Test: none
Change-Id: I92c1dd398bde3b19da2d274b6abda12636aa3d4f
2017-10-13 12:31:34 -07:00
Tobias Thierer
26817938f6 Merge "Update locked_region_code_injection tool to ASM 6.0-BETA." 2017-10-13 17:40:50 +00:00
Donald Chai
a7963492dd Merge "AAPT: treat "-I" with lower precedence than main APK for dumping." 2017-10-13 16:40:03 +00:00
Donald Chai
d1ac6e1f9e AAPT: treat "-I" with lower precedence than main APK for dumping.
This is the desired behavior if resource IDs may overlap, and also happens to
improve the behavior of:

  aapt dump -I base.apk badging feature.apk

when both APKs use the same package name with different package IDs
(base=0x7F, feature=0x80).  Previously, the final call to
DynamicRefTable::addMapping was for base.apk, and all references to 0x80 were
rewritten in DynamicRefTable::lookupResourceId to 0x7F.  After this
change resources defined in both APKs are resolved correctly.

Note that this is a bit of kludge, and APKs should use different names
to avoid conflating the package IDs.

Fixes: 67070085
Bug: 64058531
Test: manual with sample in b/67070085#comment2
Change-Id: I285adb6f44a297440b08fc7a1f9ad73c700eb9bc
2017-10-12 21:34:22 -07:00
Tobias Thierer
95aa2ea9d8 Update locked_region_code_injection tool to ASM 6.0-BETA.
ASM 6 is required to read version 53 (OpenJDK 9) class files.

Test: make EXPERIMENTAL_USE_OPENJDK9=true services.core
      (in the presence of other unsubmitted CLs that fix
      other issues)
Test: Copied all required dependencies into a subdirectory lib/,
      then ran the steps from TestMain.java, both for OpenJDK 8
      and OpenJDK 9 toolchains.
Bug: 67676752

Change-Id: If324d8ea28450d9a8426a2279190b2f4d9213ed5
2017-10-12 21:14:31 +01:00
Yi Jin
129fc6ce19 Implement Activity Manager Broadcasts dump protos
Bug: 66729158
Test: Manually build and flash the system.img and test "activity --proto
broadcasts"
Change-Id: I3cb7474c4a3ab092f38ed6a121b4d034cadfc402
2017-10-11 18:35:14 -07:00
Yi Jin
0473f88b9f Create protoc-gen-cppstream tool to auto-generate cpp proto field Ids.
It is very similiar to protoc-gen-javastream, which generates field Ids used
by ProtoOutputStream.cpp to dump protobuf data.

Bug: 65641021
Test: compile the streaming_proto:
      $ mmm -j frameworks/base/tools/streaming_proto/
      and run:
      $ PATH=$PATH:out/host/linux-x86/bin/protoc-gen-cppstream aprotoc
      --cppstream_out=tmp/
      frameworks/base/core/proto/android/service/procstats.proto
      frameworks/base/core/proto/android/util/common.proto

Change-Id: I68becc80b5166455455c5df28cd698601b4a1c1d
2017-10-11 11:04:39 -07:00
Kweku Adams
a437d577ef Merge "incidentd: Fix printing of repeated scalar fields." 2017-10-06 00:38:53 +00:00
Kweku Adams
ee6495982f incidentd: Fix printing of repeated scalar fields.
Also add check for when enum value can't be found and fixing output
formatting for some int types.

BUG: 65633831
Test: check incident_report output of repeated enums.
Change-Id: I329eef9b3bb0026259ea465ab67e71952df1a4e4
2017-10-05 16:48:00 -07:00
Adam Lesinski
4670805ea4 AAPT2: Move format related files under same directory
Test: make aapt2_tests
Change-Id: Id72cdfc12ba3add294048e60c55f2461344464bf
2017-10-04 14:26:55 -07:00
Chih-hung Hsieh
e640a8284d Merge "Revert work around clang-tidy segmentation fault."
am: a47e513464

Change-Id: Ie04d0d16a05c35a865776571f95078e63bc1bf47
2017-10-04 06:38:31 +00:00
Chih-Hung Hsieh
ca8dbebe1e Revert work around clang-tidy segmentation fault.
Bug: 34740546
Test: build with WITH_TIDY=1 and
WITH_TIDY_CHECKS="*,-readability-*,-google-readability-*,-google-runtime-references"

Change-Id: If99c75cab6a2bec0c6b38aa17189668b4943478d
2017-10-03 20:23:10 -07:00
Adam Lesinski
897f6ddd31 Merge "AAPT2: Preserve line numbers when deserializing from binary XML" into oc-mr1-dev am: 9b581c7bc1
am: 8284349fc9

Change-Id: Iadd7362ae8456279ebec3a4577ba5be0c8bf19d7
2017-10-03 22:07:18 +00:00
Adam Lesinski
8e43e0d0ad Merge "AAPT2: Fix R.java styleable + indices ordering" into oc-mr1-dev
am: b986ebce75

Change-Id: I16382162fecf323074c13b376a23fccab1da092b
2017-10-03 22:02:20 +00:00
Adam Lesinski
8284349fc9 Merge "AAPT2: Preserve line numbers when deserializing from binary XML" into oc-mr1-dev
am: 9b581c7bc1

Change-Id: I55d8c73df0ce751472e58a9ae505c94edc90c68e
2017-10-03 21:51:09 +00:00
TreeHugger Robot
b986ebce75 Merge "AAPT2: Fix R.java styleable + indices ordering" into oc-mr1-dev 2017-10-03 21:24:48 +00:00
Shane Farmer
e17993597e AAPT2: Set compatible-screens in manifest for multi-APK
If an artifact in a multi-apk set is for a scpecific set of screen
densities then update the manifest to set the compatible-screens element
to match.

Test: ran unit tests
Test: manually ran optimize command

Change-Id: I07e90850ab2f4647a8623acbeaccbebbe81c3a6a
2017-10-03 16:14:07 +00:00