OSDN Git Service

android-x86/frameworks-native.git
6 years agoMerge changes Id4647e54,I66b6edbd into oc-dr1-dev
TreeHugger Robot [Thu, 29 Jun 2017 18:44:52 +0000 (18:44 +0000)]
Merge changes Id4647e54,I66b6edbd into oc-dr1-dev

* changes:
  Fix VR surface attributes.
  DVR API: Implement support for deleting surface attributes.

6 years agoMerge changes I9047b298,Id9554d6b into oc-dr1-dev
TreeHugger Robot [Thu, 29 Jun 2017 18:44:35 +0000 (18:44 +0000)]
Merge changes I9047b298,Id9554d6b into oc-dr1-dev

* changes:
  libdvr: Add performance API to platform library.
  libpdx_uds: Fix uninitialized variable bug.

6 years agoMerge "Add VrFlinger dumpsys to SurfaceFlinger" into oc-dr1-dev
TreeHugger Robot [Thu, 29 Jun 2017 04:21:05 +0000 (04:21 +0000)]
Merge "Add VrFlinger dumpsys to SurfaceFlinger" into oc-dr1-dev

6 years agoFix VR surface attributes.
Corey Tabaka [Fri, 23 Jun 2017 03:39:42 +0000 (20:39 -0700)]
Fix VR surface attributes.

VR surface attributes had two issues that prevented the full extent
of their use:
1. The older clang version missed that templated copy constructor
   and assignment operators do not override the default ones in
   the Variant class. This caused issues with certain types when
   copy constructing / assigning from another Variant of the same
   type. This was noticed by running tests with a newer version of
   clang which provided warnings.
2. C++ rules about implicit conversion to bool from types that
   decay to pointers causes subtle issues with Variants that have
   bool elements.

   For example this assignment compiles but produces the wrong
   result:

   const int array[3] = { 1, 2, 3};
   Variant<int, bool, std::array<int, 3>> variant = array;
   EXPECT_FALSE(variant.is<bool>()); // Actually true.

   Here the programmer might accidentally think that the std::array
   element of the variant can be assigned from the regular array.
   This doesn't work, but instead the compiler decays the array to
   a pointer and assigns the bool element to true.

The first issue is addressed by defining copy/move constructors /
assignment operators on Variant and deleting the default ones from
the internal Union type for extra safety.

The second issue is addressed by making a more restrictive version
of the std::is_constructible trait that rejects bool construction
from types that decay to pointers. Once this was put in place the
erroneous use cases no longer compiled and is fixed as part of
this CL.

Tests are updated to verify the fixes to these issues.

Bug: 62557221
Test: pdx_tests and dvr_api-test passes.
Change-Id: Id4647e54e0a7b1753217fe7fe351462fe5bcfd83

6 years agolibdvr: Add performance API to platform library.
Corey Tabaka [Fri, 23 Jun 2017 23:20:07 +0000 (16:20 -0700)]
libdvr: Add performance API to platform library.

- Add dvrPerformanceSetSchedulerPolicy API. Only this API is exposed
  through the DVR platform library, the older API will be deprecated.
- Add permission checks to all performanced APIs.
- Allow services with android.permission.RESTRICTED_VR_ACCESS to change
  scheduler policy for VR apps.
- Minor updates to use the updated PDX service API. The older API will
  be deprecated soon.
- Add tests for permission checks and policy API.

Most of the tests are automatic however, there is one manual step for
testing the android.permission.RESTRICTED_VR_ACCESS (e.g. trusted uid)
check. Because there is no reliable way to determine the UID of VrCore
from the gtest, instead the gtest looks for an env var named
GTEST_TRUSTED_UID; if this is set the value is used as a uid and the
trusted uid tests are enabled.

Bug: 62468109
Test: 'GTEST_TRUSTED_UID=<VrCore UID> performance_service_tests' passes.
Change-Id: I9047b298a015a69535b655a299ca26c179e2d57d

6 years agoDVR API: Implement support for deleting surface attributes.
Corey Tabaka [Thu, 8 Jun 2017 21:29:58 +0000 (14:29 -0700)]
DVR API: Implement support for deleting surface attributes.

- Implement support for deleting surface attributes using the "NONE"
  attribute type.
- Add tests for attribute events and attribute deletion.

Bug: 62456002
Test: dvr_api-test passes.
Change-Id: I66b6edbd35077596d89e85829bcbe7c52829ef5b

6 years agoAdd VrFlinger dumpsys to SurfaceFlinger
Karthik Ravi Shankar [Wed, 28 Jun 2017 22:40:24 +0000 (15:40 -0700)]
Add VrFlinger dumpsys to SurfaceFlinger

When we do dumpsys SurfaceFlinger, we get no information about the
layers/what is composed when the device is in VR mode.

Bug: 63113212
Test:
VrFlinger state:
Application Surfaces:
Surface 0: surface_id=11 process_id=5550 user_id=10104 visible=1
z_order=0 queue_ids=29,37
Surface 1: surface_id=13 process_id=5035 user_id=10130 visible=1
z_order=0 queue_ids=53,65

Direct Surfaces:
Surface 0: surface_id=8 process_id=5563 user_id=10104 visible=1
z_order=0 queue_ids=17

Display metrics:     1440x2880 537.882x537.882 dpi @ 60 Hz
Post thread resumed: 1
Active layers:       1

Layer 0: type=Device surface_id=8 buffer_id=19

Hardware Composer Debug Info:
-------------------------------
HWC2 display_id: 0
layer:   30 z: 0 compositon: Device/Device alpha: 255 format:
RGBA_8888_UBWC dataspace:0x00000000 transform: 0/0/0 buffer_id:
0x70b4877500
color modes supported: 0 7 9 current mode: 7
current transform:
  1.08  -0.02  -0.02   0.00
  -0.07   1.03  -0.07   0.00
  -0.01  -0.01   1.09   0.00
  0.00   0.00   0.00   1.00
-------------------------------

This section doesn't appear when the device is not in VR mode.

Change-Id: I2961a05fc3ea303e070be08de355fb6e56c3d0db
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
6 years agoMerge "Add telephony related dumpsys in the telephony monitor bugreports" into oc...
TreeHugger Robot [Wed, 28 Jun 2017 19:01:17 +0000 (19:01 +0000)]
Merge "Add telephony related dumpsys in the telephony monitor bugreports" into oc-dr1-dev

6 years agolibpdx_uds: Fix uninitialized variable bug.
Corey Tabaka [Mon, 26 Jun 2017 23:51:43 +0000 (16:51 -0700)]
libpdx_uds: Fix uninitialized variable bug.

In this code path epoll_wait() returns 0 when the operation times
out, but there is no condition to catch this and return the
approptiate status. This allows the event value to be used
uninitialized, which returns a junk pending event mask.

This bug results in BufferHub queues sometimes thinking that the
producer side of the buffer hung up, when the junk value happens
to have the EPOLLHUP bit set.

Bug: 62886596
Test: Observe VR app switching stability.
Change-Id: Id9554d6bf224fd27815ff042ac145f59041d0aae

6 years agoAdd telephony related dumpsys in the telephony monitor bugreports
Jayachandran C [Sat, 10 Jun 2017 22:08:12 +0000 (15:08 -0700)]
Add telephony related dumpsys in the telephony monitor bugreports

Collect dumpsys for the following in telephony monitor auto
generated bugreports for better debugging

1) TelephonyDebugService
2) CarrierConfig
3) Connectivity

Test: Verified telephony monintor auto generated bugreport

Bug: 62504502
Change-Id: Ia2a9e1ff5b289dec7a4d0bb4e8ef85fb413df87a

6 years agoMerge "SurfaceFlinger: Last minute log removal." into oc-dev
Robert Carr [Wed, 28 Jun 2017 00:06:38 +0000 (00:06 +0000)]
Merge "SurfaceFlinger: Last minute log removal." into oc-dev
am: 56cca289cc

Change-Id: Ib4448b62b985fac82c24fb81aef550ba7d0280a9

6 years agoMerge "SurfaceFlinger: Last minute log removal." into oc-dev
TreeHugger Robot [Tue, 27 Jun 2017 23:59:16 +0000 (23:59 +0000)]
Merge "SurfaceFlinger: Last minute log removal." into oc-dev

6 years agoMerge "libgui: New mutex for ConsumerBase frame callbacks" into oc-dev
Dan Stoza [Tue, 27 Jun 2017 23:01:03 +0000 (23:01 +0000)]
Merge "libgui: New mutex for ConsumerBase frame callbacks" into oc-dev
am: fb672ba37b

Change-Id: I90f2ebe102c40c70620ca12bda5000b455109d26

6 years agoMerge "libgui: New mutex for ConsumerBase frame callbacks" into oc-dev
TreeHugger Robot [Tue, 27 Jun 2017 22:54:05 +0000 (22:54 +0000)]
Merge "libgui: New mutex for ConsumerBase frame callbacks" into oc-dev

6 years agoSurfaceFlinger: Last minute log removal.
Robert Carr [Tue, 27 Jun 2017 20:51:07 +0000 (13:51 -0700)]
SurfaceFlinger: Last minute log removal.

Whoops.

Test: Log removed!
Change-Id: I4593352cf565603a4507c6ef13504b167d882eec

6 years agoMerge "Fix hidl_ssvc_poll thread issues" into oc-dr1-dev
TreeHugger Robot [Tue, 27 Jun 2017 04:43:20 +0000 (04:43 +0000)]
Merge "Fix hidl_ssvc_poll thread issues" into oc-dr1-dev

6 years agoFix hidl_ssvc_poll thread issues
Peng Xu [Sun, 25 Jun 2017 23:43:02 +0000 (16:43 -0700)]
Fix hidl_ssvc_poll thread issues

1) Patch poll wake up handling logic so that thread no longer quits
   on spurious wake up.
2) Patch(simplify) thread initialization, so that it will not hang
   on waiting for conditional variable.

Test: 1) send signal 3 to system_server, does not observe thread quit.
Test: 2) adb shell "stop;start" many times, every time thread starts.

Bug: 62933449
Bug: 62933799

Merged-In: Icb7477e9d75338b9742e144fc2687d5ced91e89e
Change-Id: Icb7477e9d75338b9742e144fc2687d5ced91e89e

6 years agolibgui: New mutex for ConsumerBase frame callbacks
Dan Stoza [Mon, 26 Jun 2017 21:27:18 +0000 (14:27 -0700)]
libgui: New mutex for ConsumerBase frame callbacks

Adds a new mutex to protect ConsumerBase's mFrameAvailableListener
separately from the main mMutex. This prevents deadlocks when trying
to perform callbacks in response to other calls that come through
ConsumerBase.

Bug: 62915791
Test: EncodeVirtualDisplayWithCompositionTest#
          testRenderingMaxResolutionRemotely

Change-Id: I244dc2d83488e452d9690c0d7847c9ff15a95dbb

6 years agoMerge "libgui: export EGL headers." into oc-dr1-dev
TreeHugger Robot [Mon, 26 Jun 2017 17:54:11 +0000 (17:54 +0000)]
Merge "libgui: export EGL headers." into oc-dr1-dev

6 years agoMerge "Revert "libui: Load a.h.graphics.mapper passthrough service on library load...
TreeHugger Robot [Sat, 24 Jun 2017 00:04:43 +0000 (00:04 +0000)]
Merge "Revert "libui: Load a.h.graphics.mapper passthrough service on library load"" into oc-dr1-dev

6 years agoRevert "libui: Load a.h.graphics.mapper passthrough service on library load"
Jeff Vander Stoep [Fri, 23 Jun 2017 18:41:04 +0000 (11:41 -0700)]
Revert "libui: Load a.h.graphics.mapper passthrough service on library load"

This reverts commit 75ca86f072f82d38b21e0a13234ecbc2c24cb6ab.

avc: denied { read } name="hw" scontext=u:r:cameraserver:s0
tcontext=u:object_r:system_file:s0 tclass=dir
avc: denied { read } name="hw" scontext=u:r:folio_daemon:s0
tcontext=u:object_r:system_file:s0 tclass=dir
avc: denied { read } name="hw" scontext=u:r:hal_imsrtp:s0
tcontext=u:object_r:system_file:s0 tclass=dir
avc: denied { read } name="hw" scontext=u:r:idmap:s0
tcontext=u:object_r:system_file:s0 tclass=dir
avc: denied { read } name="hw" scontext=u:r:mediaextractor:s0
tcontext=u:object_r:system_file:s0 tclass=dir
avc: denied { read } name="hw" scontext=u:r:mediametrics:s0
tcontext=u:object_r:system_file:s0 tclass=dir
avc: denied { read } name="hw" scontext=u:r:webview_zygote:s0
tcontext=u:object_r:system_file:s0 tclass=dir

Bug: 62353585
Bug: 62912747
Bug: 35197529
Test: build and boot device. Launch camera, take pictures.
Change-Id: Ic6884f7235edb9191034a285414eb93aa44ac23c

6 years agoMerge "Make VR HWC DPI a configurable property" into oc-dr1-dev
TreeHugger Robot [Fri, 23 Jun 2017 20:39:03 +0000 (20:39 +0000)]
Merge "Make VR HWC DPI a configurable property" into oc-dr1-dev

6 years agoDisable setting saved_cmdline_size
John Reck [Fri, 23 Jun 2017 19:00:44 +0000 (19:00 +0000)]
Disable setting saved_cmdline_size
am: ba54d5baf4

Change-Id: I447ad42ad4c245013e488701a61d8ce2348a368d

6 years agoDisable setting saved_cmdline_size
John Reck [Fri, 23 Jun 2017 16:44:08 +0000 (09:44 -0700)]
Disable setting saved_cmdline_size

Minimal revert of the addition of increasing
the saved_cmdline_size. This change
exposed kernel bugs that prevented
atrace from working.

Bug: 62375794
Test: manual
Change-Id: Ie946b9246ce9ba22af59dbf0b9fe8a59a5fa1f3f

6 years agolibgui: export EGL headers.
Steven Moreland [Fri, 23 Jun 2017 00:50:49 +0000 (17:50 -0700)]
libgui: export EGL headers.

Many libgui headers use these headers so not exporting
these breaks BOARD_VNDK_VERSION=current builds.

Test: headers resolved with BOARD_VNDK_VERSION=current
Change-Id: I085faeda4f8ad8a07d91e81222b8031a0dd1858a

6 years agoEGL: add color space validation
Courtney Goeltzenleuchter [Tue, 20 Jun 2017 14:12:54 +0000 (08:12 -0600)]
EGL: add color space validation

We want Android to support multiple color spaces as
that can be implemented entirely in the eglapi.cpp wrapper.
These additional dataspaces do not require special behavior
by the driver and may not recognize EGL_GL_COLORSPACE_DISPLAY_P3_EXT,
EGL_GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT, and related attributes.
Therefor, need to filter out those attributes before calling
the driver.
In the future there may be new extensions that do require
driver support. When that happens we'll need to update
stripColorSpaceAttribute to treat that correctly.

Test: Android CTS
      adb -d shell am start \
      -n com.drawelements.deqp/android.app.NativeActivity \
      -e cmdLine '"deqp --deqp-case=dEQP-EGL.functional.wide_color.* \
      --deqp-log-filename=/sdcard/dEQP-Log.qpa"'
Bug: 62424735
Change-Id: I0f0867feb73055100636d326213183ef1f052b7c
(cherry picked from commit eeaa52bc65b5cfaca1f0de44635b57919179df29)

6 years agoMerge "surfaceflinger: discard stale commands" into oc-dev
Chia-I Wu [Thu, 22 Jun 2017 20:04:12 +0000 (20:04 +0000)]
Merge "surfaceflinger: discard stale commands" into oc-dev
am: f8ca9a0875

Change-Id: Ief69f6fcf0c738612b14b94d65b3ae1555973d6c

6 years agoMerge "LibGUI remove DEBUG" into oc-dev
Fabien Sanglard [Thu, 22 Jun 2017 20:03:13 +0000 (20:03 +0000)]
Merge "LibGUI remove DEBUG" into oc-dev
am: be597daebd

Change-Id: I65756ce89b4a10d2df403f9f9a4ce2cacdaafda0

6 years agoDisable skip Validate on client composition
Fabien Sanglard [Thu, 22 Jun 2017 20:02:43 +0000 (20:02 +0000)]
Disable skip Validate on client composition
am: 269c236109

Change-Id: Ib0d2f8a9e59cf4618ed029fe35391f566d11bcfb

6 years agoMerge "surfaceflinger: discard stale commands" into oc-dev
Chia-I Wu [Thu, 22 Jun 2017 19:59:35 +0000 (19:59 +0000)]
Merge "surfaceflinger: discard stale commands" into oc-dev

6 years agoMerge "LibGUI remove DEBUG" into oc-dev
Fabien Sanglard [Thu, 22 Jun 2017 19:56:29 +0000 (19:56 +0000)]
Merge "LibGUI remove DEBUG" into oc-dev

6 years agoDisable skip Validate on client composition
Fabien Sanglard [Thu, 22 Jun 2017 18:35:16 +0000 (11:35 -0700)]
Disable skip Validate on client composition

SurfaceFlinger should not skip validate when GLComposition is
needed. This can happen when SF decides to force GLComposition
(like when a screen rotation occurs).

Bug: 62906801
Test: Manual
Change-Id: I248146eade395a124cb149773287abd88ae36511

6 years agosurfaceflinger: discard stale commands
Chia-I Wu [Thu, 22 Jun 2017 17:48:28 +0000 (10:48 -0700)]
surfaceflinger: discard stale commands

When we skip validate, we may have stale commands on the command
buffer.  They should be discarded.

Bug: 62906801
Test: manual
Change-Id: Ie7921ba75ab2252b834cda6924e1fcfdf236f759

6 years agoLibGUI remove DEBUG
Fabien Sanglard [Thu, 22 Jun 2017 18:13:49 +0000 (11:13 -0700)]
LibGUI remove DEBUG

DEBUG_ONLY_CODE flag enables expensive checks such as
BufferQueueCore::validateConsistencyLocked() which when running
represents 15.1% of SurfaceFlinger total runtime. Enabling these
check for "eng" build only make "userdebug" build closer to "user".

Test: Manual
Bug: 62905241
Change-Id: I77065ecf4e62261c3f02b1cad9966d5c4845c639

6 years agoSkip Validate
Fabien Sanglard [Thu, 22 Jun 2017 05:58:06 +0000 (05:58 +0000)]
Skip Validate
am: 249c0ae80a

Change-Id: I336fce473d21e5fdfb80ad8eb48f1df5a24497d8

6 years agoSkip Validate
Fabien Sanglard [Tue, 20 Jun 2017 02:22:36 +0000 (19:22 -0700)]
Skip Validate

b/37474580
b/62806392

Test: marlin, ryu

Change-Id: I09e0c52cb7c914dcd883dc771d97a365c89f7037

6 years agoMerge "Update dumpstate binary file name" into oc-dr1-dev
Jibu Joseph [Thu, 22 Jun 2017 04:36:00 +0000 (04:36 +0000)]
Merge "Update dumpstate binary file name" into oc-dr1-dev

6 years agoMerge changes from topic 'vendor_available_libgui' into oc-dr1-dev
TreeHugger Robot [Wed, 21 Jun 2017 21:35:59 +0000 (21:35 +0000)]
Merge changes from topic 'vendor_available_libgui' into oc-dr1-dev

* changes:
  Make libgui available to vendors
  Mark EGL/GLES libs as vendor_available
  Change export_include_dirs into export_header_lib_headers

6 years agoMerge "Check key before edit value in countFlushCompleteEventsLocked" into oc-dr1-dev
TreeHugger Robot [Wed, 21 Jun 2017 20:42:24 +0000 (20:42 +0000)]
Merge "Check key before edit value in countFlushCompleteEventsLocked" into oc-dr1-dev

6 years agoUpdate dumpstate binary file name
Jie Song [Wed, 21 Jun 2017 20:26:00 +0000 (13:26 -0700)]
Update dumpstate binary file name

Keep modem_log_all.tar for a while for vendors

Bug: 62865279
Test: Verify file name in bugreport
Change-Id: Ia64f6c8e978877040eecfbc6066f0d741d91ddf3

6 years agoMerge "Add DVR method to get native display metrics" into oc-dr1-dev
Santos Cordon [Wed, 21 Jun 2017 17:53:06 +0000 (17:53 +0000)]
Merge "Add DVR method to get native display metrics" into oc-dr1-dev

6 years agoMerge "Avoid SELinux violation at vndservicemanager" into oc-dr1-dev
Martijn Coenen [Wed, 21 Jun 2017 13:55:22 +0000 (13:55 +0000)]
Merge "Avoid SELinux violation at vndservicemanager" into oc-dr1-dev

6 years agoMake libgui available to vendors
Jiyong Park [Wed, 21 Jun 2017 03:14:18 +0000 (12:14 +0900)]
Make libgui available to vendors

libgui is now available to vendors, especially for BufferQueue in
between the OMX and Camera HALs for encoding the captured video stream.

In doing so, its headers were moved from frameworks/native/include to
its local directory frameworks/native/libs/gui/include. This is required
because global include path is not supported when building for vendor.
However, in order not to affect platform modules that are still relying
on the global include path, symlinks are provided.

frameworks/native/include/gui -> frameworks/native/libs/include/gui
frameworks/native/include/private/gui ->
frameworks/native/libs/include/private/gui

Bug: 37731063
Test: BOARD_VNDK_VERSION=current m -j libgui.vendor
Change-Id: I0bab8d2e31959085ad58b1ce4c610334ee3da033

6 years agoMark EGL/GLES libs as vendor_available
Jiyong Park [Wed, 21 Jun 2017 03:26:51 +0000 (12:26 +0900)]
Mark EGL/GLES libs as vendor_available

EGL/GLES libs are marked as vendor_available, otherwise vendors are not
able to use OpenGL. The libs were not simply declared as LL-NDK because
doing so causes the dual loading of libui.so in vendor processes;
platform version of libui.so is loaded since it is depended by libEGL.so
whereas there also is vendor version of libui.so in /system/lib/vndk.

When libEGL.so is built for vendors, 1) libgraphicsenv is removed from
its dependency list as the lib must not be available to vendors and 2)
eglGetNativeClientBufferANDROID is unusable since the function relies on
AHardwareBuffer_to_ANativeWindowBuffer which isn't available to vendor.

Bug: 37731063
Test: BOARD_VNDK_VERSION=current m -j libEGL.vendor
Test: BOARD_VNDK_VERSION=current m -j libGLESv2.vendor

Change-Id: I83a128b14a5d852bb0f2cd821a8e3f82c66a313f

6 years agoChange export_include_dirs into export_header_lib_headers
Jiyong Park [Tue, 20 Jun 2017 04:51:22 +0000 (13:51 +0900)]
Change export_include_dirs into export_header_lib_headers

Remove the duplicated information that headers for libbinder is in the
'include' dir.

Test: m -j
Change-Id: I5527c2709ff9d3a996c619f973345e61407cd3f0

6 years agodumpstate: Add the 2nd fd for binary file
Jie Song [Tue, 20 Jun 2017 23:29:42 +0000 (16:29 -0700)]
dumpstate: Add the 2nd fd for binary file

Bug: 33820081
Test: Verify binary file is added in bugreport
Change-Id: Ibe1c219ca4bf288adcb76996c6178426a4d04333

6 years agoAvoid SELinux violation at vndservicemanager
Kouji Shiotani [Tue, 13 Jun 2017 06:40:54 +0000 (15:40 +0900)]
Avoid SELinux violation at vndservicemanager

Avoid following SELinux violation.

avc: denied { read } for comm="vndservicemanag"
name="nonplat_service_contexts" dev="rootfs" ino=17045
scontext=u:r:vndservicemanager:s0
tcontext=u:object_r:service_contexts_file:s0 tclass=file permissive=0
ppid=1 pcomm="init" pgid=1 pgcomm="init"

This violation caused by vndservicemanager reading service_contexts at
svcmgr_handler(). In main() loading as well, processing is divided by
the VENDORSERVICEMANAGER flag. Therefore, even in svcmgr_handler(),
processing is divided by flags like main().

Bug: 62562415
Test: mma
Change-Id: I06b0308a80fc6ea1ca57cd10d9555dd269b8e12d

6 years agoMake VR HWC DPI a configurable property
Kevin Schoedel [Tue, 20 Jun 2017 20:46:00 +0000 (16:46 -0400)]
Make VR HWC DPI a configurable property

Bug: 62833924
Test: temporary logging
Change-Id: I4e38ab9dd9ef6eb42813b3809dc38d1f103d2bf3

6 years agoMerge "surfaceflinger: fix a potential child layer leak" into oc-dev
Chia-I Wu [Tue, 20 Jun 2017 20:28:58 +0000 (20:28 +0000)]
Merge "surfaceflinger: fix a potential child layer leak" into oc-dev
am: 1b02b6329e

Change-Id: Ie2bd5a6d1d37bb5b7c7b679b8c472389ff619188

6 years agoMerge "surfaceflinger: fix a potential child layer leak" into oc-dev
TreeHugger Robot [Tue, 20 Jun 2017 20:15:29 +0000 (20:15 +0000)]
Merge "surfaceflinger: fix a potential child layer leak" into oc-dev

6 years agoCheck key before edit value in countFlushCompleteEventsLocked
Peng Xu [Tue, 20 Jun 2017 19:41:33 +0000 (12:41 -0700)]
Check key before edit value in countFlushCompleteEventsLocked

Fix an unchecked editValueFor that potentially causes log fatal
when sensor is removed from connection shortly before arrival of
flush complete message.

Bug: 62806749
Test: compiles, flush() still working.
Change-Id: I3684251b7bb746b01d0d8849024217c80ad52f9d

6 years agoAdd DVR method to get native display metrics
Stephen Kiazyk [Fri, 9 Jun 2017 21:26:31 +0000 (14:26 -0700)]
Add DVR method to get native display metrics

This seems like the kind of infomration we should be able to communicate
to vrcore.

Bug: 62494565
Test: Builds and loads, still need to test with vrcore
Change-Id: I2342fabcd2bcb8a34c0b783391b60defc381f3c6
(cherry picked from commit 6c5a92f142b5fa1907ff91a7dce4d09ddcb554c6)

6 years agoFix minor version bump reflected in lshal --init-vintf
Yifan Hong [Mon, 19 Jun 2017 22:47:39 +0000 (15:47 -0700)]
Fix minor version bump reflected in lshal --init-vintf

Test: lshal --init-vintf has no warnings, and power@1.1 / vibrator@1.1
      is shown in output.

Bug: 62675393
Change-Id: I1ffd8b6dc7fcadcf7228cf2b8838e918bb3afe6b
Merged-In: I1ffd8b6dc7fcadcf7228cf2b8838e918bb3afe6b

6 years agoMerge "Fix incorrect bitness for lshal --init-vintf" into oc-dr1-dev
TreeHugger Robot [Mon, 19 Jun 2017 21:27:01 +0000 (21:27 +0000)]
Merge "Fix incorrect bitness for lshal --init-vintf" into oc-dr1-dev

6 years agoFix incorrect bitness for lshal --init-vintf
Yifan Hong [Mon, 19 Jun 2017 19:27:08 +0000 (12:27 -0700)]
Fix incorrect bitness for lshal --init-vintf

Test: lshal --init-vintf, graphics.mapper has 32+64.

Change-Id: Ic586c8333064cc5636679ce8ad4e1231307191f4
Merged-In: Ic586c8333064cc5636679ce8ad4e1231307191f4
Fixes: 62675393

6 years agoMerge changes from topic 'layer-wp-race' into oc-dev
Chia-I Wu [Sat, 17 Jun 2017 01:58:33 +0000 (01:58 +0000)]
Merge changes from topic 'layer-wp-race' into oc-dev
am: a17b14eb92

Change-Id: I1af51f57255024d36e9cae5c221361f36cb28da4

6 years agoMerge changes from topic 'layer-wp-race' into oc-dev
TreeHugger Robot [Sat, 17 Jun 2017 01:51:06 +0000 (01:51 +0000)]
Merge changes from topic 'layer-wp-race' into oc-dev

* changes:
  surfaceflinger: Layer::getParent requires state lock held
  surfaceflinger: distinguish mCurrentParent/mDrawingParent
  surfaceflinger: protect Client::mParentLayer with a lock

6 years agosurfaceflinger: fix a potential child layer leak
Chia-I Wu [Thu, 15 Jun 2017 19:53:59 +0000 (12:53 -0700)]
surfaceflinger: fix a potential child layer leak

We should not remove a child layer from its already removed parent.
Call p->removeChild only after we've checked that the ancestor is
alive.

Apply e6b63e1ae12692327f7e46d5f10d6ade5a7bf192 and this fix to
SurfaceFlinger_hwc1.cpp as well.

Bug: 37121786
Test: manual stress test
Change-Id: I7b811450a998acc4ad9690bd4eda058ce6588e14

6 years agosurfaceflinger: Layer::getParent requires state lock held
Chia-I Wu [Thu, 15 Jun 2017 19:53:59 +0000 (12:53 -0700)]
surfaceflinger: Layer::getParent requires state lock held

We rely on mStateLock to synchronize accesses to
Layer::mCurrentParent.

Bug: 38505866
Test: manual stress test
Change-Id: I5f8ec358ed7e35df28f8c6aec31ae6ee51cb5b93

6 years agoAdd method to explicitly create Surface.
Bryce Lee [Fri, 16 Jun 2017 23:24:47 +0000 (23:24 +0000)]
Add method to explicitly create Surface.
am: 4e623e259c

Change-Id: I22ff0cd39e80478a74e4589084d5ccabfbe54443

6 years agoMerge "libui: Load a.h.graphics.mapper passthrough service on library load" into...
Jesse Hall [Fri, 16 Jun 2017 22:45:37 +0000 (22:45 +0000)]
Merge "libui: Load a.h.graphics.mapper passthrough service on library load" into oc-dr1-dev

6 years agoMerge "Fix virtual touchpad scroll events." into oc-dr1-dev
Kevin Schoedel [Fri, 16 Jun 2017 20:56:33 +0000 (20:56 +0000)]
Merge "Fix virtual touchpad scroll events." into oc-dr1-dev

6 years agoAdd method to explicitly create Surface.
Bryce Lee [Fri, 16 Jun 2017 14:06:17 +0000 (07:06 -0700)]
Add method to explicitly create Surface.

It is sometimes necessary for a SurfaceControl client to request the
associated Surface object be created rather than reuse the cached
value. This changelist adds an additional method that performs the
same creation operations as if the Surface object was created for the
first time.

Bug: 62108743
Test: go/wm-smoke
Change-Id: I2f460f20b2d16ed9ff81cb36842bcd2f8641e03c

6 years agosurfaceflinger: distinguish mCurrentParent/mDrawingParent
Chia-I Wu [Tue, 13 Jun 2017 21:10:56 +0000 (14:10 -0700)]
surfaceflinger: distinguish mCurrentParent/mDrawingParent

Updates to wp<> is not atomic.  We cannot use/update it at the same
time from the main thread and a binder thread.  With this change,
binder threads use mCurrentParent with the external state lock held.
The main thread uses mDrawingParent.

This is also an alternative fix to bug 62099658 and allows us to
revert "SurfaceFlinger: Update parent pointer while performing
transaction."

Bug: 38505866
Bug: 62099658
Test: boots and no repro (but I can never repro)
Change-Id: Id286a437537daaeec5eee5de62b1d9df245ece53

6 years agosurfaceflinger: protect Client::mParentLayer with a lock
Chia-I Wu [Thu, 15 Jun 2017 21:01:18 +0000 (14:01 -0700)]
surfaceflinger: protect Client::mParentLayer with a lock

Updates to wp<> is not atomic.  Use Client::mLock to protect
mParentLayer.

Bug: 38505866
Test: camera and youtube work
Change-Id: I2739382d5bb99961a47c1011963b6f676d34eec6

6 years agoFix virtual touchpad scroll events.
Kevin Schoedel [Thu, 15 Jun 2017 15:21:13 +0000 (11:21 -0400)]
Fix virtual touchpad scroll events.

1. Correctly configure the uinput device to pass REL_*WHEEL events.

2. Configure the virtual touchpad as a 'rotary encoder', which is
   an inputflinger device class originally provided for the G1 scroll
   ball. This provides two advantages over the default mouse-wheel
   interpretation:
   - It works without an associated mouse pointer to determine the
     event target.
   - It allows for higher resolution through a scale factor (the
     scaling here is chosen by experiment to feel no worse than wheel
     mode, but might benefit from future adjustment).
   There is one accompanying disadvantage: inputflinger only handles
   vertical scrolling (REL_WHEEL) and ignores the horizontal axis
   (REL_HWHEEL).

Bug: 62632827
Test: manual on sailfish
Change-Id: Ic8edad01796d75e8c94fa20f05a5badb0727a948

7 years agolibui: Load a.h.graphics.mapper passthrough service on library load
Jesse Hall [Wed, 7 Jun 2017 21:44:46 +0000 (14:44 -0700)]
libui: Load a.h.graphics.mapper passthrough service on library load

Zygote loads libui, this helps complete the chain from
  zygote -> libui -> a.h.graphics.mapper -> gralloc
so that all of these libraries which are used by nearly every app are
loaded by zygote and shared.

Bug: 62353585
Test: boot to launcher, run calculator, confirm a.h.graphics.mapper
      implementation library is in /proc/`pid zygote64`/maps

Change-Id: Ib505c926a410191e3e2ad809bfe98a73b21fac90

7 years agoSet the vr hwc vsync rate to match the native vsync
Stephen Kiazyk [Thu, 15 Jun 2017 22:53:59 +0000 (15:53 -0700)]
Set the vr hwc vsync rate to match the native vsync

This simple modification reduces the motopho latency from 85ms to 65ms.
However, this is not a final solution, and we should continue to look
for how to address the issue of difference in vsync reporting.

Bug: 36493906
Test: Run motopho, latency is now much lower.
Change-Id: Id52689900a5fe58dfc9d7790b7c3746903380972

7 years agoMerge "Fix vr flinger post thread to resume correctly" into oc-dr1-dev
TreeHugger Robot [Thu, 15 Jun 2017 21:35:32 +0000 (21:35 +0000)]
Merge "Fix vr flinger post thread to resume correctly" into oc-dr1-dev

7 years agoFix vr flinger post thread to resume correctly
Steven Thomas [Thu, 15 Jun 2017 18:38:40 +0000 (11:38 -0700)]
Fix vr flinger post thread to resume correctly

After being paused, the vr flinger post thread remained paused until it
was enabled by requesting display ownership, but the request for display
ownership was made from the vr flinger post thread, causing the post
thread to get stuck in the paused state forever. I moved the display
ownership request to the vr flinger dispatcher thread, so the post
thread can be resumed.

Bug: 62666511

Test: Put a device through a sleep/wake cycle and confirmed the vr
flinger post thread resumes as expected.

Change-Id: Ic57adb7376c8f2b5760bfaa4a5a30b58894a7ab7

7 years agoMerge "Use _exit for profile copy dexopt command" into oc-dr1-dev
Mathieu Chartier [Thu, 15 Jun 2017 18:47:18 +0000 (18:47 +0000)]
Merge "Use _exit for profile copy dexopt command" into oc-dr1-dev

7 years agoFix getDisplayInfo() for SurfaceFlinger in HWC2 mode.
Alistair Strachan [Thu, 15 Jun 2017 17:30:19 +0000 (17:30 +0000)]
Fix getDisplayInfo() for SurfaceFlinger in HWC2 mode.
am: c175253b6d

Change-Id: I55ca473facef90f00eb1a401d9bc8ad7a36e4878

7 years agoFix getDisplayInfo() for SurfaceFlinger in HWC2 mode.
Alistair Strachan [Wed, 7 Jun 2017 23:34:44 +0000 (16:34 -0700)]
Fix getDisplayInfo() for SurfaceFlinger in HWC2 mode.

When HWC2 mode is enabled in SurfaceFlinger, the getDisplayInfo()
function would fail to return the correct active mode in some cases.

This bug was only noticable if you had more than one mode registered
by the HWC2 backend.

The SurfaceComposerClient::getDisplayInfo() function works by calling
getDisplayConfigs(), and de-referencing the config at the index
returned by getActiveConfig(). The active config returned was correct,
but the getDisplayConfigs() array was not properly sorted.

Tracing this back, this problem occurs because the configId is stored
alongside the config in an unordered_map, so when this is converted
to a vector and the configId is discarded, the conversion must be
sorted correctly; it can't just be the hash order returned from
the unordered_map.

There are a few ways to fix this problem, but the easiest was to nip
the problem in the bud by not allowing an unsorted list of configs
to exist on the base HWC2 class. It may be better still to just get
rid of the map and go back to a vector, as this data is more often
used as an array than it is indexed by configId, so the use of an
unordered_map was probably overkill.

Change-Id: Ibfb015a6d9b49c870f37a1c892f15f90abbd1e2c
Bug: 62617569
Test: ./cts-tradefed run cts -m CtsViewTestCases -t android.view.cts.DisplayRefreshRateTest#testRefreshRate

7 years agoUse _exit for profile copy dexopt command
Mathieu Chartier [Wed, 14 Jun 2017 20:02:26 +0000 (13:02 -0700)]
Use _exit for profile copy dexopt command

Previously we used exit(0), but this called global destructors and
could cause problems depending on the state when the forking
happened.

Using _exit avoids calling hte global destructors in the child
process.

Test: Delete packages.xml and flash to simulate first boot
Bug: 62597429
Change-Id: I3a6dcd5f05ca85e1488df154ec283c2ec842e59f

7 years agoMerge changes Ibc1444b8,I14c200d1 into oc-dev
Eino-Ville Talvala [Wed, 14 Jun 2017 08:13:01 +0000 (08:13 +0000)]
Merge changes Ibc1444b8,I14c200d1 into oc-dev
am: fd43dc6723

Change-Id: Iae111bcc2770c1e75aba29021e31d07ff89243ab

7 years agoMerge changes Ibc1444b8,I14c200d1 into oc-dev
Eino-Ville Talvala [Wed, 14 Jun 2017 08:09:40 +0000 (08:09 +0000)]
Merge changes Ibc1444b8,I14c200d1 into oc-dev

* changes:
  ConsumerBase: discardFreeBuffers() also needs to dump its own cache
  BufferQueueProducer: Call onBuffersReleased() in detachNextBuffer

7 years agoMerge changes from topic 'sensor_looper_crash' into oc-dev
Peng Xu [Wed, 14 Jun 2017 06:20:52 +0000 (06:20 +0000)]
Merge changes from topic 'sensor_looper_crash' into oc-dev
am: 638055ef41

Change-Id: I774229e9c84e7b390861638e478e2330b66c3d57

7 years agoSensorManager: attach background thread to JavaVM
Yifan Hong [Wed, 14 Jun 2017 06:20:42 +0000 (06:20 +0000)]
SensorManager: attach background thread to JavaVM
am: 09034f076e

Change-Id: I07364b649a58f9ca0891407540a607967155bf4b

7 years agoFramework sensor manager init not depends on ::android::SensorManager.
Yifan Hong [Wed, 14 Jun 2017 06:20:31 +0000 (06:20 +0000)]
Framework sensor manager init not depends on ::android::SensorManager.
am: 542eace6bf  -s ours

Change-Id: I846d806f4d135a8c353f10ea514a3cdedd22cd85

7 years agoMerge changes from topic 'sensor_looper_crash' into oc-dev
Peng Xu [Wed, 14 Jun 2017 06:12:37 +0000 (06:12 +0000)]
Merge changes from topic 'sensor_looper_crash' into oc-dev

* changes:
  Fix race condition for SensorManager looper.
  SensorManager: attach background thread to JavaVM
  Framework sensor manager init not depends on ::android::SensorManager.

7 years agoFix race condition for SensorManager looper.
Yifan Hong [Wed, 14 Jun 2017 01:04:25 +0000 (18:04 -0700)]
Fix race condition for SensorManager looper.

Before the fix there could be two background threads started for two
loopers. Add a guard to prevent this from happening.

Test: pass
Bug: 62404135
Change-Id: I8230addaaa6b83670d7b83c96809b00fca95d352

7 years agoSensorManager: attach background thread to JavaVM
Yifan Hong [Wed, 14 Jun 2017 00:51:13 +0000 (17:51 -0700)]
SensorManager: attach background thread to JavaVM

Test: pass
Bug: 62404135

Change-Id: I63a128c3c933904211f5ff2483492674eaba93ed

7 years agoFramework sensor manager init not depends on ::android::SensorManager.
Yifan Hong [Tue, 9 May 2017 22:18:02 +0000 (15:18 -0700)]
Framework sensor manager init not depends on ::android::SensorManager.

Test: photo sphere
Change-Id: Ice37a758421827757226a9898bcf3e00857443ff
Merged-In: Ice37a758421827757226a9898bcf3e00857443ff
Fixes: 36448245

7 years agoMerge "Resurrect the pose tool." into oc-dr1-dev
TreeHugger Robot [Wed, 14 Jun 2017 00:22:21 +0000 (00:22 +0000)]
Merge "Resurrect the pose tool." into oc-dr1-dev

7 years agoConsumerBase: discardFreeBuffers() also needs to dump its own cache
Eino-Ville Talvala [Wed, 14 Jun 2017 00:09:11 +0000 (17:09 -0700)]
ConsumerBase: discardFreeBuffers() also needs to dump its own cache

ConsumerBase has its own cached slots with graphic buffer references,
so it's not enough to just ask the buffer queue consumer to free
buffers.

Add code equivalent to what happens in the onBuffersReleased callback.

Test:
Bug: 62593139
Change-Id: Ibc1444b868c6150aa2da1c209e06bdba42f1595d

7 years agoBufferQueueProducer: Call onBuffersReleased() in detachNextBuffer
Eino-Ville Talvala [Tue, 13 Jun 2017 23:39:11 +0000 (16:39 -0700)]
BufferQueueProducer: Call onBuffersReleased() in detachNextBuffer

Like detachBuffer(), detachNextBuffer() needs to inform the consumer,
who generally has a cache of buffer items, that a buffer is no longer
owned by the buffer queue.

Otherwise the consumer layer can leak the buffer reference until
consumer teardown/disconnect.

Test: Camera CTS is fine, using a camera app shows correct memory
  behavior
Bug: 62591036

Change-Id: I14c200d13e60dbbe21261343941f84fb786db117

7 years agoatrace.rc: Correct path to saved_cmdlines_size when setting permission
Joel Fernandes [Tue, 13 Jun 2017 20:18:14 +0000 (20:18 +0000)]
atrace.rc: Correct path to saved_cmdlines_size when setting permission
am: 922e418f45

Change-Id: If92363cbd1ad525aa6b65e255cc86d7d6005ad25

7 years agoResurrect the pose tool.
Okan Arikan [Mon, 5 Jun 2017 23:21:42 +0000 (16:21 -0700)]
Resurrect the pose tool.

Editing the tool to look into the same broadcast ring that
VrCore reads from.

Bug: 62355308
Test: Run pose tool
Change-Id: I270e3934c7df398048701a81851ee860a8acb712
(cherry picked from commit 2a4d63ce1737705fff6def88e68b2e537db9074c)

7 years agoatrace.rc: Correct path to saved_cmdlines_size when setting permission
Joel Fernandes [Tue, 13 Jun 2017 03:47:27 +0000 (20:47 -0700)]
atrace.rc: Correct path to saved_cmdlines_size when setting permission

Bug: 62375794
Test: CTS test

Change-Id: Ie252be152ba26aced63af55734d3155ad93f2919
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit 0094a2d5962ed81c6c624c900450d84f1967ba49)

7 years agodumpstate: Better format for dumping block stat
Wei Wang [Mon, 12 Jun 2017 18:28:37 +0000 (11:28 -0700)]
dumpstate: Better format for dumping block stat

After CL the format looks like:

------ BLOCK STAT (/sys/block/mmcblk0) ------
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/stat                 :    11299    16093  1262592    31863     3895     2968    63232     6463        0    10260    38243
/mmcblk0/stat                 : perf(ios) rd: 75622KB/s(1322/s) wr: 18671KB/s(2246/s) q: 4
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p1/stat       :       37       29       66        6        0        0        0        0        0        6        6
/mmcblk0/mmcblk0p1/stat       : perf(ios) rd: 5632KB/s(6167/s) q: 1
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p24/stat      :       12       32      346        0        1        0        8        0        0        0        0
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p26/stat      :        0        0        0        0        3      381     3072      296        0      100      296
/mmcblk0/mmcblk0p26/stat      : perf(ios) rd: 0KB/s(0/s) wr: 15729KB/s(30/s) q: 3
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p30/stat      :       11       33      352       23        0        0        0        0        0       23       23
/mmcblk0/mmcblk0p30/stat      : perf(ios) rd: 7836KB/s(478/s) q: 1
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p38/stat      :        1        3       32        0        0        0        0        0        0        0        0
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p39/stat      :      816     1072    47000     3460        0        0        0        0        0      273     3460
/mmcblk0/mmcblk0p39/stat      : perf(ios) rd: 88147KB/s(2989/s) q: 13
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p40/stat      :       17       13      228        0        4        0       32        3        0        3        3
/mmcblk0/mmcblk0p40/stat      : perf(ios) rd: 0KB/s(0/s) wr: 5461KB/s(1333/s) q: 1
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p41/stat      :     4831    14319   453376    17336        0        0        0        0        0     3273    17330
/mmcblk0/mmcblk0p41/stat      : perf(ios) rd: 70898KB/s(1476/s) q: 5
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p42/stat      :        8      124     1056        3        0        0        0        0        0        3        3
/mmcblk0/mmcblk0p42/stat      : perf(ios) rd: 180224KB/s(2667/s) q: 1
Block-Dev                     :    R-IOs   R-merg   R-sect   R-wait    W-IOs   W-merg   W-sect   W-wait   in-fli    activ   T-wait
/mmcblk0/mmcblk0p45/stat      :     5560      468   760088    11033     3046     2587    60120     5490        0     6840    16453

Bug: 62319771
Test: adb bugreport and check the result
Change-Id: I9464c4758f03479d433bdb7a907dd4953f226e1e

7 years agoMerge "dumpstate: Remove wpa_cli usage" into oc-dr1-dev
TreeHugger Robot [Tue, 13 Jun 2017 04:18:19 +0000 (04:18 +0000)]
Merge "dumpstate: Remove wpa_cli usage" into oc-dr1-dev

7 years agoMerge "Re-enable default display when switching to VR mode." into oc-dr1-dev
TreeHugger Robot [Mon, 12 Jun 2017 20:44:34 +0000 (20:44 +0000)]
Merge "Re-enable default display when switching to VR mode." into oc-dr1-dev

7 years agoMerge "Add LambdaMessage to SurfaceFlinger" into oc-dr1-dev
TreeHugger Robot [Mon, 12 Jun 2017 20:44:34 +0000 (20:44 +0000)]
Merge "Add LambdaMessage to SurfaceFlinger" into oc-dr1-dev

7 years agodumpstate: Dump all block device stat
Wei Wang [Fri, 9 Jun 2017 21:42:12 +0000 (14:42 -0700)]
dumpstate: Dump all block device stat

We have "UPTIME MMC PERF" but it is limited to MMC and thus has
been broken for a while in recent devices.
This CL is to add dump for all block devices stat information.

Bug: 62319771
Test: adb bugreport and check the result
Change-Id: I74e0bf0c4bf40e268dffd0abb8922f0ffb5e9692

7 years agoMerge "Move global buffer ops to VR display service." into oc-dr1-dev
TreeHugger Robot [Fri, 9 Jun 2017 21:56:52 +0000 (21:56 +0000)]
Merge "Move global buffer ops to VR display service." into oc-dr1-dev

7 years agoMerge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev
Mathias Agopian [Fri, 9 Jun 2017 19:36:27 +0000 (19:36 +0000)]
Merge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev
am: 2563c0f3b0

Change-Id: I10e623eebb70da1f4127c0eec2aa85867da0623c

7 years agoMerge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev
Mathias Agopian [Fri, 9 Jun 2017 19:02:45 +0000 (19:02 +0000)]
Merge "Add missing VNDK pixel formats to AHardwareBuffer" into oc-dev

7 years agoMerge "Floor height API changes." into oc-dr1-dev
Okan Arikan [Fri, 9 Jun 2017 16:48:47 +0000 (16:48 +0000)]
Merge "Floor height API changes." into oc-dr1-dev

7 years agoRe-enable default display when switching to VR mode.
Alex Sakhartchouk [Mon, 5 Jun 2017 14:37:57 +0000 (10:37 -0400)]
Re-enable default display when switching to VR mode.

Previously, in an attempt to minimize the number of changes that got
reset during VR mode transitions, the primary display was not turned back
on.

Bug: 62215749
Test: Switch device into VR mode, observe primary display invalidations.

Change-Id: Idd883e1522f519a0db06fdd88b071007487b6e70
(cherry picked from commit 933ed5ceb9d70829333ae438985a1bfeec8e79a8)

7 years agoAdd LambdaMessage to SurfaceFlinger
Alex Sakhartchouk [Wed, 7 Jun 2017 15:36:32 +0000 (11:36 -0400)]
Add LambdaMessage to SurfaceFlinger

LambdaMessage allows for a cleaner, more compact way to create and
dispatch messages inside SurfaceFlinger. A follow up CL uses this
method, but it was isolated here to keep added functionality and
helper facilities separate.

Bug: 62215749
Test: Compile
Change-Id: I9e13e04f1b67fd60f01bcab02fe4f19c91c10bd4
(cherry picked from commit 117698b8e51c839e4c3925d66af13f3de3b420ab)