Commit Graph

5592 Commits

Author SHA1 Message Date
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
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
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
Dan Willemsen
0531e5c647 Merge "Use soong_ui directly, instead of make"
am: e994b4b584

Change-Id: I406a02af2d5fd1accf5c53609af00f416669e18f
2017-10-18 06:10:06 +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
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
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
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
Tobias Thierer
26817938f6 Merge "Update locked_region_code_injection tool to ASM 6.0-BETA." 2017-10-13 17:40:50 +00: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
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
Yunlian Jiang
16951dcb54 Merge "Replace strcpy with memcpy."
am: bb115bac41

Change-Id: I28c118a609d999fe1ef6bd126557e63076f452c6
2017-10-03 04:20:17 +00:00
Treehugger Robot
bb115bac41 Merge "Replace strcpy with memcpy." 2017-10-03 04:09:48 +00:00
Yunlian Jiang
d32ae10f4c Replace strcpy with memcpy.
This fixes the warning
Call to function 'strcpy' is insecure as it does not provide bounding of
the memory buffer. As a side effect, it sliences the warning
frameworks/base/tools/aapt/Images.cpp:1270:50: warning: Potential leak
of memory pointed to by field 'data' [clang-analyzer-unix.Malloc]
frameworks/base/tools/aapt2/compile/Png.cpp:562:42: warning: Potential
leak of memory pointed to by field 'data' [clang-analyzer-unix.Malloc].

Bug: None
Test: The warning is gone.

Change-Id: I25f68ff85bea7069c21549c7deb7920d1877069e
2017-09-26 16:02:11 -07:00
Adam Lesinski
fa6058118e AAPT2: Fix processing of quotes in XML
When processing attributes in XML, quotes can't be used to mark a
section as whitespace preserving, so the assumption should be that the
entire string is whitespace preserving, which makes quote characters
literals.

Bug: 62840718
Bug: 62840406
Test: make aapt2_tests
Change-Id: I4afff02148b5b8e78833abf1f323c2f5325d6155
2017-09-11 13:05:38 -07:00
Dan Willemsen
c28d591b36 Merge changes I93cf24d4,I32e438ef
am: 30798ad13a

Change-Id: I0b178c8523d0c5829d731f6ed05cfa3fe89ad9b4
2017-09-10 01:44:06 +00:00
Treehugger Robot
30798ad13a Merge changes I93cf24d4,I32e438ef
* changes:
  Convert host tools to Android.bp
  Rename aapt_defaults to aapt2_defaults
2017-09-10 01:29:21 +00:00
Dan Willemsen
24041fe213 Merge "Convert incident_report and incident-section-gen to Android.bp"
am: d928842ab6

Change-Id: I0e0ff3d75ce5f9dc302052c1da057db8d5d35cd7
2017-09-09 22:11:38 +00:00
Dan Willemsen
c201a6bb7d Merge changes Ia3bcece1,Icd26dc1e
am: ec462238f6

Change-Id: Ied36c517ed7fa80dc85b07b1532821dc93628d40
2017-09-09 19:28:33 +00:00
Dan Willemsen
760d57a888 Convert incident_report and incident-section-gen to Android.bp
See build/soong/README.md for more information.

Test: m incident_report incident-section-gen
Test: mmma frameworks/base
Change-Id: If1a930b40196139d29e63f6558bc4a75faca1967
Merged-In: If1a930b40196139d29e63f6558bc4a75faca1967
2017-09-09 19:24:33 +00:00
Dan Willemsen
d3eac266b0 Convert host tools to Android.bp
See build/soong/README.md for more information.

Test: m libinstrumentation interrupter accessorychat accessorytest bit obbtool pbkdf2gen libsplit-select_tests split-select protoc-gen-javastream validatekeymaps libaapt_tests aapt
Test: mmma frameworks/base
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: I93cf24d4b232353a52d53be8ed85781b8f4a3877
2017-09-09 06:18:48 +00:00
Dan Willemsen
1cb5ab2dc1 Rename aapt_defaults to aapt2_defaults
So that tools/aapt/Android.bp can have aapt_defaults.

Test: m aapt2
Change-Id: I32e438efb3516d73b347e67297aa09bee91520b1
Merged-In: I32e438efb3516d73b347e67297aa09bee91520b1
2017-09-09 06:17:24 +00:00
Dan Willemsen
7544b9cbb9 Rename aapt_defaults to aapt2_defaults
So that tools/aapt/Android.bp can have aapt_defaults.

Test: m aapt2
Change-Id: I32e438efb3516d73b347e67297aa09bee91520b1
2017-09-08 23:11:49 -07:00
Dan Willemsen
896f01879b Don't compile libaapt with the build number
Only do that for the aapt binary itself. This will allow libaapt to be
converted to Soong.

Also remove a few lines that weren't doing anything: aaptCppflags was
never set, LOCAL_C_INCLUDES := $(LOCAL_PATH) is implied.

Test: m aapt
Test: aapt version
Change-Id: Ia3bcece14921417e1bfd3406630961c013bd497c
2017-09-08 22:58:56 -07:00
Dan Willemsen
85aee73e98 aapt: Always use our libz
Instead of using the system libz (-lz), include our copy as a static
library. This is safer in case the system version isn't compatible.

Also removes references to -ldl -lrt -lpthread, which are now implied.

Test: m -j
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: Icd26dc1e0d011e5b5f158e562640533c5ac34e33
2017-09-08 22:44:19 -07:00
Mårten Kongstad
96e763fe71 Merge changes I7218f17a,I96b7340a
am: 111c955d1d

Change-Id: I64cb964b751561e87115976866646b1db3858e14
2017-08-31 21:44:25 +00:00
Mårten Kongstad
c903d2e7cd AAPT2: Allow <overlay> in AndroidManifest.xml
Test: libaapt2_tests
Test: manual (build an overlay package)
Change-Id: I96b7340a53a7d4f1ca022065674fbf5bdaa273f2
2017-08-31 14:50:10 +02:00
Colin Cross
f1c99fb47f Merge "Use guava 21.0"
am: edb2e0c722

Change-Id: Icf8873b268677a631659a7ee0f7816495f6acd38
2017-08-29 00:03:24 +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
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
Adam Lesinski
dc901a6318 Merge "AAPT2: Disable locale domination for deduping" into oc-dr1-dev
am: 242c22c900

Change-Id: I8fa65b89f1f10fe8920aa45d14c7b917b6bc74d8
2017-08-07 17:43:05 +00:00
Adam Lesinski
907399187e AAPT2: Disable locale domination for deduping
Locale deduping isn't straightforward, as parenting rules
change between platform versions and the selection
preference of a specific locale variant over the default
configuration lead to incorrect results at runtime.

Bug: 62409213
Test: make aapt2_tests
Change-Id: Iec8f1cfba7ae43c847d163529891fdc15f3db826
2017-08-04 17:23:14 -07:00
Colin Cross
3a40330f3f Merge "Move inserted method after end of try block" am: b080b22a17 am: a413870ef5
am: 4a3caf1719

Change-Id: Ib6c4527df0f575217bad0c7e1f2a6b50f203beb7
2017-08-04 16:18:57 +00:00
Colin Cross
a413870ef5 Merge "Move inserted method after end of try block"
am: b080b22a17

Change-Id: Ie23cd33f1910de23bb651fb27fcca71507269bdf
2017-08-04 16:06:02 +00:00
Colin Cross
cebc382d5f Move inserted method after end of try block
Methods inserted at the end of a synchronized {} block also need to
be outside of the implicit try{} block.  Make sure the next
instruction is the virtual end label for the try block, and put
the inserted method after the label.

Bug: 64301866
Test: locked_region_code_injection test
Test: m -j checkbuild
Change-Id: I6626aa45580b4df692e02fc6127a2947a6075e2e
2017-08-03 20:55:37 -07:00
Adam Lesinski
74468583b3 Merge "AAPT2: Fix processing of quotes in XML" into oc-dr1-dev
am: 16cfd497f5

Change-Id: Ibe24c4b8750d02774456d6c2d638655ece4c7ffd
2017-07-27 20:04:15 +00:00
Adam Lesinski
c895688488 AAPT2: Fix processing of quotes in XML
When processing attributes in XML, quotes can't be used to mark a
section as whitespace preserving, so the assumption should be that the
entire string is whitespace preserving, which makes quote characters
literals.

Bug: 62840718
Bug: 62840406
Test: make aapt2_tests
Change-Id: I4afff02148b5b8e78833abf1f323c2f5325d6155
2017-07-26 20:41:34 +00:00
Seigo Nonaka
ba12631bba Merge "Stop loading other package's font by default." into oc-dev
am: 824d75e0e1

Change-Id: I5518dbd8b5d8a4548ea00bbfca0e3aee87880ee7
2017-06-23 04:23:44 +00:00
Seigo Nonaka
80f6a985c3 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 19:07:17 -07:00
Alan Leung
94e68505c4 Merge "Merge "ASM Priority Boost Tool" am: 8ff8dd16cc am: 8ac18ceb8a" into oc-dev-plus-aosp
am: 643275b838

Change-Id: Idb669d7b381f8291fb44dcc5a4d1824d118319d9
2017-06-22 22:50:42 +00:00