9029 Commits

Author SHA1 Message Date
TreeHugger Robot
2c3a088a2d Merge "jni: use SurfaceComposerClient in sampling" 2019-03-07 20:13:30 +00:00
Kiyoung Kim
9b56c81652 Merge "Add product apk support from libnativeloader" 2019-03-07 05:46:26 +00:00
Kevin DuBois
66ed4f8c32 jni: use SurfaceComposerClient in sampling
Use SurfaceComposerClient in add/remove sampling listener.

Test: boot
Test: atest CompositionSamplingListenerTest
Bug: 124305231

Change-Id: Ic70ad6c32ef15f6500c5b1149403f4cabd35a8ca
2019-03-06 14:07:18 -08:00
TreeHugger Robot
1b042a7c6e Merge "Pass ColorSpace to AnimatedImageDrawable" 2019-03-06 03:37:23 +00:00
Peiyong Lin
88eb6a20b5 Merge "Add setColorSpaceAgnostic API to SurfaceControl." 2019-03-05 20:18:10 +00:00
Peiyong Lin
f4f0f6424b Add setColorSpaceAgnostic API to SurfaceControl.
Some layers, for example ScreenDecorOverlay*, only carry black, white or gray
with some transpanrency, these values are special as they are color space
agnostic. We don't need to do color conversion on them, instead we want to
intercept the color space before we send to hardware composer for validation.
This patch adds an API to allow this to happen, layers that can be considered
color space agnostic can call this API.

BUG: 126616348
Test: Build, flash and boot. Verify by calling in Letterbox.
Change-Id: I2e1384865bbae6c1bca5ab55962af6a4d529d81d
2019-03-04 12:30:46 -08:00
Christian Wailes
adb444f742 Merge "Renamed blastula to unspecialized app process (usap)" 2019-03-02 01:38:11 +00:00
Roland Levillain
9596071e01 Merge changes I2eef0a3c,I263a1774 am: d378647589 am: 7f5c1132fb
am: 8821960614

Change-Id: I18b5c52d8dc742053144d996ca17befca657053d
2019-03-01 16:52:08 -08:00
Chris Wailes
7e797b6f26 Renamed blastula to unspecialized app process (usap)
Bug: 123017829
Test: make & boot & launch apps
Change-Id: Icfb9f8f4ebabacece817735d60d232cf3afb4e08
2019-03-01 13:18:48 -08:00
Yabin Cui
e3f7aae36d Merge "Check if idmap2 is accessible before executing it." 2019-03-01 18:33:11 +00:00
TreeHugger Robot
fcab4724d8 Merge "Start running CtsGraphicsTestCases for changes to graphics code." 2019-03-01 18:21:35 +00:00
Roland Levillain
ac1d5a9c32 Also check Zygote runtime options when testing flag enable_apex_image.
Test: core/jni/runtime_native_boot-flags-test.sh
Bug: 119800099
Change-Id: I2eef0a3c1f5254b5e270b35477649047c9db40a6
2019-03-01 15:38:54 +00:00
Roland Levillain
764edada31 Refactor Zygote runtime option checking in runtime_native_boot-flags-test.sh.
Generalize runtime option checking functions, so that they can be used
to check options other than the ones starting with `-Xgc:`

Test: core/jni/runtime_native_boot-flags-test.sh
Bug: 72446017
Bug: 120794191
Bug: 123754583
Bug: 119800099
Change-Id: I263a177486f8e24ce92928973f7c8853baf0983b
2019-03-01 15:33:40 +00:00
Roland Levillain
890301deff Merge changes I10c6ed68,I14d6defe am: 8dee71f101 am: 84817b5581
am: b130dbccd8

Change-Id: I52701fa0965283feb469e867dae9e702f37f3b4b
2019-03-01 06:56:15 -08:00
TreeHugger Robot
c72a92eb68 Merge "Use unordered_map in InputEventSender" 2019-03-01 00:50:40 +00:00
Yabin Cui
a60dc9e51d Check if idmap2 is accessible before executing it.
When wrap.sh is used in a debuggable app, AssetManager tries to execute
idmap2 in the app's security context, not in zygote context. And idmap2
isn't allowed to execute in the app's context, thus making an abort.

The abort makes Android studio can't debug the app. To avoid the abort,
check if idmap2 is accessible before executing it.

Bug: 124109020
Test: test manually that android studio can debug the app with this
Test: change.

Change-Id: I82d772358b2266433f82319896a4ca662cc3c273
2019-02-28 14:54:14 -08:00
Roland Levillain
b7bb0a134c Check Android Runtime (Boot) device configuration flag enable_apex_image.
Test: core/jni/runtime_native_boot-flags-test.sh
Bug: 119800099
Change-Id: I10c6ed68eceebef14207bc38cab4e96fb2f75939
2019-02-28 20:54:12 +00:00
Roland Levillain
0bef410319 Refactor unit test for Android Runtime (Boot) device configuration flags.
This is in preparation of checking other device configuration flags.

Test: core/jni/runtime_native_boot-flags-test.sh
Bug: 72446017
Bug: 120794191
Bug: 123754583
Bug: 119800099
Change-Id: I14d6defe5f7e9fcf2f3dd27a4d0fae81f2aec596
2019-02-28 20:53:45 +00:00
TreeHugger Robot
7b1a7b375b Merge "Move PublicFormat definition to libui" 2019-02-28 18:44:52 +00:00
Siarhei Vishniakou
d2188aaa4f Use unordered_map in InputEventSender
There are some potential issues with the current usage of
KeyedVector (see bug). To work around these issues,
use the official std::unordered_map.

Bug: 126161446
Test: presubmit
Change-Id: I86873a3929ba068c8bb9e60699978d7726a1a444
2019-02-28 10:27:18 -08:00
Aurimas Liutikas
1ea6075433 Start running CtsGraphicsTestCases for changes to graphics code.
Start using test mapping for graphics CTS tests and graphics code.

Test: None
Change-Id: I6a3addef7f21683f621f530766323743cafec825
2019-02-28 10:16:27 -08:00
TreeHugger Robot
f86eaa2010 Merge "SurfaceControl: add getAllowedDisplayConfigs" 2019-02-28 03:12:18 +00:00
François Gaffie
ebb67d0e77 Add Volume per Attributes setter/getters
This patch adds in AudioSystem setter/getter of volume index
and also getter on index min and max according to the given
audio attributes.

Bug: 124767636
Test: dumpsys media.audio_policy
Change-Id: Ia20fcfbf5e20c98de5eb07551c299dc99d678fb8
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
2019-02-27 16:22:00 -08:00
François Gaffie
adcd00a7c8 AudioVolumeGroup introspection & callback JAVA APIs
This CL adds introspection APIs for Audio Volume group
and callback notification on group volume change.
It allows to keep the same level of service available today
in CarAudioManager and is a starting point to get rid of Stream Alias
hard coded in AudioServer.

Bug: 124767636
Test: dumpsys media.audio_policy
Change-Id: I48909df93c146f071acd24cd3ecc608cb98b4d7e
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
2019-02-27 16:21:27 -08:00
Ady Abraham
42f9a2fbbd SurfaceControl: add getAllowedDisplayConfigs
expose ISurfaceComposer::getAllowedDisplayConfigs to SurfaceControl.

Test: manual test to call getAllowedDisplayConfigs() from SurfaceControl
observe config change.
Bug: 122905403

Change-Id: I0587ac5ed2eb29788c2ce941d9c54ebfd215ddf9
2019-02-27 21:49:24 +00:00
Eric Laurent
5d38dc3f6c Merge "soundtrigger JNI: fix AudioFormat channel mask" 2019-02-27 17:00:01 +00:00
François Gaffie
f4f3bfe747 Add API to retrieve Audio Product Strategy from a given Audio Attributes
In order to ensure only one matching algorithm is implemented in the
audio policy engine, we cannot use the list of audio product strategy
to let the client of this API inferring the product strategy to use.
It shall request the audio policy manager which product strategy shall be
followed by a given Audio Attributes.

Bug: 124767636
Test: dumpsys media.audio_policy
Change-Id: I372a47df4a35efd68a3ea327581af54823997dba
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
2019-02-26 21:27:19 -08:00
Eric Laurent
66ef06aa1f soundtrigger JNI: fix AudioFormat channel mask
Bug: 115507927
Test: OK google detection
Change-Id: Ic1dd6bd814a1f1efbbf7d476d8426e9aa65a7906
2019-02-26 18:23:22 -08:00
Martin Stjernholm
b62d5c7697 Merge "Log the pid of the forked zygote child." am: 820cfa422c am: 181c318f1f
am: 9669a5421d

Change-Id: I77c9339d939236435abad7fb29ed7d408c83aceb
2019-02-26 16:11:28 -08:00
TreeHugger Robot
1f24ccf2f6 Merge changes from topic "display_policy"
* changes:
  DisplayEventDispatcher: add DISPLAY_EVENT_CONFIG_CHANGED
  SurfaceControl: add setAllowedDisplayConfigs
2019-02-27 00:01:45 +00:00
Treehugger Robot
820cfa422c Merge "Log the pid of the forked zygote child." 2019-02-26 23:22:52 +00:00
Josh Gao
cf98fb8c58 Merge "Switch LocalSocket to android::base::{Send,Receive}FileDescriptorVector." am: 021a9a4a4c am: 07113dcf4a
am: 247b34eaab

Change-Id: Idc55e00bf0470f028192a193f1e7e51ccd0dba4c
2019-02-26 14:05:10 -08:00
TreeHugger Robot
91c4cd6515 Merge "Re-run glgen/gen" 2019-02-26 21:58:43 +00:00
Josh Gao
021a9a4a4c Merge "Switch LocalSocket to android::base::{Send,Receive}FileDescriptorVector." 2019-02-26 21:29:42 +00:00
Martin Stjernholm
a9bd8c3e56 Log the pid of the forked zygote child.
Useful to link together the pids of the zygote and its children in logcat
output.

Test: Flash and boot, run "adb logcat"
Change-Id: I524b70aed7d1ce7a378df0e2b2063e23f1f9a454
2019-02-26 20:05:41 +00:00
Christian Wailes
bda1b8f60f Merge changes Ib8f3b5b0,I66b01930,I560cdf9c
* changes:
  Teaches the System Server to enable the Zygote's blastula pool.
  Added pool management code around zygote state changes.
  Improved file descriptor cleanup in Zygote.
2019-02-26 18:21:49 +00:00
Orion Hodson
c240f22bdf Re-run glgen/gen
Corresponding change to glgen attempts to generate code closer to
manual edits in cpp files here.

Bug: 126352534
Bug: 124064285

Test: run frameworks/native/opengl/tools/glgen/gen, copy outputs, build.
Change-Id: I32a62dfc80ba87d689ff366b83650c9a3b6f872d
2019-02-26 18:09:36 +00:00
Leon Scroggins III
eac1423a31 Pass ColorSpace to AnimatedImageDrawable
Bug: 123301872
Bug: 117601185
Test: Manual (Ie18811ba29a1db163aca08472b04ae185e9344f0)
Test: CTS (Ie4b0a232effc67ab7a7fc6070302c722177cadfa)
Test: Infeasible (verify desired ColorSpace is used)

When calling setTargetColorSpace on an ImageDecoder for an animated
image, pass this to the AnimatedImageDrawable. Also respect an EXTENDED
ColorSpace as a cue to decode to RGBA_F16, as with Bitmaps.

Call ImageDecoder#checkState for AnimatedImageDrawables, as with
Bitmaps.

Change-Id: I5f6e11ee14ce4477bfedf2d1fdde8e15ed5f24d5
2019-02-26 12:03:29 -05:00
Sudheer Shanka
47d759f2c4 Merge "Look for visible vols for a user under /mnt/user/<userId>/package/." 2019-02-26 16:18:15 +00:00
Nicolas Geoffray
83624df78e Merge "Query the enable_apex_image flag from native experiment." am: ed74814369 am: 32498c5c0c
am: d63481be77

Change-Id: Ib41e65bd247e2b5c620b72ca024aab868f8f6ea6
2019-02-26 03:52:14 -08:00
Kiyoung Kim
cfc8da11f6 Add product apk support from libnativeloader
Currently libnativeloader appends vendor lib path if apk is from vendor
partition. Similar to this, as part of mainline core, we should add
product lib path if apk if from product partition.

Bug: 124705551
Test: m -j && tested from crosshatch with product apps (such as Wallpaper)
Change-Id: Iaa8d0ea61b1b9ab8a1da676a492f75c6a5d71d5d
2019-02-26 18:13:07 +09:00
Josh Gao
79e3be8a84 Switch LocalSocket to android::base::{Send,Receive}FileDescriptorVector.
The previous implementation allocated an array of size
CMSG_SPACE(count) to store CMSG_LEN(count * sizeof(int)) elements, which
leads to bad things happening for values of count greater than 1 on
32-bit, and 2 on 64-bit.

Test: atest android.net.LocalSocketTest
Test: atest android.net.cts.LocalSocketTest
Change-Id: I0a9502c3358d8fa92d2d20e344c6270d6baedc07
2019-02-25 23:21:23 -08:00
Rob Carr
dbd04bb64b Merge "Exclude secure layers from most screenshots taken by the system server." 2019-02-25 23:57:26 +00:00
TreeHugger Robot
c0a6d77625 Merge "Fix long paths on Windows" 2019-02-25 21:06:17 +00:00
Orion Hodson
475468490d Remove unused static variables
Bug: 124338141
Test: m -j100
Change-Id: I84b30fc5e9fce9a4f51725b0dffd8848a6922512
2019-02-25 15:01:32 +00:00
Nicolas Geoffray
7a6a0dab57 Query the enable_apex_image flag from native experiment.
Bug: 119800099
Test: m
Change-Id: I730ffaae640ad6c427b3fbc898d838af0962fe5f
2019-02-25 14:25:26 +00:00
Roland Levillain
72a1815e6f Replace generic GC type flag with a specific Generational CC flag.
The "gctype" device configuration flag (from the "runtime_native_boot"
namespace) was a string passed verbatim as an argument to the runtime
option "-Xgc". It was too generic, conveyed no typing information, and
was error-prone (there was no control over what was passed from the
server to the zygote, and then to the runtime).

This change replaces "gctype" with a specific, Boolean
"enable_generational_cc" flag. This new flag better reflects the
nature of the experiment to be conducted (either enable or disable
generational garbage collection in ART's concurrent copying
collector).

Test: core/jni/runtime_native_boot-flags-test.sh
Bug: 72446017
Bug: 120794191
Bug: 123754583

(cherry picked from commit 72b16f0ad0a4f0f81c0db4a24ecd6629348950e0)

Change-Id: I5f30f38914bb44d6ce9dc6870ee2c566ce66278a
Merged-In: I30a73171c0dc3c7bc891c4f164eed0ba42b0f420
2019-02-25 14:25:12 +00:00
Roland Levillain
ddcbe90fb7 Add a unit test for Android Runtime (Boot) device configuration flags.
These flags live in device configuration namespace
`runtime_native_boot`. Exercise them by checking that they are passed
to the zygote process(es) as a runtime option after a reboot.

At the moment this test only checks flag `gctype`, which is the only
flag currently implemented in namespace `runtime_native_boot`.

Test: core/jni/runtime_native_boot-flags-test.sh
Bug: 72446017
Bug: 120794191
Bug: 123524494
Bug: 123754583

(cherry picked from commit 0645bcb84393b8048ceee9df5f90c5ba2dfa0184)

Change-Id: I015fe475818162f5bbc7f18a64764cb14ab0a768
Merged-In: I6cf43c3ee0d405fb1b69a450587dd712f911358d
2019-02-25 14:25:00 +00:00
Roland Levillain
688ed594ba Read "gctype" flag from namespace "runtime_native_boot".
ART does not support changing the garbage collector type/configuration
dynamically at the moment, so we can only change it when the runtime
starts, i.e. at boot time.

Also materialize "gctype" and "runtime_native_boot" as named constants.

Bug: 120794191
Bug: 72446017
Test: adb shell device_config put runtime_native_boot gctype nogenerational_cc && adb reboot
Test: adb shell device_config put runtime_native_boot gctype generational_cc && adb reboot

(cherry picked from commit 7b098c8487a05360de8f80fde48cfd28a3aa8321)

Change-Id: Ied0eacf46ab92ba128d0a538a314f42c18c5b8f5
Merged-In: Ibf765a5f442136d6327be99786ea9ae4b4537d59
2019-02-25 14:24:45 +00:00
Orion Hodson
8f798b39ee Remove unnecessary field lookups in getPointer
getNativeHandle fields are resolved in nativeClassInit.

Bug: 124338141
Test: m -j100
Change-Id: I637975f9835027ec87f0e76ca6528797efa06e5d
2019-02-25 14:22:27 +00:00