Commit Graph

5708 Commits

Author SHA1 Message Date
Colin Cross
0688ef8668 Merge "Convert services to Android.bp" am: 5319777274
am: b8500d4771

Change-Id: Idcfeb088fa73e679d18de2ce2dc2ba58cdc78af7
2017-12-13 01:08:56 +00:00
Colin Cross
eb652a47a1 Convert services to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: I417409281c928ea667d937090d2a0d9d72a449a2
Merged-In: I417409281c928ea667d937090d2a0d9d72a449a2
Exempt-From-Owner-Approval: trivial conversion
(cherry-picked from commit e0b2ee52d2)
2017-12-12 23:22:25 +00:00
Dan Willemsen
e2a0c1d062 Merge "Fix warning from clang+mingw" am: 7fce15dc5e
am: 31bcd7acea

Change-Id: Ibb5c891fe3c219d75be8c124c9be215a31b2a241
2017-11-30 23:26:44 +00:00
Dan Willemsen
31bcd7acea Merge "Fix warning from clang+mingw"
am: 7fce15dc5e

Change-Id: I1b318913c3ead77369bdb62c10e5e08803cb10b8
2017-11-30 23:18:38 +00:00
Dan Willemsen
fb4ed78bde Fix warning from clang+mingw
I suspect this is showing up in this configuration because we're now building
with -std=gnu++14, but still using libstdc++.

frameworks/base/tools/aapt2/link/ProductFilter_test.cpp:76:24: error: chosen constructor is explicit in copy-initialization
  ProductFilter filter({});
                       ^~
prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/include/c++/4.8.3/bits/unordered_set.h:132:7: note: explicit constructor declared here
      unordered_set(size_type __n = 10,
      ^
frameworks/base/tools/aapt2/link/Linkers.h:114:58: note: passing argument to parameter 'products' here
  explicit ProductFilter(std::unordered_set<std::string> products) : products_(products) {
                                                         ^

Bug: 69933068
Test: mmma frameworks/base/tools/aapt2
Test: out/host/linux-x86/nativetest[64]/aapt2_tests/aapt2_tests
Change-Id: I2133e364dd11f64fd13239125f8a3eff70ebb69c
2017-11-29 18:17:08 -08:00
Donald Chai
f84b4204c3 Merge "AAPT2: whitelist alphanums instead of blacklisting hyphens in package names." into oc-mr1-dev
am: e7b0a330db

Change-Id: I7943dc35ceeca0c3fdb4df668a761889cd0add2d
2017-11-18 03:19:30 +00:00
TreeHugger Robot
e7b0a330db Merge "AAPT2: whitelist alphanums instead of blacklisting hyphens in package names." into oc-mr1-dev 2017-11-18 03:03:19 +00:00
Nan Zhang
67695d3aff Merge "Build fontchain_lint using python_binary_host" am: 7ecac139ea
am: 7ade558ad2

Change-Id: Ie920005b39a476b281333b12fbed9e586a2ce3e7
2017-11-17 22:20:57 +00:00
Nan Zhang
7ade558ad2 Merge "Build fontchain_lint using python_binary_host"
am: 7ecac139ea

Change-Id: I4fef971c8fc8837f73644667988ddc3e7f4305ec
2017-11-17 22:12:58 +00:00
Nan Zhang
2db709de30 Build fontchain_lint using python_binary_host
Test: out/host/linux-x86/bin/fontchain_lint
out/target/product/generic/system true external/unicode
Bug: b/27727331

Change-Id: Ib9353d2338c3b939027069f49e3e847c65526581
2017-11-17 09:22:12 -08:00
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
Adam Lesinski
cc8aa11f6c Merge "AAPT2: Differentiate between Android and Java package names" into oc-mr1-dev
am: 07d8249c4b

Change-Id: I0a3235052cea9041cf6c944f71879d304bce5a56
2017-11-10 17:50:49 +00:00
Adam Lesinski
07d8249c4b Merge "AAPT2: Differentiate between Android and Java package names" into oc-mr1-dev 2017-11-10 17:32:52 +00:00
Donald Chai
2ba1bc579f AAPT2: whitelist alphanums instead of blacklisting hyphens in package names.
BCP 47 uses plus signs for name mangling, and future qualifiers may
start using other reserved characters as well, so we might as well
futureproof the sanitizer.

Change-Id: I1be7ee4234f8e30bb0ea832372b4dc932d30550c
Fixes: 69134786
Test: UtilTest.SplitNamesAreSanitized
(cherry picked from commit 414e48a541)
2017-11-10 17:23:26 +00:00
Adam Lesinski
6385bbd860 Merge "AAPT2: Workaround for feature splits without namespacing" into oc-mr1-dev
am: 751e69b38b

Change-Id: I8791a0cbfb32c25a0c73552c47509cce1d5f06e2
2017-11-10 10:13:26 +00:00
Adam Lesinski
1210e8c81b AAPT2: Workaround for feature splits without namespacing
Android Instant Apps in its current iteration does not use namespaces,
but due to limitations on the Android resource runtime, needs to make
it look like it does.

This is due to a bug that treats any package ID that's not 0x01 or 0x7F
as a shared library. Shared libraries require unique package names.

As a workaround, and since Android Instant Apps can not have a feature
depend on another feature, we can alter the resource package name of a
feature split just before writing it out to disk. This avoids using a
unique package name while linking, thereby avoiding namespace issues.

Bug: 68820737
Test: manual
Merged-In: Ic553ed42656436bbb949393d0248ee7bb9d37860
Change-Id: Ic553ed42656436bbb949393d0248ee7bb9d37860
2017-11-09 23:00:56 +00:00
Adam Lesinski
81e9ecfc00 AAPT2: Differentiate between Android and Java package names
Android package names are more strict (ASCII only) than Java package names.
Also fixed an issue where trailing underscores were disallowed in Android
package names.

Bug: 68468089
Test: make aapt2_tests
Merged-In: I1052e9e82b6617db6065ce448d9bf7972bb68d59
Change-Id: I1052e9e82b6617db6065ce448d9bf7972bb68d59
2017-11-09 01:49:58 +00:00
Michael Wachenschwanz
114616b27d AAPT2: Allow for nested inline xmls
am: c8f5fc284c

Change-Id: Ie80ba078d893d1b894d289645dae84fa2af58c40
2017-11-01 15:49:39 +00:00
Michael Wachenschwanz
c8f5fc284c AAPT2: Allow for nested inline xmls
Add recursion to InlineXmlFormatParser::Consume for handling nested
aapt:attr

Change-Id: Iabf98945b4f5ef22a3b8fdc4ca2bac092a377629
Fixes: 64385167
Test: make aapt2_tests
(cherry picked from commit 7b6b02bd13)
2017-10-31 23:13:03 +00:00
Colin Cross
2461194985 Merge changes from topic "keystorebp" am: a12eab69d1
am: 315bbfc213

Change-Id: I5ac8aa1079a4fdb23a8745e9998d947c85c98e7f
2017-10-25 05:39:06 +00:00
Donald Chai
ec4dbd4d40 Merge "AAPT: treat "-I" with lower precedence than main APK for dumping." into oc-mr1-dev
am: d476e2902f

Change-Id: I3ee9ce17439f2a4378c890b954c57a7049fbe036
2017-10-24 23:27:27 +00:00
TreeHugger Robot
d476e2902f Merge "AAPT: treat "-I" with lower precedence than main APK for dumping." into oc-mr1-dev 2017-10-24 23:17:34 +00:00
Colin Cross
a218b561e8 Convert lockregioncodeinjection to Android.bp
See build/soong/README.md for more information

Test: m checkbuild
Change-Id: I78e91a70e786df8e6722c6ec3fe762371e8f475a
2017-10-24 16:09:01 -07:00
Tenghui Zhu
fa1d67a6f8 Merge "AAPT leave <gradient> alone for VDC" into oc-mr1-dev
am: 81831f89ce

Change-Id: I0ee4801c31a63b8e617adb053a773456814b65ff
2017-10-24 16:36:28 +00:00
Tenghui Zhu
81831f89ce Merge "AAPT leave <gradient> alone for VDC" into oc-mr1-dev 2017-10-24 16:22:49 +00:00
Donald Chai
b08aa082a4 Merge "AAPT2: Sanitize resource qualifiers before using in split names." into oc-mr1-dev
am: 72b3d46794

Change-Id: I1f87fce18c665433ad916ac47cd3f78ae007c776
2017-10-24 11:31:04 +00:00
TreeHugger Robot
72b3d46794 Merge "AAPT2: Sanitize resource qualifiers before using in split names." into oc-mr1-dev 2017-10-24 11:16:03 +00:00
Benoit Lamarche
bbb2eb3f59 Merge "Use ASM6 Opcodes everywhere in locked_region_code_injection" am: 5aa4dafa58
am: 4927808d39

Change-Id: I718efd7536331508531bb7c30dfab3638ef60d0e
2017-10-24 10:13:58 +00:00
Benoit Lamarche
4927808d39 Merge "Use ASM6 Opcodes everywhere in locked_region_code_injection"
am: 5aa4dafa58

Change-Id: Ic8f892399cdfa746a2fab4a841469f41f0fe98f5
2017-10-24 08:54:09 +00:00
Benoit Lamarche
a7eb610b15 Use ASM6 Opcodes everywhere in locked_region_code_injection
And use the same constant everywhere.

Test: treehugger
Bug: 67676752
Change-Id: I5735aba76266118471677f962fab50dbb0be187b
2017-10-23 11:39:03 +02:00
Colin Cross
710fac6ab7 Merge "Use final release of ASM 6.0" am: d5d697b023 am: a74b04cd70
am: baa428031a

Change-Id: I439fa4aa9f2fb22f372a6a76ab07676c0c51e429
2017-10-22 02:16:44 +00:00
Colin Cross
a74b04cd70 Merge "Use final release of ASM 6.0"
am: d5d697b023

Change-Id: I94524349eaa38c020d932f301fe36f99952862bc
2017-10-22 01:46:39 +00:00
Colin Cross
d5d697b023 Merge "Use final release of ASM 6.0" 2017-10-22 01:37:11 +00:00
Colin Cross
8aa184a395 Use final release of ASM 6.0
Test: m checkbuild
Change-Id: I8b39c7887763a1a5efce2622421906f9b2e1994a
2017-10-20 12:57:56 -07:00
Dan Willemsen
a2adda41da Add link_type for temp_layoutlib
So that it can be used by java libraries when we turn on dep
verification for host java libraries.

Test: m nothing
Change-Id: Iaa2acfb585db0a67b449e866883f71691395971e
Merged-In: I69a1a826d0bac8ede1f9a337c9c1d930bbcd04f3
2017-10-19 22:50:51 -07: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
50bae79111 AAPT2: Sanitize resource qualifiers before using in split names.
Fixes: 67960909
Test: UtilTest.SplitNamesAreSanitized
Change-Id: I9ba1b8430a00cc7ce981075a60388f275c41dbea
(cherry picked from commit b8f078c9a0)
2017-10-19 19:49:01 +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
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
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
Donald Chai
94251fac62 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
(cherry picked from commit d1ac6e1f9e)
2017-10-17 19:14:52 +00:00
ztenghui
f49cce3aa6 AAPT leave <gradient> alone for VDC
bug: 62421666
Test: Tested with changes for Gradient of VDC.

Change-Id: I07b39721aeaaafd888416a0f71f6cbd5fce97732
(cherry picked from commit ab2a38c03d)
2017-10-16 20:24:51 +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
Chih-hung Hsieh
0bfb717a37 Merge "Use -Werror in frameworks/base"
am: 16fbd3a1d8

Change-Id: Iab69cf4f99cf4bedd12eb7764c773a893bfe5343
2017-10-16 19:24:53 +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