OSDN Git Service

android-x86/frameworks-native.git
4 years agoFree mObjects if no objects left to realloc on resize
Michael Wachenschwanz [Tue, 4 Jun 2019 00:24:51 +0000 (17:24 -0700)]
Free mObjects if no objects left to realloc on resize

Bug: 134168436
Bug: 133785589
Bug: 34175893
Test: atest CtsOsTestCases:ParcelTest#testObjectDoubleFree
Change-Id: I82e7e8c7b4206fb45b832a71d174df45edb62710
Merged-In: I82e7e8c7b4206fb45b832a71d174df45edb62710
(cherry picked from commit edd3e3d8f441131b02e5a78d18babf9d16ef9e6e)

4 years ago[RESTRICT AUTOMERGE] libbinder: Status: check dataPosition sets.
Steven Moreland [Mon, 20 May 2019 22:28:13 +0000 (15:28 -0700)]
[RESTRICT AUTOMERGE] libbinder: Status: check dataPosition sets.

Bug: 132650049
Test: fuzzer
Change-Id: Id230eae4316a444bc82b416b2049d5a5f589f89a
(cherry picked from commit 00d4358fcd2875b1e26ac50d620f2dec439ef3ee)

4 years agolibbinder: readCString: no ubsan sub-overflow
Steven Moreland [Fri, 17 May 2019 20:14:06 +0000 (13:14 -0700)]
libbinder: readCString: no ubsan sub-overflow

Bug: 131859347
Test: fuzzer
Change-Id: I95a0f59684a172925f1eab97ff21e5d14bc79cc8
Merged-In: I95a0f59684a172925f1eab97ff21e5d14bc79cc8
(cherry picked from commit d0d4b584fc294d2c124385644099852918416344)

5 years agoZero-initialize HIDL structs before passing
Pawin Vongmasa [Thu, 25 Apr 2019 10:44:52 +0000 (03:44 -0700)]
Zero-initialize HIDL structs before passing

Test: cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice
(only existing failures/flakes)
Bug: 131267328
Bug: 131356202
Change-Id: I91e6e0c692d470f4d3a713068545cedf5ae925a7
Merged-In: I91e6e0c692d470f4d3a713068545cedf5ae925a7

(cherry picked from commit c4a5f5ec811b149428e0835b7aabc6c4c802e720)

5 years agoSanitize InputMessage before sending
Siarhei Vishniakou [Sat, 17 Nov 2018 06:18:53 +0000 (22:18 -0800)]
Sanitize InputMessage before sending

The struct InputMessage has many fields, and is force-aligned to 8-byte
boundaries. There are also some padding fields that carry no
information.

This struct is typically allocated in the stack and populated with
various values before being sent across as a stream of bytes through the
socket.

Therefore, the "unused" data portions of the struct could contain
portions of the stack, since there aren't ever writes to those memory
locations.

To avoid this information leak, forcefully sanitize the struct. Create a
new struct that is explicitly set to zero. Next, only fill the
meaningful fields manually.

Bug: 115739809
Test: cts-tradefed run cts -m CtsSecurityBulletinHostTestCases -t android.security.cts.Poc18_12; adb shell monkey 100000
Change-Id: I7e44dacf1e8fa3156c8e4d2f7784ef0c53dab507
Merged-In: I7e44dacf1e8fa3156c8e4d2f7784ef0c53dab507
(cherry picked from commit e730f5aaa1c726ee9998a080e2d7f6284f4afec8)

5 years agolibui: add boundary check to GraphicBuffer::unflatten
Chia-I Wu [Tue, 9 Oct 2018 22:22:46 +0000 (15:22 -0700)]
libui: add boundary check to GraphicBuffer::unflatten

Commit cb496acbe593326e8d5d563847067d02b2df40ec removed the boundary
check by accident.

Bug: 114223584
Test: manual
Change-Id: I057bc02d5807e438530d1a5327c2e02b9d154151
(cherry picked from commit bf8d7210c4bbbdc875e9695a301cdf9c3b544279)

6 years agoIncrement when attempting to read protected Parcel Data
Michael Wachenschwanz [Tue, 17 Apr 2018 23:52:40 +0000 (16:52 -0700)]
Increment when attempting to read protected Parcel Data

Make sure to increment the parcel data position even when trying to
improperly read from protected data

Bug: 29833520

Test (M): cts-tradefed run cts -c android.os.cts.ParcelTest -m testBinderDataProtection
Test (M): cts-tradefed run cts -c android.os.cts.ParcelTest -m testBinderDataProtectionIncrements
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest#testBinderDataProtection
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest#testBinderDataProtectionIncrements

Change-Id: Ie4aae6277fc5f5c924f603d9828c3a608998b986
Merged-In: Ie4aae6277fc5f5c924f603d9828c3a608998b986
(cherry picked from commit 6a825e8ad1a3928dd872bb7c3fbcd94784d77267)

6 years agoDon't pad before calling writeInPlace().
Martijn Coenen [Wed, 4 Apr 2018 09:46:56 +0000 (11:46 +0200)]
Don't pad before calling writeInPlace().

writeInplace() itself already pads securely, by masking off
the padded bytes. If the padding is done before calling
writeInplace(), no mask is applied, and heap data can leak.

Bug: 77237570
Test: builds
Change-Id: Ide27a0002d4ed4196530430760245b971f6a3f44
Merged-In: Ide27a0002d4ed4196530430760245b971f6a3f44

(cherry picked from commit f8542381b72a7bb2452a5278a00ca8c34edbf8a0)
(cherry picked from commit 732132b765cd7b667f16cf32f0fe4c852d7d44dd)

6 years agoDisallow reading object data from Parcels with non-object reads
Michael Wachenschwanz [Sat, 18 Nov 2017 02:25:05 +0000 (18:25 -0800)]
Disallow reading object data from Parcels with non-object reads

The check added to each non-object reads adds an overhead. If the
objects (binders and file descriptors) were written to the Parcel in
sequential order then check adds a small O(1) overhead to each read,
plus an O(N) overhead to the first read (to verify the N objects were
added in order).
If the objects were written out of order (as in by jumping around the Parcel
with setDataPosition and writing Binder, DON'T DO THIS!!) (writing non
objects out of order is fine), the first read is forced to sort the objects
in the internal bookkeeping. Based on the assumption non sequential writes
are infrequent and overall Parcels are probably mostly sorted, insertion
sort was used. Worst case sorts will add an O(N^2) overhead to the first
non object read from the Parcel.

Test: run cts -m CtsOsTestCases -t android.os.cts.ParcelTest

Bug: 29833520
Change-Id: I82de8eb5f5eb56f869542d5358e96884c24301b2
(cherry picked from commit c517681c66a1a387be657e0cf06da8d19659dd14)

6 years agoAdd bounds check to sensors direct channel creation
Brian Duddie [Thu, 15 Feb 2018 23:02:29 +0000 (15:02 -0800)]
Add bounds check to sensors direct channel creation

Avoids attempting to read a 0-size array during input validation. Adds
SafetyNet logging when this is triggered.

Also, change the cast for the ashmem size check from int to int64_t to
avoid potential conversion to negative number on 32-bit systems.

Bug: 70986337
Test: run POC, confirm via logs that function bails early
Change-Id: I674285738983f18de3466f9e818d83dabe269b7d
(cherry picked from commit 0eb4624b33aeb375ae431a6b1e2b787c959968fe)

6 years agosurfaceflinger: make vsync injection more robust
Chia-I Wu [Thu, 5 Oct 2017 21:24:41 +0000 (14:24 -0700)]
surfaceflinger: make vsync injection more robust

There are more issues than I expected :)

 - no lock to synchronize enable/disable and injection
 - Every time injection is diabled and enabled, a new EventThread is
   created
 - mCallback might be nullptr
 - ENABLE_VSYNC_INJECTIONS/INJECT_VSYNC should require special
   permission
 - MessageQueue::setEventThread must be called from the main thread
 - MessageQueue::setEventThread does not handle EventThread switch
   well

Bug: 65483324
Test: manual
Merged-In: I7d7b98d1f57afc64af0f2065a9bc7c8ad004ca9f
Change-Id: I7d7b98d1f57afc64af0f2065a9bc7c8ad004ca9f
(cherry picked from commit 6200eacdc927776483d775562db11cce284cc7e0)

6 years agoMerge cherrypicks of [3122088, 3121430, 3119129, 3119130, 3119131, 3120667] into...
android-build-team Robot [Wed, 25 Oct 2017 05:31:29 +0000 (05:31 +0000)]
Merge cherrypicks of [312208831214303119129311913031191313120667] into oc-mr1-release

Change-Id: If407b5d78299ba0be9410de4546042986fd65758

6 years agoAdd new color setting
Romain Guy [Tue, 24 Oct 2017 20:40:32 +0000 (21:40 +0100)]
Add new color setting

On devices that support wide color rendering and color management,
add a new setting to disable color management ("saturated" color
mode). To disable color management, the framework can set a persistent
property. Color management can be also toggled by using a Binder
transaction. Finally this change adds a new Binder query so Settings
can easily check whether the device supports wide color rendering.

Bug: 68159303
Test: manual (adb shell + apps)
Change-Id: If74d9b0273bc04f4a3d11e63fe2ec96451fbcc2e
(cherry picked from commit 54f154a28284eabb52ade2689d4a9f8fa190163b)

6 years agoSnap for 4391495 from 331d79d26b237a6ebf4284dd99c79b0fe5ab55df to oc-mr1-release
android-build-team Robot [Thu, 12 Oct 2017 07:25:50 +0000 (07:25 +0000)]
Snap for 4391495 from 331d79d26b237a6ebf4284dd99c79b0fe5ab55df to oc-mr1-release

Change-Id: Ia1a538a97249d77b25b1f1568df514547c0bcd5f

6 years agoAdd missing transitive dependency to pdx_tool.
Corey Tabaka [Thu, 12 Oct 2017 02:00:50 +0000 (19:00 -0700)]
Add missing transitive dependency to pdx_tool.

Bug: 65455724
Test: make -j30
Change-Id: I03a22e10d92ea53bb2e1631e4203a186e42fa265

6 years agoRevert "Revert PDX tracing."
Corey Tabaka [Wed, 11 Oct 2017 17:52:54 +0000 (10:52 -0700)]
Revert "Revert PDX tracing."

This reverts commit 05cd77c494aa7042fca7978e1b934855598b765e.

Bug: 65455724
Test: make -j30
Change-Id: Id531101cc35b661f02291eed0c044e96f5a91a12

6 years agoAdd missing transitive dependency to atrace.
Corey Tabaka [Wed, 11 Oct 2017 17:49:57 +0000 (10:49 -0700)]
Add missing transitive dependency to atrace.

This is the proper fix for the revert in ag/3048738.

Bug: 65455724
Test: lunch full-eng && make -j30
Change-Id: I88d37fca2d1f71a46595dd74b5fd6749fa4b477d

6 years agoRevert PDX tracing.
Michael Wright [Wed, 11 Oct 2017 14:44:26 +0000 (15:44 +0100)]
Revert PDX tracing.

This broke full-eng / docs / m_e_arm-eng builds.

Test: lunch full-eng && m-j8
Change-Id: I79b0176738e4de35cca25e9618e64aa2bd4c4316

6 years agoSnap for 4388906 from 52ea25cf06cef250ec73052611b48556b3fce4d5 to oc-mr1-release
android-build-team Robot [Wed, 11 Oct 2017 07:21:48 +0000 (07:21 +0000)]
Snap for 4388906 from 52ea25cf06cef250ec73052611b48556b3fce4d5 to oc-mr1-release

Change-Id: I8be8e1ad05e7445a5c03a3f6009b5e1e30171a59

6 years agoAdd shared memory based buffer metadata
Corey Tabaka [Thu, 14 Sep 2017 01:02:48 +0000 (18:02 -0700)]
Add shared memory based buffer metadata

This CLs reduces BufferHub CPU consumption by adding asynchronous
state transition so that out-of-process VR composition can run on 2016
pixel devices smoothly. In addition, this CL addresses a couple corner
cases in the existing bufferhub logic, which fixes various blackscreen
issues.

1/ Tracks buffer transition states (gained, posted, acquired, released)
   from the client side via atomic shared memory and adds
   PostAsync/AcquireAsync/ReleaseAsync/GainAsync with metadata  and
   fence support.
2/ Adds dequeue order guarantee for buffers enqueued with
   dvrWriteBufferQueuePostBuffer.
3/ Synchronous BuffeHub operations are still supported.
4/ Bump up the bufferhubd's soft limit of open file descriptor.
5/ Handle orphaned consumer in acquired state. This is a corner case
   that consumer process goes aways (most likely due to a crash) leaving
   buffer stuck in acquired state with inconsistent buffer state.
6/ Fixes a race condition for released buffer to be Gain'ed and
   Acquire'd when a new consumer is created in released state.
7/ Improve silent consumer queue efficiency: Silent queues no longer
   import buffers or receive signals about new buffers and they are
   limited to only spawning other consumers and notifications about
   producers hanging up.
8/ Modify PDX/UDS channel event signaling to work around epoll
   behavior. PDX UDS uses a combination of an eventfd and an epoll set
   to simulate the original PDX transport channel events. An odd
   behavior discovered in the kernel implementation of epoll was found
   that causes the epoll fd to "unsignal" itself whenever epoll_wait()
   is called on it, regardless of whether it should still be
   pending. This breaks the edge triggerd behavior in nested epoll sets
   that channel events depend on. Since this is unlikely to ever be
   fixed in the kernel we work around the behavior by using the epoll
   set only as a logical OR of two eventfds and never calling
   epoll_wait() on it. When polling is required we use regluar poll()
   with the eventfds and data fd to avoid the bad behavior in
   epoll_wait().
9/ Keep reading data after PDX hangup signal. UDS will signal hangup
   when the other end of the socket closes. However, data could still be
   in the kerenl buffer and should be consumed. Fix an issue where the
   service misses an impulse sent right before the socket is closed.

Bug: 65455724
Bug: 65458354
Bug: 65458312
Bug: 64027135
Bug: 67424527
Test: libpdx_uds_tests
      bufferhub_tests
      buffer_hub_queue-test
      buffer_hub_queue_producer-test
      dvr_api-test

Change-Id: Id07db1f206ccf4e06f7ee3c671193334408971ca

6 years agoSnap for 4378450 from 35b5114be8da71c69fc8a1ff8fb457c912c0992f to oc-mr1-release
android-build-team Robot [Thu, 5 Oct 2017 07:30:32 +0000 (07:30 +0000)]
Snap for 4378450 from 35b5114be8da71c69fc8a1ff8fb457c912c0992f to oc-mr1-release

Change-Id: I93cf952e3df19205d63b3d3bd4fccc22cd262432

6 years agoSolve the composer service NULL pointer crash
Randy Xu [Wed, 5 Jul 2017 06:18:38 +0000 (14:18 +0800)]
Solve the composer service NULL pointer crash

The callback functions are set nullptr in ComposerClient::~ComposerClient()
./composer/2.1/default/ComposerClient.cpp:160:    mHal.enableCallback(false)

However, the callbacks are still used in hwc2on1adaptor, it will cause segment fault.

Bug: 64650599

Test: adb shell stop

Change-Id: I92e6a6b42418e987a7ead041f2d95c194b6a16e8
Signed-off-by: Randy Xu <randy.xu@intel.com>
Signed-off-by: Qiming Shi <qiming.shi@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
Signed-off-by: Gaurav Sarode <sgaurav@google.com>
6 years agoSnap for 4373604 from 8c6462c8c48022a4a77ab8ed218551880d2bbab9 to oc-mr1-release
android-build-team Robot [Tue, 3 Oct 2017 07:28:35 +0000 (07:28 +0000)]
Snap for 4373604 from 8c6462c8c48022a4a77ab8ed218551880d2bbab9 to oc-mr1-release

Change-Id: Iabc1c91c428511b1f337ef6e548dc69df13ebb02

6 years agoMerge "Limit Display-P3 surface formats to 8888" into oc-mr1-dev
Courtney Goeltzenleuchter [Mon, 2 Oct 2017 21:31:43 +0000 (21:31 +0000)]
Merge "Limit Display-P3 surface formats to 8888" into oc-mr1-dev

6 years agorelease-request-53526352-7b51-4ab1-a661-632ffc55dd7c-for-git_oc-mr1-release-4371241...
android-build-team Robot [Mon, 2 Oct 2017 04:19:31 +0000 (04:19 +0000)]
release-request-53526352-7b51-4ab1-a661-632ffc55dd7c-for-git_oc-mr1-release-4371241 snap-temp-L10900000107789672

Change-Id: I4a64d37aab8dde4ad6abc1bc37a2477683696a39

6 years agoMerge "Fix deadlock when transitioning to vr flinger" into oc-mr1-dev
Steven Thomas [Sat, 30 Sep 2017 00:51:21 +0000 (00:51 +0000)]
Merge "Fix deadlock when transitioning to vr flinger" into oc-mr1-dev

6 years agoMerge "Use the HWC caching mechanism to avoid stalls in the ion driver." into oc...
TreeHugger Robot [Fri, 29 Sep 2017 18:05:21 +0000 (18:05 +0000)]
Merge "Use the HWC caching mechanism to avoid stalls in the ion driver." into oc-mr1-dev

6 years agoFix deadlock when transitioning to vr flinger
Steven Thomas [Thu, 28 Sep 2017 22:30:23 +0000 (15:30 -0700)]
Fix deadlock when transitioning to vr flinger

If we were unlucky with the timing when switching to vr flinger we would
sometimes deadlock. The vr dispatch thread would request the display
from surface flinger, locking mStateLock in the process. mStateLock was
being held by the surface flinger main thread, which was processing a
previous request to switch to vr flinger. The main thread was trying to
connect to the vr hardware composer service, which sent a request to the
vr dispatch thread as part of its initialization, leading to the
deadlock.

The deadlock is easily fixed by posting a message to request the vr
flinger switch to the surface flinger main thread, instead of doing it
on the vr dispatch thread.

Bug: 66916578

Test: Confirmed I can still get into/out of vr flinger on
Marlin. There's no longer code to acquire mStateLock in the vr dispatch
thread, so the deadlock is no longer possible.

Change-Id: I3de5476f698ed798f6b9afe927cc733f0f38c56e

6 years agoUse the HWC caching mechanism to avoid stalls in the ion driver.
Corey Tabaka [Thu, 28 Sep 2017 18:15:50 +0000 (11:15 -0700)]
Use the HWC caching mechanism to avoid stalls in the ion driver.

HWC supports caching buffers for layers using "slot" assignments.
Use this in VrFlinger to avoid importing a buffer handle every
frame. The avoids periodic stalls we observe in the ion driver
when mapping a buffer into the HWC address space.

Bug: 66459419
Test: Observe systraces no longer have MapBuffer in HWC in steady
      state; system does not drop frames.

Change-Id: Iba4161b33561322bfbccbfafe600b432a6fa7c44

6 years agoLimit Display-P3 surface formats to 8888
Courtney Goeltzenleuchter [Thu, 28 Sep 2017 17:34:18 +0000 (11:34 -0600)]
Limit Display-P3 surface formats to 8888

Discovered that FP16 and 1010102 may not be supported
for Swapchain. Since we don't have a query mechanism
defined, limit P3 to 8888 which must be supported.
Bug: 66706404
Test: adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity \
-e cmdLine '"deqp --deqp-case=dEQP-VK.wsi.android.colorspace \
--deqp-log-filename=/sdcard/dEQP-Log.qpa"'

Change-Id: If537c631cd40610f6a62c437f8a7aff70f742fff

6 years agorelease-request-ca7a0f27-e01e-4493-95dc-73b265f88cc9-for-git_oc-mr1-release-4365318...
android-build-team Robot [Thu, 28 Sep 2017 07:28:11 +0000 (07:28 +0000)]
release-request-ca7a0f27-e01e-4493-95dc-73b265f88cc9-for-git_oc-mr1-release-4365318 snap-temp-L33600000106883904

Change-Id: I085cc802f1140f72f3eb80d4cbd0d46722ec24e1

6 years agoSupport picture_in_picture only if device is not low ram
Ng Zhi An [Tue, 26 Sep 2017 18:29:19 +0000 (11:29 -0700)]
Support picture_in_picture only if device is not low ram

Can verify using this command:

    adb shell dumpsys package | grep picture_in_picture

Bug: 65602088
Test: manual
Change-Id: I0e91cb63ce9d4b3ae059afc91d76a36ffc6a0a53

6 years agorelease-request-bbc747ae-190b-4d38-8704-432aa6396c16-for-git_oc-mr1-release-4351869...
android-build-team Robot [Thu, 21 Sep 2017 07:26:59 +0000 (07:26 +0000)]
release-request-bbc747ae-190b-4d38-8704-432aa6396c16-for-git_oc-mr1-release-4351869 snap-temp-L93800000104806132

Change-Id: I1530ca75a479667c9ab39178deaa0e6a15df84ed

6 years agoMerge "libhwc2on1adapter: avoid marking changes if visible regions unchanged" into...
TreeHugger Robot [Thu, 21 Sep 2017 02:25:28 +0000 (02:25 +0000)]
Merge "libhwc2on1adapter: avoid marking changes if visible regions unchanged" into oc-mr1-dev

6 years agoMerge "Deal with unreliable VSYNC signals due to scheduler." into oc-mr1-dev
TreeHugger Robot [Wed, 20 Sep 2017 23:55:09 +0000 (23:55 +0000)]
Merge "Deal with unreliable VSYNC signals due to scheduler." into oc-mr1-dev

6 years agolibhwc2on1adapter: avoid marking changes if visible regions unchanged
Adrian Salido [Tue, 19 Sep 2017 01:48:47 +0000 (18:48 -0700)]
libhwc2on1adapter: avoid marking changes if visible regions unchanged

The function setVisibleRegions is always called as part of composition,
shouldn't mark geometry changed if there are no changes in the visible
regions.

Bug: 65019874
Test: run cts -m CtsViewTestCases -t android.view.cts.DisplayRefreshRateTest#testRefreshRate
Change-Id: I3f93431002fc4b691c799f4ae91aa1488849e4a6

6 years agoMerge "packagemanager_native access to package installer, version" into oc-mr1-dev
Ray Essick [Wed, 20 Sep 2017 16:08:49 +0000 (16:08 +0000)]
Merge "packagemanager_native access to package installer, version" into oc-mr1-dev

6 years agoAdd TYPE_INPUT_CONSUMER to the trusted overlay list.
Michael Wright [Tue, 19 Sep 2017 19:19:39 +0000 (20:19 +0100)]
Add TYPE_INPUT_CONSUMER to the trusted overlay list.

Without this, PIP will break a bunch of apps since its frame fills the
whole screen, even though the application is restricted to its
stackbounds (which are the size of the touch region, not the frame
region).

Bug: 65606046
Test: None
Change-Id: Id7035dace30db37c5a58c66339d0749550a362e5

6 years agopackagemanager_native access to package installer, version
Ray Essick [Tue, 19 Sep 2017 15:49:23 +0000 (08:49 -0700)]
packagemanager_native access to package installer, version

add getInstallerForPackage() and getVersionCodeForPackage()
to support native media.metrics needs.

Bug: 65027506
Test: watch logs for various package combinations
Change-Id: I6f3c551e8f547ab4151ef2400db4e100a6f53abf

6 years agoDeal with unreliable VSYNC signals due to scheduler.
Corey Tabaka [Sat, 16 Sep 2017 07:58:54 +0000 (00:58 -0700)]
Deal with unreliable VSYNC signals due to scheduler.

We see two sources of scheduler jank when waiting for VSYNC:
  - A kernfs issue that wakes up threads using a normal priority
    work queue that may be delayed or have other work on it.
  - The VSYNC callback from HWC is handled by a normal priority
    HwBinder thread that may be delayed by other work.

Change the VrFlinger frame post thread to use an absolute timer-
based dead reckoning loop. VSYNC timestamps from the display
driver are reliable, even if the delivery of the value takes time.
Predict the VSYNC time into the future based on the last known
VSYNC time. If we see that VSYNC has not been signaled by the time
we need to post a frame to HWC we assume that the driver and/or
HWC was delayed so much that the previous frame is still pending
and skip the upcoming frame to avoid double stuffing the driver.

Bug: 65064949
Test: Extensive system tests and systraces. See bug for details.
Change-Id: Iae6c4173b8eac1d179adc3fc8004d3d475b3f156

6 years agorelease-request-1f2fcfef-9736-44dc-8628-3ba96dac60db-for-git_oc-mr1-release-4343541...
android-build-team Robot [Sun, 17 Sep 2017 07:33:59 +0000 (07:33 +0000)]
release-request-1f2fcfef-9736-44dc-8628-3ba96dac60db-for-git_oc-mr1-release-4343541 snap-temp-L73700000103533431

Change-Id: If3104e7d71eaa75c0b93177ea76076626a7b09bf

6 years agoMerge "Revert "Add runpath to lshal_test"" into oc-mr1-dev
TreeHugger Robot [Thu, 14 Sep 2017 22:49:53 +0000 (22:49 +0000)]
Merge "Revert "Add runpath to lshal_test"" into oc-mr1-dev

6 years agoRevert "Add runpath to lshal_test"
Steven Moreland [Thu, 14 Sep 2017 17:12:08 +0000 (17:12 +0000)]
Revert "Add runpath to lshal_test"

This reverts commit 864c07077b0283ecf9bd36a0381951a19ec8c3df.

No special behavior for tests.

Reason for revert: b/65603915
Bug: 64776708

Change-Id: Ib64d4f6ef5ea59afa1d3c408c792685a3d025c0a

6 years agorelease-request-f0fc1aa1-730c-4deb-b1ff-e8ebeeccc4b5-for-git_oc-mr1-release-4335659...
android-build-team Robot [Thu, 14 Sep 2017 07:26:48 +0000 (07:26 +0000)]
release-request-f0fc1aa1-730c-4deb-b1ff-e8ebeeccc4b5-for-git_oc-mr1-release-4335659 snap-temp-L85900000102427279

Change-Id: I275b9aaa79e004779ec52a2fa597bd50b520ce7f

6 years agoMerge "Add runpath to lshal_test" into oc-mr1-dev
Yifan Hong [Wed, 13 Sep 2017 22:13:26 +0000 (22:13 +0000)]
Merge "Add runpath to lshal_test" into oc-mr1-dev

6 years agoMerge "Reduce the number of Send requests over UDS per IPC invocation" into oc-mr1-dev
TreeHugger Robot [Wed, 13 Sep 2017 19:54:46 +0000 (19:54 +0000)]
Merge "Reduce the number of Send requests over UDS per IPC invocation" into oc-mr1-dev

6 years agoMerge "Adjust the validation code for secondary dex paths" into oc-mr1-dev
Calin Juravle [Wed, 13 Sep 2017 18:09:57 +0000 (18:09 +0000)]
Merge "Adjust the validation code for secondary dex paths" into oc-mr1-dev

6 years agoReduce the number of Send requests over UDS per IPC invocation
Alex Vakulenko [Wed, 6 Sep 2017 22:35:04 +0000 (15:35 -0700)]
Reduce the number of Send requests over UDS per IPC invocation

We sent up to 3 separate send requests over a socket. Now combine
then into one sendmgs() to improve performance and thread scheduling.

This improves PDX/UDS performance by up to 2x in some cases.

Bug: 65379030
Test: Sailfish works normally. Was able to run VR apps.
Change-Id: I00734d2c3f06d7d42b089569a8cc11c2273a1b7f

6 years agoAdjust the validation code for secondary dex paths
Calin Juravle [Mon, 11 Sep 2017 18:50:36 +0000 (11:50 -0700)]
Adjust the validation code for secondary dex paths

Do not validate the package path when reconciling secondary dex files. If
the file does not exist we cannot resolve the system sym links (e.g.
/data/user/0 -> /data/data) and the validation will fail leaving oat files
behind.

Bug: 64460009
Test: adb shell cmd package reconcile-secondary-dex-files
com.google.android.googlequicksearchbox (after removing some files)
      adb shell cmd package compile -m speed --secondary-dex
com.google.android.googlequicksearchbox
      adb shell /data/nativetest64/installd_utils_test/installd_utils_test

Change-Id: I9734ad18a579d44088180326661d8cf8288e90be

6 years agoAdd runpath to lshal_test
Jiyong Park [Wed, 13 Sep 2017 08:37:40 +0000 (17:37 +0900)]
Add runpath to lshal_test

android.hardware.test.baz@1.0.so is installed to /data/nativetest(64),
and no longer to /system/lib(64) or /system/lib(64)/vndk, because the
interface library is only for testing.

Set runpath so that lshal_test can find the interface library in the
non-standard directory.

Bug: 65603915
Test: m -j lshal_test
adb push out/target/product/<name>/data/nativetest* /data
adb shell /data/nativetest/lshal_test/lshal_test

Change-Id: I854b08acb6442990ed369bfbc517ad1a93c94584

6 years agorelease-request-b613f8ce-05b5-465e-b783-c1b87f3c1e95-for-git_oc-mr1-release-4332123...
android-build-team Robot [Wed, 13 Sep 2017 07:32:29 +0000 (07:32 +0000)]
release-request-b613f8ce-05b5-465e-b783-c1b87f3c1e95-for-git_oc-mr1-release-4332123 snap-temp-L59300000101925107

Change-Id: I503fd7810cf68282db9ce3c87e2d202e839f7d8a

6 years agoMerge "Overhual DvrBuffer and DvrBufferQueue API: Step 1" into oc-mr1-dev
TreeHugger Robot [Wed, 13 Sep 2017 04:27:24 +0000 (04:27 +0000)]
Merge "Overhual DvrBuffer and DvrBufferQueue API: Step 1" into oc-mr1-dev

6 years agoMerge "Keep standalone devices in VrFlinger mode." into oc-mr1-dev
TreeHugger Robot [Tue, 12 Sep 2017 23:44:31 +0000 (23:44 +0000)]
Merge "Keep standalone devices in VrFlinger mode." into oc-mr1-dev

6 years agoOverhual DvrBuffer and DvrBufferQueue API: Step 1
Jiwen 'Steve' Cai [Fri, 8 Sep 2017 18:10:29 +0000 (11:10 -0700)]
Overhual DvrBuffer and DvrBufferQueue API: Step 1

Adding new APIs:

dvrWriteBufferQueueGainBuffer
dvrWriteBufferQueuePostBuffer
dvrReadBufferQueueAcquireBuffer
dvrReadBufferQueueReleaseBuffer

Those new APIs streamlines DVR buffer operations:
1/ It allows static Dvr{Read,Write}Buffer objects to be statically
allocated with the queue.
2/ Symentric Gain/Post on WriteBufferQueue and Acquire/Release on
ReadBufferQueue.
3/ Use fixed buffer metadata.
4/ This is also a prerequisite to using shared memory based metadata and
async buffer IPC.

More details and discussion at: go/gvr-async-bufferhub

Special note regarding DVR API order in this CL: The new buffer queue
API entries are inserted before new PoseClient API as the PoseClient is
still blocked from being released and the new BufferQueue APIs are
expected to be released sooner than that.

Bug: 65455724
Bug: 65468551
Bug: 65458332
Bug: 65165821
Test: dvr_api-test
Change-Id: Iae8e7787d696d72ebf7457df9f98f4467cd20932

6 years agoKeep standalone devices in VrFlinger mode.
Corey Tabaka [Tue, 22 Aug 2017 18:59:15 +0000 (11:59 -0700)]
Keep standalone devices in VrFlinger mode.

Avoid unnecessary tear-down and bring up of HWC client in standalone
devices. This saves time during screen-on because standalone devices
only use VrFlinger mode.

Remove dead code that used to check the panel driver for missed frames.
No drivers expose the sysfs node that provided this function anymore.

Test: Manual testing. Observe stable DON/DOFF behavior.
Bug: 65248224
Change-Id: Id9ebb76982621848d97792496a09b6da8c4e5928

6 years agorelease-request-946c768b-83eb-4b7b-83e7-5737856fa8ec-for-git_oc-mr1-release-4326576...
android-build-team Robot [Sun, 10 Sep 2017 07:24:55 +0000 (07:24 +0000)]
release-request-946c768b-83eb-4b7b-83e7-5737856fa8ec-for-git_oc-mr1-release-4326576 snap-temp-L80300000101054689

Change-Id: Ie7617b87e5f12b8c863111fb2f1dae42485fedd5

6 years agoMerge "Fix stack use-after-scope in InputReader" into oc-mr1-dev
TreeHugger Robot [Fri, 8 Sep 2017 23:49:30 +0000 (23:49 +0000)]
Merge "Fix stack use-after-scope in InputReader" into oc-mr1-dev

6 years agoMerge "surfaceflinger: handle executeCommands transaction errors" into oc-mr1-dev
Chia-I Wu [Fri, 8 Sep 2017 22:31:32 +0000 (22:31 +0000)]
Merge "surfaceflinger: handle executeCommands transaction errors" into oc-mr1-dev

6 years agosurfaceflinger: handle executeCommands transaction errors
Chia-I Wu [Fri, 8 Sep 2017 17:14:34 +0000 (10:14 -0700)]
surfaceflinger: handle executeCommands transaction errors

Unlike other functions, executeCommands both sends and receives
handles.  It can fail for reasons such as out-of-fd.  We want to
protect SurfaceFlinger against out-of-fd.

Bug: 65449888
Test: manual
Change-Id: Id9420dbd6d0a943737c90bd3a1ae0df3805a4cb0

6 years agoSet the layer composition type in HWC
Pat Plunkett [Wed, 12 Jul 2017 21:09:27 +0000 (14:09 -0700)]
Set the layer composition type in HWC

Setting up the VR hardware composer was causing a call to
setLayerCompositionType with an invalid composition type. This removes the
call, since setting the layer composition type is already handled in
Layer::Prepare().

Bug: 63633934
Test: Start VR mode, check that the logcat errors are no longer present.
Change-Id: I94f9a253bce9c5c25be7927d0003adbb9409ab36

6 years agorelease-request-8cd2a23c-f767-488e-8139-390d1636483f-for-git_oc-mr1-release-4323561...
android-build-team Robot [Fri, 8 Sep 2017 07:31:24 +0000 (07:31 +0000)]
release-request-8cd2a23c-f767-488e-8139-390d1636483f-for-git_oc-mr1-release-4323561 snap-temp-L80400000100600189

Change-Id: Id34318737aa841ce1e02338403ff4e48b5295ef1

6 years agoMerge "Set enum to fixed size type" into oc-mr1-dev
TreeHugger Robot [Fri, 8 Sep 2017 06:13:48 +0000 (06:13 +0000)]
Merge "Set enum to fixed size type" into oc-mr1-dev

6 years agoSet enum to fixed size type
Marie White [Thu, 7 Sep 2017 23:12:13 +0000 (16:12 -0700)]
Set enum to fixed size type

Bug: 63683612
Test: Manual. Ran O2 on Marlin, tested image streaming manually.

Since DvrPoseRawDataType enum will be part of the public DVR API,
explicitly define the size of the enum.

Change-Id: I3900470ccb3ca7a2c4e7ed8e7f5586c60486d9e6

6 years agoMerge "Clean up handling of VR surface updates." into oc-mr1-dev
Corey Tabaka [Fri, 8 Sep 2017 00:54:10 +0000 (00:54 +0000)]
Merge "Clean up handling of VR surface updates." into oc-mr1-dev

6 years agorelease-request-108343c4-ad88-44f9-aaa2-24d8b8a5c176-for-git_oc-mr1-release-4321077...
android-build-team Robot [Thu, 7 Sep 2017 07:44:58 +0000 (07:44 +0000)]
release-request-108343c4-ad88-44f9-aaa2-24d8b8a5c176-for-git_oc-mr1-release-4321077 snap-temp-L97000000100182150

Change-Id: Ica45f71e2eff05349f80ef3b53abb57b3d3b3d39

6 years agoMerge "Add a new keycode for TV (ALL_APPS)" into oc-dev am: 6afce442ea
Sujith Ramakrishnan [Thu, 7 Sep 2017 02:09:03 +0000 (02:09 +0000)]
Merge "Add a new keycode for TV (ALL_APPS)" into oc-dev am: 6afce442ea
am: 047fcbf671

Change-Id: I17bac0d425207b1edc0ffbe997953502aae324e0

6 years agoMerge "Add a new keycode for TV (ALL_APPS)" into oc-dev
Sujith Ramakrishnan [Thu, 7 Sep 2017 02:00:12 +0000 (02:00 +0000)]
Merge "Add a new keycode for TV (ALL_APPS)" into oc-dev
am: 6afce442ea

Change-Id: I7933009ee4c64025245373ee6b5ad1b0d77291e9

6 years agoMerge "Add a new keycode for TV (ALL_APPS)" into oc-dev
Sujith Ramakrishnan [Thu, 7 Sep 2017 00:09:22 +0000 (00:09 +0000)]
Merge "Add a new keycode for TV (ALL_APPS)" into oc-dev

6 years agoFix race conditions when using mHwc off the main thread
Steven Thomas [Fri, 1 Sep 2017 01:24:21 +0000 (18:24 -0700)]
Fix race conditions when using mHwc off the main thread

In a few cases we were accessing mHwc off the main thread without
acquiring mStateLock, resulting in crashes and other incorrect
behavior. This CL adds the missing locks. Since the locking semantics
are somewhat hard to understand, also add a clarifying comment to the
mHwc member declaration in SurfaceFlinger.h.

Bug: 64586546

Test: I manually tested normal surface flinger operation and vr behavior
on different devices, and confirmed everything looks fine. The crashes
we saw that were caused by these mHwc race conditions are hard to
reproduce, so I couldn't empirically verify this fixes the crash. I'm
relying on manual code inspection to confirm the issue is in fact fixed.

Regarding performance, I added profiling code (not part of this CL) to
check for lock contention and hold times with the newly added locks. I
confirmed that contention is low, so these calls shouldn't be
significantly slower as a result of adding the locks. The time spent
holding these new locks is also low, except for getDisplayColorModes(),
which makes a call to hardware composer service and can in some cases
take over a millisecond. That function is called so rarely though, only
once at boot, or twice at boot after a fresh flash, that it's not worth
optimizing.

Change-Id: I3854779c12a61983aaaecddb9f6316f218e519e3

6 years agorelease-request-ee600ee1-fadc-4a92-9feb-e22548c84a75-for-git_oc-mr1-release-4318546...
android-build-team Robot [Wed, 6 Sep 2017 07:29:43 +0000 (07:29 +0000)]
release-request-ee600ee1-fadc-4a92-9feb-e22548c84a75-for-git_oc-mr1-release-4318546 snap-temp-L23800000099760172

Change-Id: I07708fb9e54613fd4b1b2e0db243bb8f1785a89e

6 years agoMerge "Remove unbundled IME feature from automotive confg" into oc-mr1-dev
TreeHugger Robot [Wed, 6 Sep 2017 00:23:07 +0000 (00:23 +0000)]
Merge "Remove unbundled IME feature from automotive confg" into oc-mr1-dev

6 years agoFix stack use-after-scope in InputReader
Michael Spang [Wed, 6 Sep 2017 00:17:16 +0000 (20:17 -0400)]
Fix stack use-after-scope in InputReader

READ of size 4 at 0x0079b1ac3a20 thread T121 (InputReader)

Viewport [1] to add: virtual:android:277f1a09-b88d-4d1e-8716-796f114d080b
   #0 0x79b8820d53 in android::InputReaderConfiguration::getDisplayViewport(android::ViewportType, android::String8 const*, android::DisplayViewport*) const frameworks/native/services/inputflinger/InputReader.cpp:246:39
   #1 0x79b8843fab in android::TouchInputMapper::configureSurface(long, bool*) frameworks/native/services/inputflinger/InputReader.cpp:3472:22
   #2 0x79b88411b3 in android::TouchInputMapper::configure(long, android::InputReaderConfiguration const*, unsigned int) frameworks/native/services/inputflinger/InputReader.cpp:3248:9
   #3 0x79b8825ff3 in android::InputDevice::configure(long, android::InputReaderConfiguration const*, unsigned int) frameworks/native/services/inputflinger/InputReader.cpp:1126:21
   #4 0x79b8822653 in android::InputReader::refreshConfigurationLocked(unsigned int) frameworks/native/services/inputflinger/InputReader.cpp:612:25
   #5 0x79b88239fb in android::InputReader::loopOnce() frameworks/native/services/inputflinger/InputReader.cpp:343:13
   #6 0x79b882d507 in android::InputReaderThread::threadLoop() frameworks/native/services/inputflinger/InputReader.cpp:1004:14
   #7 0x79d79e6113 in android::Thread::_threadLoop(void*) system/core/libutils/Threads.cpp:747:28
   #8 0x79da914bbb in android::AndroidRuntime::javaThreadShell(void*) frameworks/base/core/jni/AndroidRuntime.cpp:1199:14
   #9 0x79da20f31b in __pthread_start(void*) bionic/libc/bionic/pthread_create.cpp:214:18
   #10 0x79da1c6dff in __start_thread bionic/libc/bionic/clone.cpp:47:16

Bug: 65378805
Test: asan build
Change-Id: I5a65cb007fe4879ce9635572014a568583a2ef4a

6 years agoMerge "Add api's to dvr_pose to retrieve data from sensord" into oc-mr1-dev
TreeHugger Robot [Tue, 5 Sep 2017 17:05:09 +0000 (17:05 +0000)]
Merge "Add api's to dvr_pose to retrieve data from sensord" into oc-mr1-dev

6 years agorelease-request-6f5d3742-2f66-40bb-91cb-67cd615dc827-for-git_oc-mr1-release-4314955...
android-build-team Robot [Mon, 4 Sep 2017 07:24:29 +0000 (07:24 +0000)]
release-request-6f5d3742-2f66-40bb-91cb-67cd615dc827-for-git_oc-mr1-release-4314955 snap-temp-L68900000099231033

Change-Id: I0d8d402432624222fdc412fbc27439e70a27850d

6 years agoMerge "Fixed dumpstate_test_fixture so it runs on 64 bits as well." into oc-mr1-dev
TreeHugger Robot [Sun, 3 Sep 2017 18:03:06 +0000 (18:03 +0000)]
Merge "Fixed dumpstate_test_fixture so it runs on 64 bits as well." into oc-mr1-dev

6 years agorelease-request-957cd691-fb71-4770-8ff7-a3b9602655a5-for-git_oc-mr1-release-4314464...
android-build-team Robot [Sun, 3 Sep 2017 07:27:58 +0000 (07:27 +0000)]
release-request-957cd691-fb71-4770-8ff7-a3b9602655a5-for-git_oc-mr1-release-4314464 snap-temp-L54400000099147910

Change-Id: I470af98bcb1d93e16dba4f8def81af7bded41524

6 years agoMerge "Drop capabilities in reconcileSecondaryDexFiles" into oc-mr1-dev
Shubham Ajmera [Sun, 3 Sep 2017 03:19:58 +0000 (03:19 +0000)]
Merge "Drop capabilities in reconcileSecondaryDexFiles" into oc-mr1-dev

6 years agoAdd api's to dvr_pose to retrieve data from sensord
Marie White [Wed, 9 Aug 2017 05:23:45 +0000 (22:23 -0700)]
Add api's to dvr_pose to retrieve data from sensord

Bug: 63683612
Test: Manually tested through VrCore cl/164799996.

To retrieve raw data from Tango, added below api's to dvr_api:
- dvrPoseClientGetDataReader
- dvrPoseClientDataCapture
- dvrPoseClientDataReaderDestroy

Note: These changes have already been reviewed in branch
oc-dr1-daydream-dev branch. See change 2729572.

Changes tested on Pixel XL with and without 02 rendering path. Daydream
Home rendering in VR Mode correctly. Pixel functioning as normal.

Change-Id: Ia934d6a1a0b89edfd4408dde19d38e757d44f785

6 years agoMerge "Temporary fix for memory leak on DumpRunningServiceTimeout." into oc-mr1-dev
TreeHugger Robot [Sat, 2 Sep 2017 00:26:05 +0000 (00:26 +0000)]
Merge "Temporary fix for memory leak on DumpRunningServiceTimeout." into oc-mr1-dev

6 years agoClean up handling of VR surface updates.
Corey Tabaka [Fri, 1 Sep 2017 03:01:15 +0000 (20:01 -0700)]
Clean up handling of VR surface updates.

- Fix bug where adding a new hardware layer causes existing single-
  buffered surface layers to unlatch their buffer.
- Rename variables holding Composer pointers from hidl to composer
  to improve readability.
- Remove the arbitrary hardware layer limit, moving responsibility
  for efficient use of hardware layers to the VR display manager.

Bug: 64987282
Bug: 64756801
Test: Build system for multiple devices and manually test operation.
Change-Id: I8f05ca83830f62e15b18cd52df3014432c887681

6 years agoRemove unbundled IME feature from automotive confg
Pavel Maltsev [Fri, 1 Sep 2017 21:46:08 +0000 (14:46 -0700)]
Remove unbundled IME feature from automotive confg

Test: make -j && flash && adb shell pm list feature

Bug: 64546952
Change-Id: I87cb2662cf0b41eb6e13e237831fcfdb68d0eb44

6 years agoDrop capabilities in reconcileSecondaryDexFiles
Shubham Ajmera [Fri, 25 Aug 2017 20:07:44 +0000 (13:07 -0700)]
Drop capabilities in reconcileSecondaryDexFiles

... while unlinking oat files.

Test: adb shell cmd package reconcile-secondary-dex-files \
      com.android.google.gms

Bug: 64461549
Change-Id: Ib2c59686233faab22088fc40a706736feb9964ee
(cherry-picked from commit 5a9ef99046e7324f5e821b05ad956e5e953a1e84)

6 years agoMerge "Export libui_headers as vndk header only library" into oc-mr1-dev
Isaac Chen [Fri, 1 Sep 2017 00:36:28 +0000 (00:36 +0000)]
Merge "Export libui_headers as vndk header only library" into oc-mr1-dev

6 years agoExport libui_headers as vndk header only library
Isaac Chen [Thu, 31 Aug 2017 11:05:25 +0000 (19:05 +0800)]
Export libui_headers as vndk header only library

Emulator EGL uses libui headers and needs to be built
successfully when BOARD_VNDK_VERSION is enabled.

Bug: 64704866
Test: Built aosp_x86 with BOARD_VNDK_VERSION set to current and
      BOARD_VNDK_RUNTIME_DISABLE set to true. Booted on x86 emulator.

Change-Id: Ic26fc14e61330fcc555501c906a64393afe6145d

6 years agorelease-request-fd631211-effa-4885-9314-559fcbd0a094-for-git_oc-mr1-release-4308825...
android-build-team Robot [Thu, 31 Aug 2017 07:34:16 +0000 (07:34 +0000)]
release-request-fd631211-effa-4885-9314-559fcbd0a094-for-git_oc-mr1-release-4308825 snap-temp-L52700000098265170

Change-Id: I9baff77619e07106cd9a09e37d3a2dc0a1224420

6 years agoMerge "Rename WriteBufferQueueGetExternalSurface: Step 1" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 03:27:37 +0000 (03:27 +0000)]
Merge "Rename WriteBufferQueueGetExternalSurface: Step 1" into oc-mr1-dev

6 years agoAdd a new keycode for TV (ALL_APPS)
Sujith Ramakrishnan [Wed, 19 Jul 2017 01:54:15 +0000 (18:54 -0700)]
Add a new keycode for TV (ALL_APPS)

    - KEYCODE_ALL_APPS: Launches all apps. For TV, this checks for
      launcher package in system image.

Test: Manual: ALL_APPS: adb shell input keyevent 284
Test: also tested with --longpress for these keys

Bug: 38496261
Change-Id: I2e50a569533f01d93c020adde672c842540f0193

6 years agoRename WriteBufferQueueGetExternalSurface: Step 1
Jiwen 'Steve' Cai [Wed, 30 Aug 2017 18:26:20 +0000 (11:26 -0700)]
Rename WriteBufferQueueGetExternalSurface: Step 1

Add new API WriteBufferQueueGetANativeWindow and forward all calls to
the old one with a warning.

Bug: 65133502
Test: dvr_api-test
Change-Id: I6787bc5d341f7e36a8a35102a5ce651c3aa296f8

6 years agoMerge fences when needed for accurate timestamps.
Brian Anderson [Tue, 8 Aug 2017 23:31:37 +0000 (16:31 -0700)]
Merge fences when needed for accurate timestamps.

There's an optimization in ConsumerBase that checks the status
of the current fence before merging it with a new fence. If
the current fence has already signaled, then it just picks up
the new fence without merging.

Unfortunately, if the new fence is already signaled too, then
it's possible that it signaled long before the current fence,
which can result in an inaccurate timestamp with the current
logic.

The new logic merges the fences when the statuses of the current
and new fences are the same. If they differ, then it takes the
unsignaled fence.

This fixes the reads done timestamps in the GetFrameTimestamps
dEQP tests so that they are always monotonic and always arrive
after rendering completes.

Test: --deqp-case=dEQP-EGL*get_frame_timestamps*
Bug: 37513882

Change-Id: I345e48aae0fbb3c28c2f2c0dc035e6b0fa70df43
(cherry picked from commit 7b097e2e3d9dd9444916ddf77d75ca394e6b753e)

6 years agoAdd vulkan_headers_ndk cc_library_headers module
Jesse Hall [Tue, 29 Aug 2017 04:55:32 +0000 (21:55 -0700)]
Add vulkan_headers_ndk cc_library_headers module

We had a cc_library_headers module for the Vulkan headers, for use by
platform and vendor modules. We also had an ndk_headers module to copy
the headers into the NDK. This adds another cc_library_headers module
which allows things in the Android tree but which are built against
the NDK (like CTS) to use our copy of the header, rather than an NDK
prebuilt. That allows CTS tests to use extensions that aren't yet
present in the prebuilt NDK Vulkan header.

Bug: 34745152
Test: build with accompanying external/vulkan-validation-layers changes
Change-Id: Ia5f1bc086210403f8e6c023ce3c6413f74f91ff3

6 years agorelease-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release-4306444...
android-build-team Robot [Wed, 30 Aug 2017 07:30:33 +0000 (07:30 +0000)]
release-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release-4306444 snap-temp-L17300000097872583

Change-Id: I45ea2da805c769313ae204c97e4218b02c73b95d

6 years agoMerge "thermalservice: don't register IThermalCallback service" into oc-mr1-dev
TreeHugger Robot [Wed, 30 Aug 2017 03:14:24 +0000 (03:14 +0000)]
Merge "thermalservice: don't register IThermalCallback service" into oc-mr1-dev

6 years agoMerge "vulkan: Update Vulkan headers to 1.0.54" into oc-mr1-dev
TreeHugger Robot [Tue, 29 Aug 2017 20:01:21 +0000 (20:01 +0000)]
Merge "vulkan: Update Vulkan headers to 1.0.54" into oc-mr1-dev

6 years agovulkan: Update Vulkan headers to 1.0.54
Jesse Hall [Mon, 28 Aug 2017 19:10:06 +0000 (12:10 -0700)]
vulkan: Update Vulkan headers to 1.0.54

Key changes since 1.0.53:
* Updated several KHX extensions and promoted to KHR:
  * VK_KHR_external_memory_capabilities
  * VK_KHR_external_memory_win32
  * VK_KHR_external_memory_fd
  * VK_KHR_external_semaphore_capabilities
  * VK_KHR_external_semaphore
  * VK_KHR_external_semaphore_win32
  * VK_KHR_external_semaphore_fd
  * VK_KHR_win32_keyed_mutex
* Added new extensions:
  * VK_KHR_external_fence_capabilities
  * VK_KHR_external_fence
  * VK_KHR_external_fence_win32
  * VK_KHR_external_fence_fd
  * VK_KHR_storage_buffer_storage_class
  * VK_KHR_variable_pointers
  * VK_KHR_dedicated_allocation
  * VK_KHR_get_memory_requirements2

Test: build
Bug: 34745152
Change-Id: I790143b0d5160c02a016f1e67720edbf6bc45636
Merged-In: I790143b0d5160c02a016f1e67720edbf6bc45636
(cherry picked from commit 9492f99cb57d97aa5df908773738fe7fe6a86acf)

6 years agoMerge "Dumpstate: Add tombstone filtering" into oc-mr1-dev
TreeHugger Robot [Tue, 29 Aug 2017 15:27:35 +0000 (15:27 +0000)]
Merge "Dumpstate: Add tombstone filtering" into oc-mr1-dev

6 years agorelease-request-c924aaac-f0a2-4215-8dc4-e314f22460d9-for-git_oc-mr1-release-4301796...
android-build-team Robot [Mon, 28 Aug 2017 07:35:33 +0000 (07:35 +0000)]
release-request-c924aaac-f0a2-4215-8dc4-e314f22460d9-for-git_oc-mr1-release-4301796 snap-temp-L23200000097143969

Change-Id: I110e59a3809f9f6f95fa9611026289da3540a5f1

6 years agothermalservice: don't register IThermalCallback service
Todd Poynor [Sat, 26 Aug 2017 07:53:06 +0000 (00:53 -0700)]
thermalservice: don't register IThermalCallback service

This service is only to be registered with IThermal 1.1 HALs via a
registration method, not for lookup via hwservicemanager.

Bug: 64986538
Bug: 30982366
Test: manual on w
Change-Id: I2c14a454dd4446267529f2e1cbf99ff23fbd1737

6 years agoTemporary fix for memory leak on DumpRunningServiceTimeout.
Felipe Leme [Fri, 25 Aug 2017 20:39:04 +0000 (13:39 -0700)]
Temporary fix for memory leak on DumpRunningServiceTimeout.

Test: mmm -j32 frameworks/native/cmds/dumpsys && \
      adb sync && adb shell /data/nativetest/dumpsys_test/dumpsys_test && \
      adb shell /data/nativetest64/dumpsys_test/dumpsys_test && \
      printf "\n\n#### ALL TESTS PASSED ####\n"

Bug: 65056227
Change-Id: I328806e9edf8e156039fb5dd963c3750c67c98d9

6 years agoFixed dumpstate_test_fixture so it runs on 64 bits as well.
Felipe Leme [Fri, 25 Aug 2017 17:15:01 +0000 (10:15 -0700)]
Fixed dumpstate_test_fixture so it runs on 64 bits as well.

Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb sync && \
      adb shell /data/nativetest/dumpstate_test/dumpstate_test && \
      adb shell /data/nativetest64/dumpstate_test/dumpstate_test

Fixes: 64954094

Change-Id: I47fa6a6dcee0c3386c5a9b574583d84b20d30661

6 years agoEnsure history has pointer id of interest.
Siarhei Vishniakou [Fri, 25 Aug 2017 03:36:28 +0000 (20:36 -0700)]
Ensure history has pointer id of interest.

When two events with different pointer id's end up
next to each other in touch history, then crash may
occur by trying to access the data associated with
the second to last pointer id by using the last event's
pointer id.

Test: monkey testing on sailfish
Command: adb shell monkey -p com.google.android.deskclock -p
com.android.calculator2 -p com.google.android.contacts -p
com.android.launcher -p com.google.android.launcher -p com.android.mms
-p com.google.android.apps.messaging -p com.android.phone -p
com.google.android.dialer -p com.android.providers.downloads.ui -p
com.android.settings -p com.google.android.calendar -p
com.google.android.GoogleCamera -p com.google.android.apps.photos -p
com.google.android.gms -p com.google.android.setupwizard -p
com.google.android.googlequicksearchbox -p
com.google.android.packageinstaller -p
com.google.android.apps.nexuslauncher -c
android.intent.category.LAUNCHER --ignore-security-exceptions
--monitor-native-crashes -s 611 -v -v -v 125000
Native tests will be added later.
Fixes: 65012433

Change-Id: I560a54d7f59a8892adfad3a54db9c436e4089343