7238 Commits

Author SHA1 Message Date
Nicolas Geoffray
81edac4037 Rename debugFlags to runtimeFlags.
Also now pass the flags to the forked process through --runtime-flags instead
of converting to command line arguments and converting back to an integer.

bug: 30972906
bug: 63920015

Test: builds

Change-Id: I7f10c43dd916ca2d3b9b5141f17261eb7b64f49a
2017-09-12 15:54:23 +01:00
Treehugger Robot
fb5369bc3f Merge "Separate GraphicsEnv from libui" 2017-09-06 15:53:00 +00:00
Jiyong Park
f012107aaa Separate GraphicsEnv from libui
GraphicsEnv class is separated from libui and became a standalone lib
'libgraphicsenv'.

Bug: 38097618
Test: sailfish builds and boots
Change-Id: I7a5c273ba9238c3a6c90e1de80b9e97fc0772188
2017-09-05 16:49:31 -07:00
Yifan Hong
2cdd1ce600 Merge "Fix ownership of objects returned by VintfObject::Get*" 2017-09-05 21:45:13 +00:00
Andreas Gampe
a90534b551 Frameworks: Clean up SystemProperties
Clean up SystemProperties.java. Add annotations.

Clean up SystemProperties.cpp. Refactor for proper C++11.
Make sure C-string key construction is properly reused. Use
android::base functionality for actual reading.

Fix the test script to refer to the right location. Add some
test coverage.

(cherry picked from commit 2e6b9cb56320a86f0c33da890f667e5c76c8285d)

Test: m
Test: frameworks/base/core/tests/systemproperties/run_core_systemproperties_test.sh --rebuild
Merged-In: I490577370da985f600fb1117e3c818d3f68bad5f
Change-Id: I490577370da985f600fb1117e3c818d3f68bad5f
2017-08-30 18:37:48 -07:00
Yifan Hong
d666d5b0f6 Fix ownership of objects returned by VintfObject::Get*
VintfObject::Get* returns a pointer that clients
can own.

Test: builds
Bug: 65166415
Change-Id: Ia3d3f5c00172dec462eb5e8ceeb7b0ba98bc6cfb
2017-08-30 16:40:01 -07:00
Andreas Huber
013bea3d42 Merge "Remove unused global references in JNI code supporting HwBinder."
am: 2c4dfa0412

Change-Id: I20348e98597bf8de57b19ef25aec6fb0912da25f
2017-08-16 23:40:07 +00:00
Andreas Huber
2c4dfa0412 Merge "Remove unused global references in JNI code supporting HwBinder." 2017-08-16 23:17:49 +00:00
Luis Hector Chavez
ed05287c55 Merge "Improve container capability bounding in containers"
am: 586fd52b34

Change-Id: I7c67b571164e67b3e4a8ae9c9a2701e338693a4b
2017-08-16 21:32:13 +00:00
Treehugger Robot
586fd52b34 Merge "Improve container capability bounding in containers" 2017-08-16 21:16:50 +00:00
Andreas Huber
ba8f4994eb Remove unused global references in JNI code supporting HwBinder.
Bug: 63814586
Change-Id: Ia149cc055d6e105df8e109ae1b959a9fbf669b8a
Test: hidl_test_java
2017-08-16 09:24:11 -07:00
Luis Hector Chavez
72042c99a6 Improve container capability bounding in containers
This change stops relying on the ro.boot.container property for dropping
a subset of capabilities and instead relies on the effective capability
mask of the Zygote process, prior to forking.

When Android is running in a pid/mount/net/user namespace, even if a
particular capability is present, some operations that require that
capability check whether it is allowed in the init namespace (instead of
in the current namespace), so they would fail even with the capability
granted within the namespace. So, explicitly dropping the capabilities
from the beginning allows for clearer signalling of which operations can
be expected to work instead of failing silently for mysterious reasons.

Bug: 63579953
Test: aosp_bullhead-eng still boots
Test: Running Zygote without CAP_SYS_MODULE makes it such that
      system_server does not request it.

Change-Id: I1d18d13341bcc04e701fd14092e7e94961728620
2017-08-16 08:21:58 -07:00
TreeHugger Robot
3f378940c2 Merge "Reference ScopedUtfChar header correctly." into stage-aosp-master 2017-08-11 19:53:32 +00:00
Steven Moreland
ae9324bd87 Reference ScopedUtfChar header correctly.
Bug: 63762847
Test: finds header in proper location
Change-Id: I4963ab3133c405a90564112f0d9af602ace0eab5
2017-08-11 10:52:35 -07:00
Jeff Hao
7dce8cbdeb Merge "Add dirty_image_objects file."
am: 935e0c996a

Change-Id: I022e4349152e8fd8a33b6afe7b659af019ad950e
2017-08-05 01:02:04 +00:00
Jeff Hao
6aa5d715b4 Add dirty_image_objects file.
Allows grouping of classes with dirty static fields to be grouped
together in the image to have fewer dirty pages.

(cherry-picked from commit 37641ae54ab72509276d0fdd3f0fabeea9988c4a)

Bug: 62554875
Test: mm test-art-host

Merged-In: I6a36120235ee4f47bc1cb1ddc4413cfc561cb9a7
Change-Id: I6a36120235ee4f47bc1cb1ddc4413cfc561cb9a7
2017-08-03 11:02:02 -07:00
Josh Gao
1453059ae3 Merge "zygote: always log process exit reason."
am: b14694b043

Change-Id: Iaa68234674edb9494e518184ee72b1130831cfc9
2017-08-02 22:04:14 +00:00
Treehugger Robot
b14694b043 Merge "zygote: always log process exit reason." 2017-08-02 21:50:44 +00:00
Josh Gao
6d747cacae zygote: always log process exit reason.
Multiple people have run into problems where apps disappear without a
trace. Always log process exit, so that it's clear when a process is
intentionally exiting. (The amount of extraneous logging this generates
is probably minimal.)

Test: none
Change-Id: I77169da4d0f05dabfe38490757975ad7ad0247b2
2017-08-02 12:54:05 -07:00
Sundong Ahn
811027ede7 Merge "Add hwbinder library"
am: 49e2a9a612

Change-Id: I3c7528dcf98bf3b92843594172531fd30a5f29d4
2017-08-02 16:57:50 +00:00
Sundong Ahn
28cc6e88fd Add hwbinder library
HAL impls will depend hwbinder.jar instead of framework.jar on
build-time, but on runtime framework.jar will be used.

This is to cut the circular dependency when using configstore from
Android framework. Also added JNI call to HwBinder.java to cut
configstore's dependency on systemproperty in framework.jar.

Note that hwbinder.jar is LOCAL_UNINSTALLABLE_MODULE and so it won't be
installed in an actual image.

Bug: 35771640
Test: build & run
Change-Id: I2420298cf9df5d6bbcead3e4451b703ce9bc3e29
2017-08-01 11:26:18 +09:00
Steven Moreland
f53501098c SurfaceTexture.cpp: 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: SurfaceTexture.cpp finds headers
Bug: 63762847
Change-Id: I3ec1b888c226c2894649d9f9a8f8203891c1ab02
(cherry picked from commit 849252c469396a759c394dc6382470a6a07d6587)
2017-07-31 16:41:45 +00:00
Steven Moreland
d37f13603a Merge "Revert "Revert "Update for less arguments in hidl toBinder."""
am: e8341b6148

Change-Id: I1337a9b40fdf762cc0150983536981f0a163750a
2017-07-21 23:27:27 +00:00
Steven Moreland
72be156bec Revert "Revert "Update for less arguments in hidl toBinder.""
This reverts commit 243bcfda3ac35735a959f8abcc45186aba0af116.

(originally reverted due to merge conflicts)

Bug: 32172906
Test: hidl_test

Change-Id: I70fde3ffe0d2c67390f7152acedd45c39009a134
2017-07-21 21:26:05 +00:00
Steven Moreland
16255fda63 Merge "Revert "Update for less arguments in hidl toBinder.""
am: 79994cb142

Change-Id: I325335a278fc9aebf7957e23089c72665169eeb3
2017-07-21 19:28:14 +00:00
Steven Moreland
243bcfda3a Revert "Update for less arguments in hidl toBinder."
This reverts commit de2a9dfe3a7f343d4c1568d644ae0ddce7725a8d.

Change-Id: I6f451b0a05759501f59921747d95c6ae5b7ce656
2017-07-21 19:13:05 +00:00
Steven Moreland
b167ed08cc Merge "Update for less arguments in hidl toBinder."
am: 602b7be04e

Change-Id: I61f30db7a638c8c74925509e0bee1a7fffd5c546
2017-07-21 18:13:01 +00:00
Steven Moreland
de2a9dfe3a Update for less arguments in hidl toBinder.
Removed unnecessary templatization argument.

Test: hidl_test_java
Bug: 32172906
Change-Id: I88cd2bf7abc3065ece4e28698ba5e0d836b1d0e3
2017-07-21 08:39:26 -07:00
Steven Moreland
5c091dc944 Merge "frameworks/base: use proper nativehelper headers"
am: 826eafd958

Change-Id: I36f10ff4d963284a313f1cc5b368f82549a4adb2
2017-07-20 02:50:53 +00:00
Treehugger Robot
826eafd958 Merge "frameworks/base: use proper nativehelper headers" 2017-07-20 02:42:49 +00:00
George Burgess IV
3e0a8b1d2b Merge "Fix static analyzer complaints"
am: a3bde81205

Change-Id: I39f7b56c6abc0398cd517eef174b0620dbc50caa
2017-07-19 17:36:23 +00:00
Treehugger Robot
a3bde81205 Merge "Fix static analyzer complaints" 2017-07-19 17:26:36 +00:00
Steven Moreland
2279b25342 frameworks/base: 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 frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
2017-07-19 10:06:40 -07:00
Steven Moreland
d2bf323c40 Merge "Reference nativehelper/jni.h as jni.h"
am: 899a1f23c5

Change-Id: I30ec4f6b329360ea4161f2ad5538ecd238db7b62
2017-07-18 20:05:36 +00:00
Tom Cherry
b793aa8c81 Merge "Remove ALOGD_IF_SLOW" 2017-07-18 17:20:39 +00:00
George Burgess IV
d657a38d87 Fix static analyzer complaints
frameworks/base/core/jni/android_view_MotionEvent.cpp:383:12: warning:
Potential leak of memory pointed to by 'event'

frameworks/base/core/jni/AndroidRuntime.cpp:975:20: warning: Null passed
to a callee that requires a non-null 1st parameter

For the former, it was surprising to me that the analyzer couldn't
figure out that `event == nativePtr` for the latter check. Filed
https://bugs.llvm.org/show_bug.cgi?id=33540 upstream about it.

For the latter, it was complaining because `className` could be NULL
(more precisely, we have a NULL check at the top of the function it's
declared in, so NULL is presumably a valid value).

Bug: None
Test: Ran mma; complaints are gone.
Change-Id: I26a91ae25934f95acbfdbe4f3641e081fbc66c6d
2017-07-18 08:56:10 -07:00
Fredrik Roubert
253e515259 Update JNI code in preparation for ICU 59 switching to C++11 char16_t.
ICU 59 (update pending on the aosp/icu59 branch) has switched to using
the C++11 char16_t data type, which is a distinct type from uint16_t
(which is what JNI's jchar is typedef'd as), even though they are
bitwise identical.

All code that passes UTF-16 data between ICU4C and JNI must therefore be
updated with typecasts in the appropriate places before ICU 59 is merged
to aosp/master.

Bug: 37554848
Test: make
Change-Id: Ibbc90d2b603382d4715551d05c4a6a462529542d
Merged-In: Ic84a94be82acbef41f80cc113d5da485ce54ae29
2017-07-18 11:13:48 +01:00
Tom Cherry
d600905e4a Merge "Remove ALOGD_IF_SLOW" into stage-aosp-master 2017-07-17 19:20:58 +00:00
Steven Moreland
889f9952d8 Reference nativehelper/jni.h as jni.h
nativehelper will no longer export nativehelper/jni.h so that everywhere
can reference this file with the same name.

Bug: 63762847
Change-Id: I8d2e9587439efa2d6ab03a5bdfa749fc620759e1
2017-07-17 12:08:45 -07:00
Fredrik Roubert
adf11aef0f Update JNI code in preparation for ICU 59 switching to C++11 char16_t.
ICU 59 (update pending on the aosp/icu59 branch) has switched to using
the C++11 char16_t data type, which is a distinct type from uint16_t
(which is what JNI's jchar is typedef'd as), even though they are
bitwise identical.

All code that passes UTF-16 data between ICU4C and JNI must therefore be
updated with typecasts in the appropriate places before ICU 59 is merged
to aosp/master.

Bug: 37554848
Test: make
Change-Id: Ibbc90d2b603382d4715551d05c4a6a462529542d
Merged-In: Ic84a94be82acbef41f80cc113d5da485ce54ae29
2017-07-17 14:28:18 +02:00
Mathieu Chartier
41718e2413 Merge "Add more details to dumpsys meminfo -d"
am: 4ccf8b83a1

Change-Id: I54fadc1bd30cc508faccabe1553c2db4cc040904
2017-07-14 21:37:43 +00:00
Tom Cherry
9236117288 Remove ALOGD_IF_SLOW
ALOGD_IF_SLOW isn't intuitively implemented as it cannot handle
temporaries used as its parameters.  Since there are so few users of
it already and since it's just sugar on top of 2 otherwise trivial
lines, we opt to remove it entirely.

Bug: 62820330
Test: Build
Change-Id: I196443b3717497f6cab31bfaee94a229e4838556
Merged-In: I196443b3717497f6cab31bfaee94a229e4838556
2017-07-14 19:51:44 +00:00
Mathieu Chartier
cb86245b99 Add more details to dumpsys meminfo -d
Added new subitems for
.dex:
boot vdex
app vdex
app odex

.art
app art
boot art

Fixed accounting for dalvik other to be subitems of other subsection
instead of dalvik.

Sample output:
261,892K: Native
213,196K: .dex mmap
    111,620K: .App vdex
    65,070K: .App dex
    36,506K: .Boot vdex
192,320K: EGL mtrack
161,835K: .so mmap
134,922K: .apk mmap
85,612K: Dalvik
    74,656K: .Heap
    4,526K: .Zygote
    4,218K: .LOS
    2,212K: .NonMoving
64,906K: Unknown
52,119K: .oat mmap
42,828K: Dalvik Other
    32,704K: .LinearAlloc
    3,672K: .JITCache
    3,248K: .IndirectRef
    3,204K: .GC
40,754K: .art mmap
    31,133K: .Boot art
    9,621K: .App art
21,976K: Other mmap
20,704K: Stack
16,270K: Gfx dev
9,200K: GL mtrack
3,428K: Other dev
2,744K: .ttf mmap
1,116K: Ashmem
1,052K: .jar mmap
0K: Cursor
0K: Other mtrack

Test: dumpsys meminfo -d
Test: dumpsys meminfo -s
Test: dumpsys meminfo
Test: dumpsys meminfo <pid>
Test: dumpsys memifno -d <pid>

Bug: 32331673

(cherry picked from commit 95550dd39440196d364767fc18d441ed5a0e36d6)

Change-Id: I7557ee09510651c7b5ddee646c92adbcdd3472db
2017-07-14 12:14:59 -07:00
Timur Iskhakov
791a698a6a Merge "Add configureRpcThreadpool to java interface"
am: d8dab11547

Change-Id: I958ef6fc2d667a691e39e9fadd07303085a499f9
2017-07-13 19:21:42 +00:00
Timur Iskhakov
b6a6283ce4 Add configureRpcThreadpool to java interface
Bug: 36233029
Test: links, compiles, hidl_test_java

Change-Id: I7e2ec88b2098886983b1d93ab100a77db63f3976
2017-07-12 17:56:39 -07:00
Tom Cherry
10fc62756b Remove ALOGD_IF_SLOW
ALOGD_IF_SLOW isn't intuitively implemented as it cannot handle
temporaries used as its parameters.  Since there are so few users of
it already and since it's just sugar on top of 2 otherwise trivial
lines, we opt to remove it entirely.

Bug: 62820330
Test: Build
Change-Id: I196443b3717497f6cab31bfaee94a229e4838556
Merged-In: I196443b3717497f6cab31bfaee94a229e4838556
2017-07-12 17:59:39 +00:00
Yifan Hong
90a5fd0549 Merge "Log errors on android.os.VintfObject.verify()"
am: 54b1e9c57c

Change-Id: I07f9797bcf9a32a3c9b517741e7cbef17d5a5382
2017-07-06 20:21:51 +00:00
Yifan Hong
87167afe3f Log errors on android.os.VintfObject.verify()
Test: pass
Bug: 63290683
Change-Id: I7ddc355024359e31aca4bbdf18f42075f72ddd5a
2017-07-05 16:40:45 -07:00
Andreas Gampe
e5a7626349 Framework: Add libziparchive dependency
Bug: 37342627
Test: m
Change-Id: I4bc85b87a6c4305f14586aba662bcccbd4b8b6e2
2017-07-05 13:11:47 -07:00
Mathieu Chartier
7e73b5165d Merge "Add boot profile support"
am: 3d901ec513

Change-Id: I37db2f4bd7e6412954d51e914f6e238db5027a6e
2017-07-01 03:32:41 +00:00