• Home
  • History
  • Annotate
  • only in /frameworks/native/services/vr/
History log of /frameworks/native/services/vr/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
252e52aa06df85fd93804aa2b7b3e24702b47205 11-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Apply correct SELinux labels to PDX endpoint and channel sockets." into oc-dev
02207005fa4f0d291b2ad6eaa08a06620e2c587b 11-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add uniqueId to Virtual Display and pass through to inputflinger (2/2)" into oc-dev
06936feb07bf6fbef262e4adebeb8e53910d8cf4 05-Apr-2017 Santos Cordon <santoscordon@google.com> Add uniqueId to Virtual Display and pass through to inputflinger (2/2)

This CL adds:
1) Adds uniqueId (protected via system/sig permission) to virtual
displays.
2) Add support for N virtual display viewports into inputflinger.
3) Set the virtual display's viewports in inputflinger if it has the
uniqueId value set to non-null. (a) Moving the new viewport from java to
native inputflinger and (b) adding "uniqueId" value to viewports makes
up the great majority of this change.
4) From the inputflinger side, we also read in a new value from the
input device configuration files called 'touch.displayId'.
5) When touch.displayId and the virtual display's uniqueId match,
inputflinger links the two.

Test: Start VR and ensure that the virtual viewport shows up when running
'adb shell dump input". Run a VR app, and ensure that the virtual input
device is associated with the new virtual viewport.

Bug: 36051620
Change-Id: I662f09f863a3dc94c570e7e7f30b83888b3f514c
Merged-In: I662f09f863a3dc94c570e7e7f30b83888b3f514c
irtual_touchpad/VirtualTouchpadEvdev.cpp
irtual_touchpad/tests/VirtualTouchpad_test.cpp
4a7762afb4fa8495e711fcc2da322fc388e700bc 02-May-2017 Alex Vakulenko <avakulenko@google.com> Apply correct SELinux labels to PDX endpoint and channel sockets.

Bug: 37646189
Test: Compiled for sailfish-eng
Device booted, normal 2D UI works as before
Was able to run Daydream app and CubeSea (before O1 VR rendering
path was disabled by recent change in HW composer).

Change-Id: I1f7040324992d3c784f072ea6b64a65fa7ed0589
ufferhubd/bufferhubd.rc
erformanced/performanced.rc
903726f55bf57210bf6523dc909074f46c8c4e5a 10-May-2017 Luke Song <songwalker@google.com> Merge "Move sensord" into oc-dev
007b00e775b92025d539eac69b93b7eb91164db1 08-May-2017 Daniel Nicoara <dnicoara@google.com> Remove vr_wm service (try 2)

VR Window Manager has moved to VrCore. Removing deprecated code.

Bug: 36051907
Test: Compiled and verified VR still works.
Change-Id: Iea0c7646df8a068c058099cf19ef7d76bbf89192
r_window_manager/Android.bp
r_window_manager/aidl/android/service/vr/IVrWindowManager.aidl
r_window_manager/application.cpp
r_window_manager/application.h
r_window_manager/controller_data_provider.h
r_window_manager/controller_mesh.cpp
r_window_manager/controller_mesh.h
r_window_manager/display_view.cpp
r_window_manager/display_view.h
r_window_manager/elbow_model.cpp
r_window_manager/elbow_model.h
r_window_manager/hwc_callback.cpp
r_window_manager/hwc_callback.h
r_window_manager/proguard.flags
r_window_manager/reticle.cpp
r_window_manager/reticle.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/shell_view_binder_interface.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
r_window_manager/texture.cpp
r_window_manager/texture.h
r_window_manager/vr_window_manager.cpp
r_window_manager/vr_window_manager_binder.cpp
r_window_manager/vr_window_manager_binder.h
r_window_manager/vr_window_manager_binder_test.cpp
r_window_manager/vr_wm.rc
r_window_manager/vr_wm_ctl.cpp
9a2b294255a83c04ecee17a056e4b9a8cc3076cb 09-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dvrapi: Pass layer_count down" into oc-dev
5c91f12131525c0a7202f0558c634770136e350f 09-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove slices from buffers" into oc-dev
108e84f7e6a9117b66dba000dcf16c6d8c862e16 08-May-2017 Hendrik Wagenaar <hendrikw@google.com> dvrapi: Pass layer_count down

* We were missing layer count, which would prevent multiview
from working

Bug: 37245304
Test: MultiLayerBufferQueue
Change-Id: I88b41f1aa7665df01e89a7386cbc23b15c9a79b0
ufferhubd/buffer_hub.cpp
ufferhubd/buffer_hub.h
ufferhubd/producer_channel.cpp
ufferhubd/producer_channel.h
ufferhubd/producer_queue_channel.cpp
ufferhubd/producer_queue_channel.h
4d3590f3fd0fd65f4e8758d3228de9f55cf135d0 07-May-2017 Hendrik Wagenaar <hendrikw@google.com> Remove slices from buffers

* code no longer required, as it will be handled in vrcore

Bug: 38076195
Test: Manually ran testing
Change-Id: Id28918a3bf73b99cbb57aad4c21251b7a9623074
ufferhubd/buffer_hub.cpp
ufferhubd/buffer_hub.h
ufferhubd/consumer_channel.cpp
ufferhubd/producer_channel.cpp
ufferhubd/producer_channel.h
ufferhubd/producer_queue_channel.cpp
ufferhubd/producer_queue_channel.h
a4aeae5ef39aa6a379a503e1e4cfffba06d48594 07-May-2017 Hendrik Wagenaar <hendrikw@google.com> remove vr/libeds

* libeds is no longer needed

Bug: 38075841
Test: compiled
Change-Id: I61b7edb284633ab8e960387c0479b1a924d68222
r_window_manager/Android.bp
2251d822dac2a96aad4184a6fdc2690f0a58af7c 21-Apr-2017 Corey Tabaka <eieio@google.com> Remove the VR compositor from the framework.

Remove the VR compositor framework and enable out-of-process VR composition
in VrCore.

This CL seems large due to the ripple effect of changing the VrFlinger
API and protocol types. There are three major modules that require
concurrent changes:
1. Protocol definitions and low-level VrFlinger API in libdisplay.
* Additional changes needed to keep old interfaces working for
a short time while replacing the dependent code (dvrGraphics*).
2. VrFlinger service implementation changes to support VrCore compositor
and the removal of the internal compositor.
3. Changes to libdvr platform library API due to changes in #1 and #2.

Because of the nature of the interdependence of types and other defs it is
difficult to break this CL into smaller chunks. However, review of the three
major modules (libdisplay, libdvr, and libvrflinger) may be done separately
to ease the mental burden on reviewers.

Change Summary:
- Remove obsolete screenshot service. VR screenshots will be implemented
by VrCore.
- Update display protocol definitions for changes in VrFlinger service
requirements. The majority of the changes in libdisplay are a
consequence of these protocol and service changes.
- Update VrFlinger to support two kinds of surfaces:
1. Application - use by VR apps.
2. Direct - used by VrCore (protected by permission check).
- Remove VrFlinger internal compositor and GL context.
- Remove obsolete debug console.
- Update VrFlinger hardware composer interface to handle direct
surfaces only, removing the concept of GPU (compositor) layers.
- Update display manager to expose access to application surface info
to VrCore (protected by permission check).
- Update libdvr platform library interfaces for changes to VrFlinger
API / protocol.
- Clean up libdvr API struct setup using a common include.
- Add C++ header-only helpers for DVR platform library opaque types.

Bug: 36401174
Test: Build; run VrFlinger display test tool.
Change-Id: I15abfde5f72dbb3725a3f58621486afba6b64902
ardware_composer/impl/vr_hwc.cpp
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
8a4e6a90e6b7edf73fa0d79dd5b439f8e52eb9f0 20-Apr-2017 Corey Tabaka <eieio@google.com> Add support for consumer queue initial import and hangup.

- Add support for consumer queues to import buffers that are created
before the consumer queue is created, making multi-consumer queue
patterns possible. This is essential for VrFlinger operation.
- Add support for notifying consumer queues when the producer queue
hangs up.
- Correct the epoll event loop to check for hangups even when buffers
are available.
- Add method to retrieve the event fd from a queue.
- Add trace logging and minor cleanup.
- Improve bufferhubd dump state output.

Bug: 36401174
Test: build; bufferhub tests pass.
Change-Id: Idd6f38a3341c048192062734e288d11de48bc4d4
ufferhubd/buffer_hub.cpp
ufferhubd/consumer_queue_channel.cpp
ufferhubd/consumer_queue_channel.h
ufferhubd/producer_channel.cpp
ufferhubd/producer_queue_channel.cpp
0057fddc71d1c3c3de8f9d0bd45a51bb293bfa3c 02-May-2017 Jiwen 'Steve' Cai <jwcai@google.com> Deprecate producer/consumer usage: Step 2

Clean up bufferhub_rpc, display_rpc and service side producer/consumer
usage reference.

Next (final) step is to remove all remaining client side reference to
producer/consumer usage and update dvr_xxx API.

This also fixes a minor typo in dvr_named_buffer-test

Bug: 37881101
Test: Build, flash, ran particles.apk and buffer_hub_queue-test
Change-Id: Ibae4376c1fd1ed964843d8b2ad2fb27204fe5e28
ufferhubd/buffer_hub.cpp
ufferhubd/buffer_hub.h
ufferhubd/producer_channel.cpp
ufferhubd/producer_channel.h
ufferhubd/producer_queue_channel.cpp
ufferhubd/producer_queue_channel.h
044963e1dd0479035b6e5f2c6bd618bde7143710 02-May-2017 Jiwen 'Steve' Cai <jwcai@google.com> Deprecate producer/consumer usage: Step 1

Clean up producer/consumer usage from IonBuffer.

Bug: 37881101
Test: Build, flash, ran particles.apk
Change-Id: I66a8c4db2348b014a7b458b69157ed7c150112e1
ufferhubd/producer_channel.cpp
f2a4bd80c9660f314d75c8e1c735b917ce0ac9c4 28-Apr-2017 Daniel Nicoara <dnicoara@google.com> Merge changes from topic 'allow-vrcore' into oc-dev

* changes:
Check for caller permissions in virtual touchpad service
Restrict VR HWC access to services with RESTRICTED_VR_ACCESS permission
b444a5578f0029f8545ef6d41ce82d1423118b01 20-Apr-2017 Chia-I Wu <olv@google.com> VR: fix libvr_hwc-hal build

libhwcomposer-client was updated to use
android.hardware.graphics.mapper@2.0.

Bug: 37540361
Test: boots
Change-Id: Id9f94087a04890de95711c91ce9d5aa2f6c8e35d
ardware_composer/Android.bp
73feb0676635da6c0f738c10e04052a8162a4095 20-Apr-2017 Chris Forbes <chrisforbes@google.com> vr: Adjust for libui gralloc flags change

Change-Id: I24dbe407ad9139ba1d206b9074c7c507537d198c
Bug: b/33350696
Test: Bullhead: booted to launcher, take photo, watch youtube
ardware_composer/impl/vr_hwc.cpp
f73768c0ce1c41303daa1a563ac86e5bf786673f 13-Apr-2017 Luke Song <songwalker@google.com> Move sensord

Move service to more device-specific directory.

Bug: 36996994
Test: Build targets
Change-Id: Ie0befa422d6cc114826d6a7e145d7f8d4da61185
ensord/Android.mk
ensord/pose_service.cpp
ensord/pose_service.h
ensord/sensor_fusion.cpp
ensord/sensor_fusion.h
ensord/sensor_hal_thread.cpp
ensord/sensor_hal_thread.h
ensord/sensor_ndk_thread.cpp
ensord/sensor_ndk_thread.h
ensord/sensor_service.cpp
ensord/sensor_service.h
ensord/sensor_thread.cpp
ensord/sensor_thread.h
ensord/sensord.cpp
ensord/sensord.rc
ensord/sensord_extension.cpp
ensord/sensord_extension.h
ensord/test/poselatencytest.cpp
4b78832d7fc3cdd13a20587dfee96d1505916213 24-Mar-2017 Luke Song <songwalker@google.com> Remove/Cleanup Obselete References

Bug: 36039686
Bug: 36040117
Bug: 36039685
Bug: 36040550
Test: Build
Change-Id: Ifd5ae90138e39d0a14c6a5a8198a9145f74ec8f6
(cherry picked from commit 8126b9df8987fd9959eab1ae76620c343c32f4fc)
ensord/pose_service.cpp
5da2188e4cc10ae088302554841302ec1dafc782 21-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Pose flicker fix on some devices" into oc-dev
cc41f5068689035520c3b6efc0ac728fff4dcb73 20-Apr-2017 Daniel Nicoara <dnicoara@google.com> Check for caller permissions in virtual touchpad service

Bug: 37542947
Test: Compiled and ran on device and verified no permission errors in VR
mode

Change-Id: I8e6198faeeb510792238f6fcce879f6bfb572281
irtual_touchpad/Android.bp
irtual_touchpad/VirtualTouchpadService.cpp
0b4c80ac82959711738af326b6781f2a8e5ca542 20-Apr-2017 Daniel Nicoara <dnicoara@google.com> Restrict VR HWC access to services with RESTRICTED_VR_ACCESS permission

Bug: 37542947
Test: Compiled
Change-Id: I0880e6a2caaf32f111ae70ba1d54f59960796287
ardware_composer/vr_composer.cpp
188a17e3446aa3fc330b4cb8b0cc978318f7a4fb 12-Apr-2017 Okan Arikan <okana@google.com> Pose flicker fix on some devices

The issue was that when the sensord starts on some devices, the initial
IMU sensor fusion pose timestamps are 0 (the first 20-30). It then
starts sending the timestamps. But the latency model looks into the
latency in the initial samples and fixes the latency estimate.

Therefore the estimated latency was way off.

The solution is checking the pose timestamps before using it.

Bug: 37278649
Test: Restart device and run a VR app.
Change-Id: Ic472cb43b32de5d4af3b19547bdc32e906fbfa6a
ensord/pose_service.cpp
4251e92b6dacb5653aa9528d88484085ee333e3b 13-Apr-2017 Daniel Nicoara <dnicoara@google.com> Move VR HWC HAL impl to vr/hardware_composer and cleanup deps

VR HWC is no longer built into VR WM, but in VR HWC, so update its
location. Also cleanup dead code.

Bug: 36051907
Test: Compiled
Change-Id: I15763234fa93bf3b95b8df6461428fe65fd5f611
ardware_composer/Android.bp
ardware_composer/impl/vr_composer_client.cpp
ardware_composer/impl/vr_composer_client.h
ardware_composer/impl/vr_hwc.cpp
ardware_composer/impl/vr_hwc.h
r_window_manager/Android.bp
r_window_manager/composer/Android.bp
r_window_manager/composer/impl/vr_composer_client.cpp
r_window_manager/composer/impl/vr_composer_client.h
r_window_manager/composer/impl/vr_composer_view.cpp
r_window_manager/composer/impl/vr_composer_view.h
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
r_window_manager/composer_view/Android.bp_disable
r_window_manager/composer_view/vr_composer_view.cpp
r_window_manager/composer_view/vr_composer_view.rc
r_window_manager/hwc_callback.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/vr_window_manager.cpp
730c89a8042e277304a90bff180348fcda75d5a7 10-Apr-2017 Albert Chaulk <achaulk@google.com> vrwm: Push all the properties to vr window manager

Bug: 37204430
Test: Manual
Change-Id: I6cda2732f4aff2433152ffc3549677d23bc598b3
ardware_composer/aidl/android/dvr/parcelable_composer_frame.cpp
ardware_composer/aidl/android/dvr/parcelable_composer_layer.cpp
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
r_window_manager/hwc_callback.cpp
r_window_manager/hwc_callback.h
d8a97f2a858e741c06d38dbebc1d3bab2b7f365f 13-Apr-2017 Corey Tabaka <eieio@google.com> libvrhwc: Fix dependency order because Soong.

Static library dependencies must (usually) be in reverse order of
dependency. Use the correct dependency order to fix the build.

Bug: None
Test: make -j30
Change-Id: I332c800d993561ade3afb3c5eadeee73f97fb475
r_window_manager/composer/Android.bp
1636e003355d9dc6c04d4f9701241f3ab364be32 12-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "VR: Update VR HWC to use buffer metadata passed by SurfaceFlinger" into oc-dev
b162d089a014ba41484a192cb3fbe1c8e2b2d655 11-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update BufferHub service/client with support for gralloc1 usage." into oc-dev
1f42e3a02c4f9a1ba1916a2f0e47082bedb73e41 10-Apr-2017 Daniel Nicoara <dnicoara@google.com> VR: Update VR HWC to use buffer metadata passed by SurfaceFlinger

Without gralloc1 support, need to pass buffer metadata in order to
import native buffers and used them as graphic buffers.

Bug: 36481301
Test: Compiled and ran on device; Verified VR Window Manager properly
displays SurfaceFlinger buffers.

Change-Id: I8426be1d79dcc2fbd631c399427ae03cb2afc21d
ardware_composer/aidl/android/dvr/parcelable_composer_layer.cpp
r_window_manager/composer/Android.bp
r_window_manager/composer/impl/vr_composer_client.cpp
r_window_manager/composer/impl/vr_composer_client.h
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
1d472756aa06f17c34020c35d2f2a598dce69bfb 11-Apr-2017 Chia-I Wu <olv@google.com> Merge "libui: update for revised HIDL gralloc" into oc-dev
5bac7f36ee9d5ed0c2e8a0141909ca94351965a8 06-Apr-2017 Chia-I Wu <olv@google.com> libui: update for revised HIDL gralloc

The revised HIDL gralloc is implementable on top of gralloc0 and
gralloc1, which enables us to remove all legacy code.

However, it lacks the ability to query buffer properties from a
buffer handle. GetBufferFromHandle in VR always fails.

Bug: 36481301
Test: builds and boots on Pixel
Change-Id: Id7cfa2d2172dfc008803860f24fcf4f03ba05f11
ardware_composer/aidl/android/dvr/parcelable_composer_layer.cpp
r_window_manager/composer/impl/vr_hwc.cpp
cd52dd9f1b301854b4e1734e3741d9cef8f784b1 08-Apr-2017 Corey Tabaka <eieio@google.com> Update BufferHub service/client with support for gralloc1 usage.

- Add support for gralloc1 usage flags.
- Mimic how GraphicBuffer supports gralloc0 usage flags: (usage, usage).
- Move to using pdx::Status<T> since we're touching signatures everywhere.

Bug: 36401174
Test: bufferhub_tests; buffer_hub_queue-test
Change-Id: I0e5184197b21eda9806bbea44f63b546b030692a
ufferhubd/buffer_hub.cpp
ufferhubd/buffer_hub.h
ufferhubd/consumer_channel.cpp
ufferhubd/consumer_channel.h
ufferhubd/consumer_queue_channel.cpp
ufferhubd/consumer_queue_channel.h
ufferhubd/producer_channel.cpp
ufferhubd/producer_channel.h
ufferhubd/producer_queue_channel.cpp
ufferhubd/producer_queue_channel.h
792530dccef556fae064a13f5a7641f0c6d97d90 08-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't stack-allocate binder objects." into oc-dev
1a50a60ad01dfcd27bc31ba03370da4d0fe8c723 07-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "vr_hwc: Address ion buffer leakage" into oc-dev
3e7dad572220e2c4b9bfbd471a6278385e99330d 06-Apr-2017 Daniel Nicoara <dnicoara@google.com> VR HWC: Relax checks around layer presentation

Rather than error out on layers without buffers, simply discard them.
This is more in line with other HWComposer implementations which deal
with this error, since SurfaceFlinger doesn't handle it appropriately.

Bug: 37091090
Test: Ran on device and verified errors are no longer reported in logcat
Change-Id: Iacfd9fa707d86367c7b6dbf62edea297fc9dfb8e
r_window_manager/composer/impl/vr_hwc.cpp
b0f5100d636404af6be3bc0f891d3630bfcd5472 06-Apr-2017 Kevin Schoedel <kpschoedel@google.com> Don't stack-allocate binder objects.

These inherit from RefBase and need to be owned in an sp<>.

Bug: 36854729
Test: manual on Pixel phone
Change-Id: I5ac6f50c1a21d4c8b224d41149b16da4d438dba7
Merged-In: I54dac1298dca1eb3ab5e6751366ba67bb2e1906c
irtual_touchpad/main.cpp
r_window_manager/vr_window_manager.cpp
de73eb104754524c283cfdda3355586cd268f871 07-Apr-2017 Okan Arikan <okana@google.com> Merge "Fix the latency model." into oc-dev
5bbb45e038b42dba3550738ad6445527776e0861 07-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'vrflinger-prep' into oc-dev

* changes:
libpdx: Decay variant types to correctly handle cv-reference types.
libpdx: Fix forward declarations using default template args.
Add additional accessors to IonBuffer and BufferHubBuffer.
Update BufferHubQueue in preparation for VrFlinger refactor.
5e4b792b920d6420555788cbbf539f8badf90320 07-Apr-2017 Okan Arikan <okana@google.com> Fix the latency model.

We were being too clever in modeling the latency using exponentially
moving average. The issue is that the average changes as new samples come in
which we then use to update the timestamps.

If the sampling rate is high enough (like IMU) then the changes in the average
are close to the delta times between samples. This causes the sample times
to move, and sometimes even change their updated timestamp order. This
causes all kinds of mess when we linearly extrapolate because the slope is bogus.

The fix is to just average a certain number of latency samples and then stick with that
constant average.

Bug: 36997591
Test: Run any 3DOF VR app.
Change-Id: I5411b2a6b7c3f258bf197f0615c0339d68fd2fd7
ensord/pose_service.cpp
85fcaa2365c843b2c75d19aa16b15b9bb24c4968 07-Apr-2017 Mark Urbanus <urbanus@google.com> vr_hwc: Address ion buffer leakage

Problem:
system is running out of memory while switching between apps back and forth.

Root-cause:
vr_hwc is leaking ion buffers by holding an unreleased reference.

Solution:
No need to register the buffer when getting buffer info. This removes the
additional (unreleased) reference on the buffer.

Test: Validated vr_hwc is no longer leaking ion buffers when switching
apps.
Bug: 36449218

Change-Id: I1c1c5d2cca35c50a4bcbcf7b879d37914b8d835f
r_window_manager/composer/impl/vr_hwc.cpp
ff14f069ee80a4b0640393516e50eced88565f5b 06-Apr-2017 Albert Chaulk <achaulk@google.com> vrwm: Handle intents launched by the VR app

This gives us the following cases
Same appid, vr mode = 1: normal use
Same appid, vr mode = 0: VR app 2D intent
Different appid, vr mode = 1: Switching apps
Different appid, vr mode = 0: 2D app

Bug: 37099690
Test: Manual with calculator and oobetest
Change-Id: I7ba6588fb80d4c8de4f1372d047682f1d5d54860
r_window_manager/display_view.cpp
b324457171474f02e793d3a669b14c8c24e23008 06-Apr-2017 Daniel Nicoara <dnicoara@google.com> Merge "VR: Remove HIDL VR Composer from service/vr/vr_window_manager" into oc-dev
674436272ec61eed99f6e9a55bba10923c3db804 06-Apr-2017 Albert Chaulk <achaulk@google.com> Merge "vrwm: Also recenter the controller when should_recenter_ is set" into oc-dev
f2d79383dbdb4b044020b2648970d79ff753e8fb 05-Apr-2017 Nick Bray <ncbray@google.com> Strip VR daemon binaries.

Stripping was suppressed to assist debugging, but this adds 24+ MB to
release builds.

Bug: none
Test: manual
Change-Id: Ic2a866930cebb67af052b6665af2631b131601ae
ufferhubd/Android.mk
ensord/Android.mk
409c6eecdca80e95a110d63bc70b1c2dfcf49100 24-Mar-2017 Alex Vakulenko <avakulenko@google.com> Make init process create PDX sockets for services

To help us control the creation of PDX sockets and properly labeling
them for SELinux, let the init process create sockets for us based on
the settings specified in .rc files for service processes.

For (test) services that are meant to be started manually from command
line (e.g. test services), keep the old functionality as an option so
that UDS endpoint can be created in a way that it automatically creates
the socket in the service itself.

Bug: 35220925
Test: `m -j32` succeeds. Ran sailfish in VR mode and made sure all the
services (surfaceflinger, performanced, sensord, bufferhub).
`m -j32 checkbuild` succeeds as well.

Change-Id: Ief733b41b534cea19b1bea31de76b06051aa50ab
ufferhubd/bufferhubd.rc
erformanced/performanced.rc
ensord/sensord.rc
1db8a5d7e3b0565b976e77859e28d77f6a451a2b 22-Mar-2017 Corey Tabaka <eieio@google.com> Update BufferHubQueue in preparation for VrFlinger refactor.

- Expose buffer hub queue id to the client. This helpful as an id
in queue enumeration in the DisplayManager API.
- Address log convention deviations.
- Clean up BufferHub service error paths.
- Clean up queue importing logic to query the service for queue
parameters to avoid accidental abuse.
- Make spawning consumer queues more efficient in RPC only cases.
- Clean up ConsumerQueue constructor logic; move to pdx::Client
base class (through BufferHubQueue) instead of pdx::ClientBase.
ConsumerQueue::Create doesn't make sense as a ConsumerQueue can
only be created from another queue.

Bug: 36401174
Test: build; run buffer_hub_queue-test
Change-Id: I0530f64ecb514d0f37bb13f9ce201b6ff51502b6
ufferhubd/buffer_hub.cpp
ufferhubd/buffer_hub.h
ufferhubd/consumer_queue_channel.cpp
ufferhubd/producer_queue_channel.cpp
ufferhubd/producer_queue_channel.h
81adbca59e0dc8d8c239481c6d13cd4195c9d4c9 04-Apr-2017 Albert Chaulk <achaulk@google.com> vrwm: Also recenter the controller when should_recenter_ is set

Bug: 36201389
Test: Manual, recenter controller with vrwm up
Change-Id: I776ac51578d692832baac5aad50993b5ed1b8eea
r_window_manager/application.cpp
r_window_manager/application.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
b13d4773ae9b6fc082c0ed857b3e0b7d7db59b8b 31-Mar-2017 Okan Arikan <okana@google.com> Fix pose predictor jank.

There were two issues:
- A math error in angular velocity computation.
This has unit tests and they were failing.
Need to make sure these units tests get executed.

- There is an inherent sensor latency that we need to account for.

Bug: 36693596, 36196200
Test: Run VrHome, see less hanky result.
Change-Id: Ifcf191f16de9ee64aa14bcbb74c9126db18ebaa8
ensord/pose_service.cpp
ensord/pose_service.h
c428826fdf6208da698fbdb1d49d0b51bfb924b6 04-Apr-2017 Chia-I Wu <olv@google.com> Merge "libui: clean up GraphicBuffer interface" into oc-dev
5ce4bb2cbe132470bd87675e7511aedc7eda2bfd 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "VR: Move VR HWC DVR API to libdvr" into oc-dev
93e3900ad316610072ff61bc6c4df904dd5f7d7e 04-Apr-2017 Alex Vakulenko <avakulenko@google.com> Merge "pdx: Rework error reporting when transfering file and channel handles" into oc-dev
95a99a1d3cdbd19343d0d27271098c9c01a63e78 21-Mar-2017 Daniel Nicoara <dnicoara@google.com> VR: Remove HIDL VR Composer from service/vr/vr_window_manager

Moved into frameworks/hardware/interfaces

Bug: 35570958
Test: Compiled and ran on device
Change-Id: I735096935a06e4dd6a8fc1d719c73ad11e9c1583
ardware_composer/Android.bp
r_window_manager/Android.bp
r_window_manager/composer/1.0/Android.bp
r_window_manager/composer/1.0/IVrComposerClient.hal
r_window_manager/composer/Android.bp
r_window_manager/composer/impl/vr_composer_client.cpp
37cdc8d0b9803e0c3dc17640534b74cd45fa4bd8 27-Mar-2017 Daniel Nicoara <dnicoara@google.com> VR: Move VR HWC DVR API to libdvr

Moved VR HWC API into a common API library.

Bug: 36050795
Test: Compiled
Change-Id: I1af32f4dedb7a6d4bb77a18d3c48cfbc8ea00a66
(cherry picked from commit 3d3fb3960f9c3956074496fd7fa1beb230ac1043)
ardware_composer/Android.bp
ardware_composer/dvr_hardware_composer_client.cpp
ardware_composer/private/android/dvr_hardware_composer_client.h
ardware_composer/private/android/dvr_hardware_composer_defs.h
3db8412608bde327dc6f3e0e252af86edece2baa 10-Mar-2017 Daniel Nicoara <dnicoara@google.com> VR: Update VR Window Manager to use the VR Hardware Composer service

Decouples VR HWC from VR Window Manager.

Bug: 36051907
Test: Compiled and ran on device in VR mode.
Change-Id: Ifd76e742148765b3cf3e71b0cf538b920814eb7b
ardware_composer/vr_hwc.rc
r_window_manager/Android.bp
r_window_manager/hwc_callback.cpp
r_window_manager/hwc_callback.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
f0a7bd033941e26e380232a0515e903cf8e678e5 01-Apr-2017 Alex Vakulenko <avakulenko@google.com> pdx: Rework error reporting when transfering file and channel handles

There is a lot of confusion about reporting errors when passing file
and channel handles over PDX transport between client and service.

Methods like Message::PushFileHandle return an integer which means
both a file handle reference value (if positive) and a possible error
code (if negative). But file handles could contain negative values too
(when they are empty). This is used frequently when passing buffer
fences around (when a fence is not being used, its fd is set to -1).

This results in a special case of when PushFileHandle is called with
a file handle with value of -1, the return value is actually "-errno"
which becomes dependent on a global state (errno is not set by
PushFileHandle itself in case file handle value is negative) and results
in unpredicted behavior (sometimes errno is 0, sometimes its >0).

Cleaned this all up by using Status<T> everywhere we used an int to
pass value payload along with possible error code.

Now the semantics of the calls are more clear.

Bug: 36866492
Test: `m -j32` for sailfish-eng succeeds
Ran unit tests on device (pdx_tests, libpdx_uds_tests, bufferhub_tests,
buffer_hub_queue-test, buffer_hub_queue_producer-test), all pass
Ran CubeSea, NativeTreasureHunt and Ithaca on Sailfish with vrflinger
enabled, was able to use controller and screen rendered correctly.

Change-Id: I0f40c3f356fcba8bc217d5219a0ddf9685e57fd7
ufferhubd/buffer_hub.cpp
ufferhubd/buffer_hub.h
ufferhubd/producer_channel.cpp
ufferhubd/producer_queue_channel.cpp
erformanced/performance_service.cpp
erformanced/performance_service.h
ensord/pose_service.cpp
ensord/pose_service.h
ensord/sensor_service.cpp
ensord/sensor_service.h
b42f171a5a76985fde2689d90fd6d2d7e4920564 21-Mar-2017 Chia-I Wu <olv@google.com> libui: clean up GraphicBuffer interface

Other than transferring the ownership, some callers want to control
whether to register or to clone the handle when creating a
GraphicBuffer from a handle. Add a new constructor with
HandleWrapMethod for finer controls, to replace the one that has
only a boolean, keepOwnership.

The motivation is to enable users to construct GraphicBuffer without
fighting with GraphicBufferMapper::registerBuffer first. More
generally, GraphicBufferMapper::{registerBuffer,unregisterBuffer} is
tricky to use correctly. They should really be considered private
by most.

While at it, deprecate constructors that do not distinguish
producer/consumer usage. It turns out GraphicBuffer is used by some
proprietary libraries. I have to maintain the ABI and cannot remove
the deprecated constructors.

Bug: 36355756
Test: boots
Change-Id: Ieea618d8495f06a6233299d076fb821127cd6bf8
ardware_composer/aidl/android/dvr/parcelable_composer_layer.cpp
r_window_manager/composer/impl/vr_hwc.cpp
052f3aeb8cf11b3ae7271490c5fee2dcec566c31 31-Mar-2017 Alex Vakulenko <avakulenko@google.com> bufferhubd: Fix an error on not closing post_fence explicitly.

There is a typo in the code that instead of calling close() on a Post
fence, actually did get_fd() which is really a no-op.

Fixed by changing the call to call() explicitly.

Bug: None
Test: `m -j32` succeeds. Sailfish boots, CubeSea works.
Change-Id: If788aa8ea291317f0618724ecc35a4b355575772
ufferhubd/producer_channel.cpp
4ab4aa40eb7ecf9ad38307fa56cd1c059c1c2e20 23-Mar-2017 Alex Vakulenko <avakulenko@google.com> Remove unused dependency on libhardware from bufferhubd

'libhardware' doesn't seem to be used anymore. Remove it.

Bug: None
Test: `m -j32` succeeds.
Change-Id: I2ff002ce17d920f44509347ca86ca5f030348cf5
(cherry picked from commit f9f18b6b5c413ffeb8cc3ac67dd49bc17364a76f)
ufferhubd/Android.mk
d330a62612e287b63442db2470d89c55ad326f27 28-Mar-2017 Daniel Nicoara <dnicoara@google.com> VR: Pass display size in the HWC observer callback

1) Unify the places where primary display size is queried.
2) Allows virtual displays to have a different size than the primary
display and the size propagates properly to VR HWC and its observer.

Bug: None
Test: Unittest and manually on device
Change-Id: I7e026c4f9b018d47ca400247beed27841d71c806
(cherry picked from commit 04c73d23d5e366c9f0337cdaa71bd2d15ebf1f4e)
ardware_composer/aidl/android/dvr/parcelable_composer_frame.cpp
ardware_composer/tests/vr_composer_test.cpp
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
r_window_manager/display_view.cpp
r_window_manager/display_view.h
r_window_manager/hwc_callback.cpp
r_window_manager/hwc_callback.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
61a5669b16fc632847af76b1159a6c051ff82087 30-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add 180 rotation to sensord orientation" into oc-dev
010df2088b146a3c0c1fa96ee9477d782a491b20 24-Mar-2017 Hendrik Wagenaar <hendrikw@google.com> Add 180 rotation to sensord orientation

Bug: None
Test: Manually tested locally
Change-Id: I135416a2c5be68172ff466bad503261adf29c5a9
ensord/pose_service.cpp
ensord/pose_service.h
0c9dc725d949f8c931eed5dbe6a797f8529732b1 29-Mar-2017 Albert Chaulk <achaulk@google.com> vrwm: Fix controller input/rendering mismatch

This works for portrait mode only for now. Landscape phones present
some weird buffer sizes (1080x1080) that get scaled incorrectly for
input

This also removes all of our older hacks, such as swapping
width/height in SurfaceFlingerView and the swap + invert of touch
input. A global 90 degree rotation is applied to present the portrait
buffers in the correct orientation

vr_wm_ctl has a command to stack another rotation on top of the
existing ones in order to facilitate development for now. Apps will
likely show up rotated, "vr_wm_ctl rotate 1" will fix it, or -1 if
it needs to be rotated the other way.

Bug: None
Test: Manual with permissions and calculator

Change-Id: Ifd31b444b944fbf3085613349caae37e817538f6
(cherry picked from commit eb49c451cbc5de7bbe5ba440dc8e43291daa6d4e)
r_window_manager/aidl/android/service/vr/IVrWindowManager.aidl
r_window_manager/display_view.cpp
r_window_manager/display_view.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/shell_view_binder_interface.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/vr_window_manager_binder.cpp
r_window_manager/vr_window_manager_binder.h
r_window_manager/vr_wm_ctl.cpp
661e45f150f6deee54cd5fdc1da27c9a1e783474 29-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Recenter upon notification from VrCore

Bug: 36201389
Test: manual on device
Change-Id: I690b70130e45732f052d136bedd587ddbf9493b4
r_window_manager/shell_view.cpp
fe4dfb4f6a259f34f55689719f316825a8eddb4f 27-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "VR: Rename HIDL service name from vr_hwcomposer to vr"
5e91f68c8e5f0ef1742dbeafbcb5d1c833ab248a 26-Mar-2017 Alex Sakhartchouk <alexst@google.com> Properly recover vr_wm from surface vr_flinger crashes.

This is addressing a number of issues:

1) surface_flinger_view_ was incorrectly reset
on de-allocation, which renders vr_wm incapable of seeing
new frames after a crash.

2) dvrGraphicsWaitNextFrame will return -1 if vr_flinger
crashes, which means our graphics context is no longer valid.
We need to de-allocate resources and wait for SF to
reconnect.

3) Displays needed be be de-allocated on SF detach because
they will return incorrect fences on SF re-connect.

4) display_client_ needs to be allocated on demand instead
of at initialization time because vr_flinger crash
invalidates it.

Bug: 36589793
Test: Crash vr_flinger, observe vr_wm working after SF restarts.

Change-Id: I72a79690ee5224e3326c7c571ae4e23797103e6d
r_window_manager/application.cpp
r_window_manager/shell_view.cpp
e96afe6e91efd036089a6b6c42a855bdec4308ec 24-Mar-2017 Daniel Nicoara <dnicoara@google.com> VR: Rename HIDL service name from vr_hwcomposer to vr

This is part of an effort to simplify service names.

Bug: 36564122
Test: Ran on device and verified SurfaceFlinger connects to vr_wm
Change-Id: I3e2a2b778f3f0d2066bf5b756263de4b238b2f83
ardware_composer/vr_hardware_composer_service.cpp
r_window_manager/surface_flinger_view.cpp
3078ed9ad08e40690281b432ccb5e97c16de2d12 24-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Implement an API for vrwm to query if the current vr app is active"
b7c8a4bd8131ce18fb4ab4ee986c3b6b1ed27ad5 20-Mar-2017 Albert Chaulk <achaulk@google.com> Implement an API for vrwm to query if the current vr app is active

The API returns if the client_order 0 layer is visible or not. This
aids in 2D app detection

Bug: None
Test: Manual with permissionsgen & calculator

Change-Id: Id988e61a9f93885e93c28ed83ffaffd84f3bdf15
r_window_manager/application.cpp
r_window_manager/display_view.cpp
r_window_manager/display_view.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
47223c3bbf5d335d4964ff6ec5e7d9eedc002a5c 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Re-add access of DisplayClient from vr_rm"
4688919852c9348da15d64c3303d9a9ab457090a 22-Mar-2017 Stephen Kiazyk <skiazyk@google.com> Re-add access of DisplayClient from vr_rm

This was removed in a previous commit because it relied on an in-flight
CL that had not yet landed. Now that it has landed, the change is back
in.

Bug: 36139334
Test: Compile and run VR app, confirm that touch region is correct
through hierarchy viewer.

Change-Id: I4ecc5e050fd896ba7442eac8b3a4e0b793915ed7
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/surface_flinger_view.cpp
55d1744399dfcdee410cae192f12d229a8c08870 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "VR: Add dvr API for service apps connecting to VR HWC"
f37eca0fc3ffdb8fe3ba7431cb776ccce165aa1f 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "vrwm: Add 2D Mode + control app change"
a70a075b00d1d0e02727d302ca7e55fa43ec0d74 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reduce vr_wm logging."
297e6deb2cb653a6987f80420734030bbdf6dcf4 21-Mar-2017 Albert Chaulk <achaulk@google.com> vrwm: Add 2D Mode + control app change

2D mode is similar to debug mode in that it will always show the
application layer if it exists, but unlike debug mode will strip any
system layers from the output and will attempt to recognize the VR
layers. The virtual display is always in 2D mode as it can only show
2D apps. The primary display can be switched by vr_wm_ctl

Bug: None
Test: Manual with permissionsgen and launching calculator app
Change-Id: I38d025c457b1fca9aeb47cb94ed481ac9ff084f9
r_window_manager/aidl/android/service/vr/IVrWindowManager.aidl
r_window_manager/display_view.cpp
r_window_manager/display_view.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/shell_view_binder_interface.h
r_window_manager/vr_window_manager_binder.cpp
r_window_manager/vr_window_manager_binder.h
r_window_manager/vr_wm_ctl.cpp
4f4ac845a99012093eec66e053d1f6bf7278daf3 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix virtual touchpad re-attachment."
d350248299bbcddd49ceeb10f15a2e79017730db 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "VR: Add VR Hardware Composer Service"
5c9156f5819d079264bcdf5d292bc8e036a20e71 22-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Reduce vr_wm logging.

Controller events ALOGI -> ALOGV.

Change-Id: I942b6b88cc9f3fe35efcb1e3c1ce0c478d1281e1
Test: manual
r_window_manager/application.cpp
a2d4886b53c37a8f47d525e3b9705d8e25cd85c0 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Replace 'cpuset' init option with 'writepid'"
ba2ce39b8e81e7816cc462eb690c9b066b007ae4 16-Mar-2017 Daniel Nicoara <dnicoara@google.com> VR: Add dvr API for service apps connecting to VR HWC

Bug: 36050795
Test: Compiled
Change-Id: I447fe56f7585ed3774bdc3577389d1f9b8281e7c
ardware_composer/Android.bp
ardware_composer/dvr_hardware_composer_client.cpp
ardware_composer/private/android/dvr_hardware_composer_client.h
ardware_composer/private/android/dvr_hardware_composer_defs.h
aba4d01add2e961f8b24a6281f3c616f916eb92f 09-Mar-2017 Daniel Nicoara <dnicoara@google.com> VR: Add VR Hardware Composer Service

Create a separate service with serves the binderized HWComposer
implementation for VR.

Exposes a binder service which VrCore may connect in order to receive
SurfaceFlinger output.

Bug: 36051907
Test: Compiled and ran unittests
Change-Id: I16ec08d32ba0445ac982fc235e59bc3129e03096
ardware_composer/Android.bp
ardware_composer/aidl/android/dvr/IVrComposer.aidl
ardware_composer/aidl/android/dvr/IVrComposerCallback.aidl
ardware_composer/aidl/android/dvr/ParcelableComposerFrame.aidl
ardware_composer/aidl/android/dvr/ParcelableComposerLayer.aidl
ardware_composer/aidl/android/dvr/ParcelableUniqueFd.aidl
ardware_composer/aidl/android/dvr/parcelable_composer_frame.cpp
ardware_composer/aidl/android/dvr/parcelable_composer_frame.h
ardware_composer/aidl/android/dvr/parcelable_composer_layer.cpp
ardware_composer/aidl/android/dvr/parcelable_composer_layer.h
ardware_composer/aidl/android/dvr/parcelable_unique_fd.cpp
ardware_composer/aidl/android/dvr/parcelable_unique_fd.h
ardware_composer/tests/vr_composer_test.cpp
ardware_composer/vr_composer.cpp
ardware_composer/vr_composer.h
ardware_composer/vr_hardware_composer_service.cpp
ardware_composer/vr_hwc.rc
r_window_manager/composer/Android.bp
0d5a06a66396635c2c5a1178eefab248321d7068 22-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Fix virtual touchpad re-attachment.

If the client crashes without detaching the virtual touchpad
and a new instance reconnects, it should take over the existing
device without attempting to configure it again.

Bug: 36051900
Test: no
Change-Id: I446f1bc7cb9c08f914b9bfc653857a97fdc7839c
irtual_touchpad/VirtualTouchpadService.cpp
050b2c83304bd16ec3a838da08b6ba6acf6a3af4 06-Mar-2017 Steven Thomas <steventhomas@google.com> Revert "Revert "Tie vr flinger to persistent vr mode""

This reverts commit 7480c060cb3466d97ec3125d61bbace153f534c8.

Transfer display control to vr flinger when persistent vr mode is
entered, rather than when vr mode is entered. This allows cardboard
apps, which will invoke vr mode but not persistent vr mode, to work as
in N.

This activates vr flinger at device boot for Daydream ready devices,
which fixes an issue where an app would attempt to create a surface
before vr flinger was running, which would hang indefinitely.

The VrManager listener for persistent vr mode is put in vr flinger
instead of surface flinger. This is cleaner since the vr interaction
with the rest of the device is now consolidated in vr flinger.

While testing I encountered a problem where vr flinger was given control
of the display but vsync was turned off, causing vr flinger's post
thread to hang. I changed the vr flinger logic to give control over
vsync and other display settings to the post thread, and took the
opportunity to further simplify and improve vr flinger's thread
interactions.

Bug: 35885165

Test: Manually confirmed that when persistent vr mode is not invoked we
get the N-based render implementation, and when persistent vr mode is
invoked we get vr flinger.

Change-Id: I3b5ad599cc0748e38b861c714c4cc3118f854acf
r_window_manager/application.cpp
r_window_manager/application.h
5fb727f7a1ae1f49d8b8aa8d2d6a27a5f9118075 21-Mar-2017 Alex Vakulenko <avakulenko@google.com> Replace 'cpuset' init option with 'writepid'

The 'cpuset' option is not being upstreamed as expected and instead
we should be using the more generic 'writepid' option with the full
cpuset file path.

Bug: 35313295
Test: None
Change-Id: I451679192bad664b253b07942d78fb288980940f
ufferhubd/bufferhubd.rc
erformanced/performanced.rc
ensord/sensord.rc
irtual_touchpad/virtual_touchpad.rc
r_window_manager/composer_view/vr_composer_view.rc
r_window_manager/vr_wm.rc
656e83fffd6355270afd75581252fe80b2b3b9ef 21-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add C interface for virtual touchpad client."
17353cfb8697811ca5a3906069a577b8dd59ec76 21-Mar-2017 Jin Qian <jinqian@google.com> Merge "Revert "Tie vr flinger to persistent vr mode""
7480c060cb3466d97ec3125d61bbace153f534c8 21-Mar-2017 Jin Qian <jinqian@google.com> Revert "Tie vr flinger to persistent vr mode"

This reverts commit f43d13e4e35ae7d3cdafc4b97c819669d42cef78.

Change-Id: Ib67db8e51b7ea2dbbe6faccce36962bf5b44a6e2
r_window_manager/application.cpp
r_window_manager/application.h
081b23bdec2f67f489aa6c3a425c9a50e9d9bd60 21-Mar-2017 Steven Thomas <steventhomas@google.com> Merge "Tie vr flinger to persistent vr mode"
06b1a744422aebd038612445ec194c775cb280b1 20-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "VR: Allow creating virtual displays"
de1cdaebc9b8fdbc5348e6c07f849b74bacc485d 17-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Add C interface for virtual touchpad client.

For use by the dvr api.

Changes VrWindowManager::ShellView to exercise this change,
and because it will be used when that code relocates to VrCore.

Bug: 36050790
Test: use in vr_wm.
Change-Id: I0fa67d19f94939ae41ef0ea2338f92f6147a4111
irtual_touchpad/Android.bp
irtual_touchpad/DvrVirtualTouchpadClient.cpp
irtual_touchpad/VirtualTouchpadClient.cpp
irtual_touchpad/VirtualTouchpadEvdev.cpp
irtual_touchpad/VirtualTouchpadEvdev.h
irtual_touchpad/VirtualTouchpadService.h
irtual_touchpad/include/VirtualTouchpad.h
irtual_touchpad/include/VirtualTouchpadClient.h
irtual_touchpad/include/dvr/virtual_touchpad_client.h
irtual_touchpad/main.cpp
irtual_touchpad/tests/VirtualTouchpad_test.cpp
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
f43d13e4e35ae7d3cdafc4b97c819669d42cef78 06-Mar-2017 Steven Thomas <steventhomas@google.com> Tie vr flinger to persistent vr mode

Transfer display control to vr flinger when persistent vr mode is
entered, rather than when vr mode is entered. This allows cardboard
apps, which will invoke vr mode but not persistent vr mode, to work as
in N.

This activates vr flinger at device boot for Daydream ready devices,
which fixes an issue where an app would attempt to create a surface
before vr flinger was running, which would hang indefinitely.

The VrManager listener for persistent vr mode is put in vr flinger
instead of surface flinger. This is cleaner since the vr interaction
with the rest of the device is now consolidated in vr flinger.

While testing I encountered a problem where vr flinger was given control
of the display but vsync was turned off, causing vr flinger's post
thread to hang. I changed the vr flinger logic to give control over
vsync and other display settings to the post thread, and took the
opportunity to further simplify and improve vr flinger's thread
interactions.

Bug: 35885165

Test: Manually confirmed that when persistent vr mode is not invoked we
get the N-based render implementation, and when persistent vr mode is
invoked we get vr flinger.

Change-Id: Ieeb8dabc19e799e3179e52971f3b63f5a8f54b3b
r_window_manager/application.cpp
r_window_manager/application.h
b0ae9c126384b45a9a7a15cf0519ee9a06952db8 19-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Refactor IonBuffer to use GraphicBuffer"
308ef1a03cf25b1e7e37ffd8d4c172027d4c97fc 17-Mar-2017 Stephen Kiazyk <skiazyk@google.com> Remove access of DisplayClient from vr_wm

It seems like this functionality relied on another pending patch that
will not come into the picture just yet. I am not reverting the full set
of patches, as they contained some other changes which are best left in.

Bug: None
Test: *pending*
Change-Id: I2d6b6ec8ba6acc98388e5f13a54ad2cea25c1a00
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/surface_flinger_view.cpp
8a71b13127f737a46c55ba94d31ba0262e7cbf8a 16-Mar-2017 Mark Urbanus <urbanus@google.com> Refactor IonBuffer to use GraphicBuffer

- Replace gralloc0 based implementation with GraphicBuffer implementation.
- Removed incompatible ion-buffer unit-tests.
- Added libui dependencies to dependants.

Bug: 34879523
Test: Tested on Lucid, validated graphics and poses are working
Change-Id: I49a129f269d54c81bda93b44d879d4b8dee2006a
ufferhubd/Android.mk
ufferhubd/buffer_hub.cpp
ensord/Android.mk
e77dce28e5e9a7f078cb324a7b9320802fca8469 14-Mar-2017 Stephen Kiazyk <skiazyk@google.com> Force vrhwc/wm to report the native resolution

Due to some Yak-shaving, this also involved a partial conversion of our
libraries to soong.

Notes:
* I also changed the name of libsensor to libvrsensor to avoid a naming
clash with an existing library
* The remaining libraries will be soongified in a separate CL

Bug: 36139334
Test: Build and run vr apps.
Change-Id: Ib39687bd01e3d2e1c30adc54e18f362a85954ab9
ndroid.bp
ensord/Android.mk
irtual_touchpad/Android.bp
irtual_touchpad/Android.mk
r_window_manager/Android.bp
r_window_manager/Android.mk
r_window_manager/composer/Android.bp
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/hwc_callback.cpp
r_window_manager/surface_flinger_view.cpp
a6cc42264e021e37ec52c189dc8e1059d45d4f9b 15-Mar-2017 Daniel Nicoara <dnicoara@google.com> VR: Allow creating virtual displays

Bug: b/35996499
Test: None
Change-Id: Id8fd15791ba9478399a736ee6d5b2f6a847334a6
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
r_window_manager/shell_view.cpp
996d47e8f3c66f1ac261c1e5a002b46feca4dd4c 15-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "BufferHubQueue: ClearAvailable on consumer import"
2b3b666cfd89681514764201803e48b6ba112a80 06-Mar-2017 Albert Chaulk <achaulk@google.com> vrwm: Add support for multiple independent displays

This doesn't change much, just splits ShellView and shuffles code
around.

Display-related things go into DisplayView - everything related to
processing and drawing buffers, hit detection, visibility.

ShellView retains overall state management, touchpad, controller and
is the initial recipient of all incoming frames

The composer library is modified to accept and pass multiple displays

Bug: 35996499
Test: Works for the existing single-display output
Change-Id: Ied5061b4dad9e7d68bb187bf86c3d0f2f3b7a55e
r_window_manager/Android.mk
r_window_manager/application.cpp
r_window_manager/application.h
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
r_window_manager/display_view.cpp
r_window_manager/display_view.h
r_window_manager/hwc_callback.cpp
r_window_manager/hwc_callback.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
05270f4d28e1fa15a90e8c5d6000863bd10aaffc 14-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Preserve phones screen aspect ratio for VR Window Manager."
8a0be9060703dae8c6f0e9fc699f1bb3f7db6380 14-Mar-2017 Alex Sakhartchouk <alexst@google.com> Preserve phones screen aspect ratio for VR Window Manager.

We are a portrait device rotated to landscape mode, adjust rendering
inside vr_wm accordingly.

Bug: 36201035
Test: Built, ran permissions gen, denied permission.
Change-Id: I27382ea6f5417a92791eafa9daaa81cc4af6db11
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/shell_view.cpp
7311c4a899bc549dc4cc6141d3f97d17ea8eb396 14-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Support multiple virtual touchpads."
dc14e5bf86b6999a290b64deb44418a8f205296c 25-Jan-2017 Jiwen 'Steve' Cai <jwcai@google.com> BufferHubQueue: ClearAvailable on consumer import

This fixes the issue that ConsumerQueue keeps receiving
|OnBufferAllocated| events when using UDS based libpdx. It also hardens
error handling during consumer imports.

Bug: 34690159
Test: Build, flash, buffer_hub_queue-test pases
Change-Id: I4f739a2869df851ed836f39122b3eba95697f3f6
ufferhubd/consumer_queue_channel.cpp
7b0125317340e345f5c8815560ca4e32b09697d8 13-Mar-2017 Albert Chaulk <achaulk@google.com> vr_wm: Disable 2D mode until we can detect it correctly

Bug: 36036583
Test: Test w/ permissionsgen

Change-Id: Ie3ea8b162a0c40db8ee9cccb934a2a580a558937
r_window_manager/application.cpp
r_window_manager/shell_view.cpp
r_window_manager/surface_flinger_view.cpp
15bd7517042551ea4ac7e7a20f264e55303a9b78 09-Mar-2017 Luke Song <songwalker@google.com> Allow replacing of sensord

If a makefile variable is set.

Bug: None
Test: None
Change-Id: I416428efc0b6127048e3ef3860ed5ba7f94efe88
ensord/Android.mk
ensord/sensord.cpp
ensord/sensord_extension.cpp
ensord/sensord_extension.h
0108af72a8d8d2ee2af127b4c099b340ad63e3f8 09-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Support multiple virtual touchpads.

The service now creates two uinput devices, named
"vr virtual touchpad 0" for VirtualTouchpad::PRIMARY
and "vr virtual touchpad 1" for VirtualTouchpad::VIRTUAL.

Bug: b/35992608
Test: expanded VirtualTouchpad_test unit test
Change-Id: I8749d559a56cfa9c8ec9a039ff7ad44d16f81915
irtual_touchpad/EvdevInjector.cpp
irtual_touchpad/VirtualTouchpadEvdev.cpp
irtual_touchpad/VirtualTouchpadEvdev.h
irtual_touchpad/tests/VirtualTouchpad_test.cpp
4b64dd48b6896d6b963f0a3a0259d3d2a7076a9e 07-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Revise virtual touchpad interface.

- Explicit start and stop, outside of which the evdev devices
don't exist.
- Permission test (not compiled by default pending build & SELinux
support for temporarily retaining a second copy of the service
for vr_wm).
- Enforce a single user of the touchpad.
- Support 'dumpsys'.

Bug: 36051900
Test: log inspection
Change-Id: I038ed2632d5adf50a3565a981031691d5dc5f7cd
irtual_touchpad/Android.mk
irtual_touchpad/EvdevInjector.cpp
irtual_touchpad/EvdevInjector.h
irtual_touchpad/VirtualTouchpadClient.cpp
irtual_touchpad/VirtualTouchpadEvdev.cpp
irtual_touchpad/VirtualTouchpadEvdev.h
irtual_touchpad/VirtualTouchpadService.cpp
irtual_touchpad/VirtualTouchpadService.h
irtual_touchpad/aidl/android/dvr/VirtualTouchpadService.aidl
irtual_touchpad/include/VirtualTouchpad.h
irtual_touchpad/include/VirtualTouchpadClient.h
irtual_touchpad/tests/VirtualTouchpad_test.cpp
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/vr_window_manager_binder.cpp
0529903dc2398743b59055091d1feabd637ec593 08-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Merge "Interface for multiple virtual touchpads."
0397b7027dd01d48821200fb53d8a9507bf61789 08-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Temporarily disable vr_wm visibility while we figure out what triggers it to come up at all time. This is to quickly unblock everyone."
f172ed844050c6150d3944584a35d53cd2a5d259 08-Mar-2017 Alex Sakhartchouk <alexst@google.com> Temporarily disable vr_wm visibility while we figure out what triggers it
to come up at all time. This is to quickly unblock everyone.

Bug: 36036583
Test: Compiled
Change-Id: Ibf045e7354ee96b7609af1c47b1e64b63659feb9
r_window_manager/application.cpp
3002b8a74431dd7c005269cf9306443a4b4963f1 06-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Interface for multiple virtual touchpads.

This passes the touchpad selection across binder, but does not yet
actually implement multiple touchpad devices.

Bug: b/35992608
Test: primary only in VirtualTouchpad_test
Change-Id: I7529735362e0e38805b9c0e52e07b5efc86bd535
irtual_touchpad/VirtualTouchpadClient.cpp
irtual_touchpad/VirtualTouchpadEvdev.cpp
irtual_touchpad/VirtualTouchpadEvdev.h
irtual_touchpad/VirtualTouchpadService.cpp
irtual_touchpad/VirtualTouchpadService.h
irtual_touchpad/aidl/android/dvr/VirtualTouchpadService.aidl
irtual_touchpad/include/VirtualTouchpad.h
irtual_touchpad/include/VirtualTouchpadClient.h
irtual_touchpad/tests/VirtualTouchpad_test.cpp
r_window_manager/shell_view.cpp
89af70bce420f011adfeb0f80984b3895c4d7d9b 04-Mar-2017 Kevin Schoedel <kpschoedel@google.com> Provide a library interface to the virtual touchpad service.

And make VrWindowManager pay for^H^H^H^H^H^H^H^H use it. The library
interface is a step toward moving 2D embedding into VrCore because it
hides the binder connection that isn't directly accessible to VrCore.

As a matter of implementation, the touchpad-service client library
and the low-level evdev touchpad are derived from the same interface.

Bug: b/35990873
Test: VirtualTouchpad_test; integration TBD.
Change-Id: Ic922ff223ddd5a44f6fb4433a271f8341e93a0e7
irtual_touchpad/Android.mk
irtual_touchpad/VirtualTouchpad.cpp
irtual_touchpad/VirtualTouchpad.h
irtual_touchpad/VirtualTouchpadClient.cpp
irtual_touchpad/VirtualTouchpadEvdev.cpp
irtual_touchpad/VirtualTouchpadEvdev.h
irtual_touchpad/VirtualTouchpadService.cpp
irtual_touchpad/VirtualTouchpadService.h
irtual_touchpad/aidl/android/dvr/VirtualTouchpadService.aidl
irtual_touchpad/include/VirtualTouchpad.h
irtual_touchpad/include/VirtualTouchpadClient.h
irtual_touchpad/main.cpp
irtual_touchpad/tests/VirtualTouchpad_test.cpp
r_window_manager/Android.mk
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
de02802ea3c227278789f6a9d84e2b73d70b9848 02-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes If66d1b06,I923c24b9

* changes:
vrwm: Fix startup flickering
vrwm: Add a listener for enter/exit vr mode events
e5046a7130fe34185f96e5af99d45150cd7e5810 02-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove libandroid dependencies from some targets"
57d3f2d90245df7cc10d4c9093b365fc8d761569 02-Mar-2017 Albert Chaulk <achaulk@google.com> vrwm: Fix startup flickering

Sometimes starting an app appears similar to a 2D app or a VR app +
window. This changes the logic to avoid that.

If a dim or extra layer appears after the 2D app layers then consider
it to be hidden

Bug: 35915107
Test: start permissionsgen several times
Change-Id: If66d1b06cc6c688c26b856e9b5aeee9d1b8940f7
r_window_manager/hwc_callback.h
r_window_manager/shell_view.cpp
0329b79d93d981a8e5ed8d256c9d836d5ed02617 02-Mar-2017 Alex Vakulenko <avakulenko@google.com> Remove libandroid dependencies from some targets

libandroid provided by frameworks/based should not be used by
targets in frameworks/native. This breaks PDK builds.

libandroid isn't actually needed by these two targets, so remove
the dependency.

Bug: 35845012
Test: `m -j32` succeeds
Change-Id: I5440c60a460f4e66e59f77d6ca0e57af4bd11a55
r_window_manager/Android.mk
ca6625b9ed37b3c434c1be7ddd30e48d8b6d2ed6 02-Mar-2017 Albert Chaulk <achaulk@google.com> vrwm: Add a listener for enter/exit vr mode events

This uses the same system service SurfaceFlinger does

Bug: 35917583
Test: Launch VR app, press home button, lock screen. Check vrwm
recieves event

Change-Id: I923c24b9d495a4bfbfb3512cfb52760d6947fdbf
r_window_manager/Android.mk
r_window_manager/application.cpp
r_window_manager/application.h
r_window_manager/shell_view.cpp
d1add22b10d11a4341e2659ad71e6aeddedb0073 02-Mar-2017 Albert Chaulk <achaulk@google.com> vrwm: Fix flickering when entering/leaving VR

There are two types of undefined layers now, 0 is used by layers
SurfaceFlinger inserts and -1 is used by Java when it does not
explicitly assign a type. Previously they were both using 0 but
have been separated to help the show/hide logic in the future.

Bug: 35915107
Test: Enter/exit VR apps, verify vrwm flicking is gone
Change-Id: I000a627f269c6533aedde1528329c04ab9db5372
r_window_manager/hwc_callback.h
3aed508f487f966ad81c7fddc0634248be39b815 28-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "pose_service cleanup"
89ed4c8cfd8ad64269dfcff9742e16bdd705b926 10-Feb-2017 Mathias Agopian <mathias@google.com> split libandroid.so

- ANativeWindow (native_window.h) and
AHardwareBuffer (hardware_buffer.h) now live
in libnativewindow.so, which is a vodka library.

- libandroid.so still provide those symbols
via a static library version (libnativewindow.a)

- removed libbinder dependency as well

Test: compiled & booted
Bug: 35164655
Change-Id: Ib4bc8e8fc9ec1891bcbee63c28fd0131d82edf29
r_window_manager/application.cpp
1925c8fc69a1b78d9da8ef0ed9e2441383e15d86 23-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix crash in sensord that can occur during system instability"
513c074ec8e40ab8be7692c3d08f1d15d6b327ef 23-Feb-2017 John Bates <jbates@google.com> Fix crash in sensord that can occur during system instability

Bug: 35624417
Test: Manually ran CubeSea and closed/openned it several times
Change-Id: I57810531d0ceccfa02afcf0af265587ca88e05be
ensord/sensor_ndk_thread.cpp
3c33beece832aba33309e9d1659ce50e9f679ff8 23-Feb-2017 Hendrik Wagenaar <hendrikw@google.com> pose_service cleanup

* Some code changed, but the helper functions remain

Bug: None
Test: No test required - deleted code
Change-Id: I53181dfe847aa37dca302a3a318d3e9e18b09158
ensord/pose_service.cpp
e13ec18867aee74a82435ef112dca01416eee4c0 22-Feb-2017 Daniel Nicoara <dnicoara@google.com> VR: Replace sw sync fences with egl sync fences

HWComposer::presentDisplay() synchronously calls into the VR WM
presentation code to queue the new frame. If VR WM is showing (drawing)
it will return an EGL fence that will be used to signal when the last
showing frame is no longer used in VR WM. Otherwise an invalid FD (-1)
is returned symbolizing that the last frame isn't in use anymore and the
caller can re-use those buffers immediately.

Bug: b/35096352
Test: Verified SurfaceFlinger output shows correctly in vr_wm
Change-Id: I2b7c2c767d4aa85370dd6519113cb9a2269c7477
r_window_manager/composer/1.0/Android.bp
r_window_manager/composer/1.0/IVrComposerCallback.hal
r_window_manager/composer/1.0/IVrComposerView.hal
r_window_manager/composer/Android.bp
r_window_manager/composer/impl/sync_timeline.cpp
r_window_manager/composer/impl/sync_timeline.h
r_window_manager/composer/impl/vr_composer_view.cpp
r_window_manager/composer/impl/vr_composer_view.h
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
r_window_manager/hwc_callback.cpp
r_window_manager/hwc_callback.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
bc000a7729ca78a9c89df8768aad02b0dce008d0 21-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "vr_wm: Import cloned buffer in VR HWC"
4a59097f19ed5819c0e95576ad959cf88f1aac55 16-Feb-2017 Okan Arikan <okana@google.com> Refactor libposepredictor to be self-contained.

The CL seems big but it is mainly moving stuff around to
make libposepredictor self contained.

libposepredictor/include/predictor.h exposes all functionality and
it only includes Eigen stuff.

Also adds a shared library build step to the makefile.

Bug: 35362498
Test: No functional change.
Change-Id: I0c850711ffde16ee75e4c88b09e47f761c100385
ensord/pose_service.cpp
ensord/pose_service.h
dd5ce7735b73367ac488638704d6bff9aab76f6d 21-Feb-2017 Daniel Nicoara <dnicoara@google.com> vr_wm: Import cloned buffer in VR HWC

Bug: b/35619417
Test: Compiled and tested on device. Ensured SurfaceFlinger content is
visible in VR mode.

Change-Id: Ic2e653c9771fd022079486704b9e7a412d18bfdc
r_window_manager/composer/impl/vr_hwc.cpp
1dc50630e28d51ce51d710fb79197bf3ac0312d3 19-Feb-2017 Colin Cross <ccross@android.com> Update list of output files in vr_window_manager hidl genrule

The output files in the android.dvr.composer@1.0_genc++_headers rule
is not correct, which causes ninja to rebuild the rule on every
incremental build. Fix the list of files to match what is actually
created.

Bug: 33554989
Bug: 35562758
Test: builds, but doesn't rebuild on every incremental build
Change-Id: I2938ad02b8feade4de6d8a5cc969f37e793e93a8
r_window_manager/composer/1.0/Android.bp
e0b184f8c9652d5b67a9b20b2ac1a74304b08416 18-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Polynomial pose prediction."
a9347647eca3101c014be902b713772de3977d87 14-Feb-2017 Mathias Agopian <mathias@google.com> Break a dependency of libui on libandroid

This was only a header dependency, but it still
created a circular dependency, which will cause
problems in another CL.

We fix this by creating a libarect static library
containing only that header. both libui and
libandroid now depend on it and reexport the
header.

We also make sure rect.h ends-up in the right
place.

Test: built and booted device
Bug: 35164655

Change-Id: Iba25b8b801b26b26ec1401c00caf367a06f197ca
ufferhubd/Android.mk
7777e9f6d17a4fa245c10ba54b4d442f65caa23f 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Proper fix for vr_wm: the hwc_callback function is no longer called"
c9e2f79c40534d1f20e6da8f88f8c4f964b1202b 16-Feb-2017 Albert Chaulk <achaulk@google.com> Proper fix for vr_wm: the hwc_callback function is no longer called

Another change removed the call to GetBufferFromHandle but didn't
delete it and an alternate implementation is used. This replicates
the change into the second implementation and removes the original one

Bug: None
Test: Tested in dev branch; built in master
Change-Id: I2bdb38c7b692e30cf1b5e41476ecdd062b5d5d69
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/hwc_callback.cpp
c234af25e4dcb90e8a7f0e985c044459ff93f10f 09-Feb-2017 Okan Arikan <okana@google.com> Polynomial pose prediction.

Adds PolynomialPosePredictor. It is not enabled by default in sensord.

I will do a grid search for the best parameters before turning it on.

You can set dvr.predictor_type to 1 and restart sensord to test.

Bug: 35362498
Test: Run predictor_eval to test the numerical and performance. Set dvr.predictor_type to 1 for qualitative testing.
Change-Id: I435fcc4d141f5949047d0f9d972fcfc8f2a94519
(cherry picked from commit 0b024945982fd2630709534ce448e55657768696)
ensord/pose_service.cpp
ensord/pose_service.h
04c12a09404ba648677e5076de778531e362f1a1 16-Feb-2017 Daniel Nicoara <dnicoara@google.com> VR: Move VR HWC initialization in SurfaceFlingerView

Initialize the VR HWC at first use since it is also needed to register
the frame observer VR WM uses to display SurfaceFlinger output.

Note, need the real implementation, rather than the passthrough
interface received via IComposer::getService().

Bug: b/35403318
Test: Compiled
Change-Id: I7569136edcef57f545e3d1c3daf644f48fd6b907
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
r_window_manager/vr_window_manager.cpp
0814c36bfd223a10a13730841915db34c74c4ec9 16-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Merged vr window manager and vr composer"
98fb3d6666d5ec79f02dc8ef935e7095ad7eb427 16-Feb-2017 Alex Vakulenko <avakulenko@google.com> Merge "sensord: Move sensord PDX socket directory creation to sensord.rc"
a01c1e34edd90bc000aa80c6bb42aebcbd7ca8f9 16-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove Java and gvr references from vr window manager."
6bd7143ec726bb17ea6858836be7a59ea22d5354 15-Feb-2017 Albert Chaulk <achaulk@google.com> Fix vr_wm's importing of buffers. Register needs to be first now

Test: Use VrModeTester to launch into vr mode, verify vr_wm gets buffers
Bug: None
Change-Id: I17a65dc822454386f392cfdd9ffb401055363515
r_window_manager/hwc_callback.cpp
14274f46133c21842b86337871e5f4da08164307 14-Feb-2017 Alex Vakulenko <avakulenko@google.com> sensord: Move sensord PDX socket directory creation to sensord.rc

Moved sensord-specific init script rules to sensord.rc file

Bug: None
Test: `m -j32` succeeds, device boots.
Change-Id: Ica196019bea6a41bfa6f20982716eb2f40a1fb8f
ensord/sensord.rc
46481aa3e02451a2a2dbab0eba17845d2c50c5a4 10-Feb-2017 Alex Sakhartchouk <alexst@google.com> Remove Java and gvr references from vr window manager.

Bug: 35224656
Test: Built with Java removed.
Change-Id: I4a9e37faee1b15a2f84724f928a94ab1b9dd60c7
r_window_manager/Android.mk
r_window_manager/AndroidManifest.xml
r_window_manager/application.cpp
r_window_manager/application.h
r_window_manager/java/com/google/vr/windowmanager/BootCompletedReceiver.java
r_window_manager/java/com/google/vr/windowmanager/VrWindowManagerService.java
r_window_manager/render_thread.cpp
r_window_manager/render_thread.h
r_window_manager/res/drawable-nodpi/vr_icon.png
r_window_manager/res/drawable-nodpi/vr_icon_background.png
r_window_manager/res/values/styles.xml
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/vr_window_manager.cpp
r_window_manager/vr_window_manager_jni.cpp
4516891b8f54574f86aefa10e6f5684469cc5450 15-Feb-2017 Jiyong Park <jiyong@google.com> Merge "Remove TARGET_USES_QCOM_BSP from vr/sensord"
4af37959cba64f5d08326cb6b19a74124155c4e1 07-Feb-2017 Andrey Tuganov <andreyt@google.com> Merged vr window manager and vr composer

Vr window manager and vr composer are running in different threads of
the same process, communicating using a simple callback instead of binder
rpc.

Bug: 35101877
Test: Not tested.
Change-Id: I56d3cdfd3d9d60b2f2a25381a240542fd82d658f
r_window_manager/Android.mk
r_window_manager/application.cpp
r_window_manager/composer/impl/vr_composer_view.cpp
r_window_manager/composer/impl/vr_composer_view.h
r_window_manager/hwc_callback.cpp
r_window_manager/hwc_callback.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
r_window_manager/vr_window_manager.cpp
r_window_manager/vr_wm.rc
d1d5d5b6db9db6c100fd32b17f87a562a39689cd 13-Feb-2017 Jiyong Park <jiyong@google.com> Remove TARGET_USES_QCOM_BSP from vr/sensord

Removing TARGET_USES_QCOM_BSP because 1) it is broken:
QCOM_B_FAMILY, QCOM_BSP macros are defined but never used. 2)
conditional compilation must be eliminated from the framework-side code
so that we can build a generic system.img.

Bug: 34115514
Test: build & run
Change-Id: Ic96c8d77bed9ce399fe6ffac2e57453861aa35a1
ensord/Android.mk
4766e2a776386489667e792f9c7d8c71131b78c1 28-Jan-2017 Leandro Gracia Gil <leandrogracia@google.com> Introduce an API to verify trusted caller apps by UID.

This CL introduces a new function to make sure only trusted packages
like VrCore can make use of APIs that are not intended for app use.

As a first example, this CL introduces a caller check for taking screenshots,
although any sensitive APIs should implement similar checks.

Package trust is defined by having the RESTRICTED_VR_ACCESS permission.

Bug: 34474022
Change-Id: Ib5a242d1a4e17f59b178fb1465064043613ac369
r_manager/Android.mk
r_manager/vr_manager.cpp
20d5832a0a2c93421c0ca01088e01a5b47eb8501 10-Feb-2017 Daniel Nicoara <dnicoara@google.com> VR: Build VR Window Manager only on platforms supported by libgvr

Bug: None
Test: Verified build succeeds on aosp_mips-eng
lunch aosp_mips-eng
cd frameworks/native/services/vr/vr_window_manager
mma

Change-Id: Idf8c4cb842f5fd30f047e70fb1374bca6247eef9
r_window_manager/Android.mk
1c457103ccd9a520b723c1a90189d4e88a0bdd63 07-Feb-2017 Daniel Nicoara <dnicoara@google.com> VR: Update VR HWC and VR WM to use GrallocMapper

Removes the gralloc hacks to access buffer internals and re-enables
building of VR Window Manager.

Bug: b/34878847
Test: Compiled
Change-Id: I06aa5ec0428b2f282a36ee89dbc4da9838c25782
r_window_manager/Android.mk
r_window_manager/Android.mk_disable
r_window_manager/composer/Android.bp
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
r_window_manager/hwc_callback.cpp
5772f3124a0503321751b389718153b30109886e 29-Jan-2017 Alex Sakhartchouk <alexst@google.com> Integrate binder service to vr window manager for controller input.

Bug: 34806399
Test: None

Change-Id: I4fadd3522082f27b053038fe65b61b1126a5a5f2
(cherry picked from commit 3bbfb1b46661439e618c13d9e0dac583edeb16fc)
r_window_manager/Android.mk_disable
r_window_manager/AndroidManifest.xml
r_window_manager/aidl/android/service/vr/IVrWindowManager.aidl
r_window_manager/application.cpp
r_window_manager/application.h
r_window_manager/controller_data_provider.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/shell_view_binder_interface.h
r_window_manager/vr_window_manager.cpp
r_window_manager/vr_window_manager_binder.cpp
r_window_manager/vr_window_manager_binder.h
r_window_manager/vr_window_manager_binder_test.cpp
r_window_manager/vr_wm_ctl.cpp
ffbf8e3d25dfd5e0fb87c19c88d8796daac2eb81 06-Feb-2017 Daniel Nicoara <dnicoara@google.com> VR: Fail presentation without layers

Without any layers or a valid client target there is nothing to present.

Bug: None
Test: Compiled
Change-Id: Ib8b4b7ced628a38c69be726bf1c04dde2882c614
(cherry picked from commit 12da96889be17f1964681210d0f780fd70fefc33)
r_window_manager/composer/impl/vr_hwc.cpp
479f872dce148e8780e943362cc3271e193a07c6 03-Feb-2017 Albert Chaulk <achaulk@google.com> Fixup 2D app patch, forgot to remove unused variable

Bug: None
Test: permissiongen to check non-2d app uage
Change-Id: I712083dfe417eb5549b78dc7ab1ee37faa042338
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
a8ebffe4b9b237a691f7a8fe798d094f872166fd 03-Feb-2017 Albert Chaulk <achaulk@google.com> Call releaseFrame on the IVrComposerView interface

Bug: None
Test: None
Change-Id: I800e6050efc4d5aa4fe79fc62464c9f221a5dc18
r_window_manager/hwc_callback.cpp
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
c63710a5270180abc999074c5e99f6e467cfe1c0 03-Feb-2017 Albert Chaulk <achaulk@google.com> Scale up the display and rotate by 90 degrees

Test: Launch calculator app
Bug: None
Change-Id: Iac2b6b682a94449ba76e689c11357f2247c8e63a
r_window_manager/shell_view.cpp
520fb0e25d9481bc349c1623e4147c246297b66b 03-Feb-2017 Albert Chaulk <achaulk@google.com> Allow VRWM to show 2D apps

2D apps appear as a single app layer at the front of the stack. We can
distinguish them from VR apps as VR has two layers at the front.
When we detect a 2D app we don't skip the first layers for rendering

Test: launch VR app, launch calculator
Bug: None
Change-Id: Iea8420870852b84ab790b5185ac1a44103c2aae5
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
e7916f88ab250e9cbd7faa53458491f19b716782 02-Feb-2017 Daniel Nicoara <dnicoara@google.com> VR: Do extra validation in VR HWC

Validate that the client target buffer is valid before using it and
validate that the requested layers have valid buffers associated with
them.

Bug: None
Test: Compiled
Change-Id: I4830d121e8ab519a24f954fe21c35199f1c1d900
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
c2cbe4edbb4a7de142c42126726b86cbf689f6bf 01-Feb-2017 Alex Sakhartchouk <alexst@google.com> Start VR WindowManager in a headless mode.

Only allocate resources when we need to show ourselves
and draw something.

Bug: None
Test: None

Change-Id: Ied48f024b145ee6f574484883375b939e7814e53
r_window_manager/application.cpp
r_window_manager/render_thread.cpp
r_window_manager/shell_view.cpp
r_window_manager/vr_window_manager.cpp
0bcc104ad740d1ee1cbae8f803a332573282f099 02-Feb-2017 Alex Sakhartchouk <alexst@google.com> Move surface_flinger_view creation into init code.

We use it to receive buffers and trigger visibility.

Bug: None
Test: triggered permission
Change-Id: I41ed91a16fb6bfb27687476fbe43c17fc05bc870
r_window_manager/shell_view.cpp
3079cb7c32421099a73e1a774b228635eeb3f189 20-Jan-2017 Corey Tabaka <eieio@google.com> Use generic libpdx event bits facility in libvrflinger and bufferhubd.

Use the generic event bits abstraction to support UDS and ServiceFS
backends properly.

Bug: 34466748
Test: start/stop basicvr repeatedly; observe stable bufferhub counts.
Change-Id: I9f2ea67c25860ad7fb931938991a29a37f3391fc
ufferhubd/buffer_hub.cpp
ufferhubd/consumer_channel.cpp
ufferhubd/producer_channel.cpp
a8a92784bc5f6a50ce00311c6161fbcfc0898c5a 27-Jan-2017 Alex Vakulenko <avakulenko@google.com> Add libvrflinger for use in SurfaceFlinger

A separate CL uses this code from SurfaceFlinger.

Bug: None
Test: Manually ran modified SurfaceFlinger
Change-Id: I34588df1365588c0a0265e1e2325e3dd5516206a
r_manager/vr_manager.cpp
4fe60582f314e381098f8f3bc2e39c5880e9243a 02-Feb-2017 Alex Vakulenko <avakulenko@google.com> Remove references to libchrome

Removed dependencies on libchrome which was used mostly for logging
and switched over to standard Android log macros.

Bug: None
Test: `m -j32` still succeeds
Change-Id: I0a841c19c15c02f9a031af200e82837f9450d88a
ufferhubd/Android.mk
ufferhubd/buffer_hub.cpp
ufferhubd/bufferhubd.cpp
ufferhubd/consumer_channel.cpp
ufferhubd/producer_channel.cpp
erformanced/cpu_set.cpp
erformanced/main.cpp
erformanced/task.cpp
ensord/Android.mk
ensord/pose_service.cpp
ensord/sensor_hal_thread.cpp
ensord/sensor_ndk_thread.cpp
ensord/sensor_service.cpp
irtual_touchpad/EvdevInjector.cpp
irtual_touchpad/VirtualTouchpad.cpp
irtual_touchpad/VirtualTouchpadService.cpp
irtual_touchpad/main.cpp
r_window_manager/Android.mk_disable
r_window_manager/application.cpp
r_window_manager/elbow_model.cpp
r_window_manager/render_thread.cpp
r_window_manager/shell_view.cpp
r_window_manager/texture.cpp
r_window_manager/vr_window_manager_jni.cpp
897a186b0f887e858e39d8c04b017662854dd09f 28-Jan-2017 Alex Sakhartchouk <alexst@google.com> Make VrWindowManager system service again.

WIP, For now just build a parallel target until controller data comes
from shared memory.

Bug: None
Test: None

Change-Id: I3aa808a4ac6f774f113abadfa76056d350f2a338
r_window_manager/Android.mk_disable
r_window_manager/application.cpp
r_window_manager/application.h
r_window_manager/shell_view.cpp
r_window_manager/vr_window_manager.cpp
r_window_manager/vr_wm.rc
6f2a0f7a791def75bb5deaf113a550ee2b72d55d 01-Feb-2017 Mark Urbanus <urbanus@google.com> Pose orientation was rotated 90 degrees on dvr devices

Orientation property namespace did not match BoardConfig. Change the property
namespace from dvr.* to ro.dvr.*.

Test: Validated pose orientation is correct.
Bug: 34771765
Change-Id: Icca084b19b3e9a8bcfb4bcaa512df07974a9240a
ensord/pose_service.cpp
d04162a9dd0541dd41920d774f690b01b7c25f3b 30-Jan-2017 John Bates <jbates@google.com> Use always fatal assertions in vr_composer_view and add one more

Previously vr_composer_view would never trip on its assertions.

This caused it to startup in a bad state sometimes and need to be manually
restarted.

Bug: 34807059
Test: manually
Change-Id: I4b35c95fd411e3ca8e982de511de0e5e12f18483
r_window_manager/composer_view/Android.bp_disable
r_window_manager/composer_view/vr_composer_view.cpp
43b5b06c8be24e465bd6a7b22a8d341db1ad50a2 19-Jan-2017 Kevin Schoedel <kpschoedel@google.com> Add synthetic back button to virtual touchpad/stylus.

Also add a bit more error checking and documentation.

Test: added to VirtualTouchpad_test.cpp
Bug: 34673438
Change-Id: I3851a2ad79c5338cdd1db0c7d460aecfff082cc3
irtual_touchpad/VirtualTouchpad.cpp
irtual_touchpad/VirtualTouchpad.h
irtual_touchpad/VirtualTouchpadService.cpp
irtual_touchpad/VirtualTouchpadService.h
irtual_touchpad/aidl/android/dvr/VirtualTouchpadService.aidl
irtual_touchpad/tests/VirtualTouchpad_test.cpp
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
07adff7bd9dfa5791bdaaf1b96ebc4f1c9f69a18 01-Feb-2017 Alex Vakulenko <avakulenko@google.com> Remove makefiles for vr_window_manager

This is temporary until we figure out what to do with vendor-specific
gralloc calls in vr_window_manager

Bug: 34819414
Test: `make checkbuild -j32` succeeds
Change-Id: I9e37af1e5fce50acc4930ea241ce7208e5ce6a52
r_window_manager/Android.mk
r_window_manager/Android.mk_disable
r_window_manager/composer/Android.bp
r_window_manager/composer_view/Android.bp
r_window_manager/composer_view/Android.bp_disable
e4eec20f6263f4a42ae462456f60ea6c4518bb0a 27-Jan-2017 Alex Vakulenko <avakulenko@google.com> Add DaydreamVR native libraries and services

Upstreaming the main VR system components from master-dreamos-dev
into goog/master.

Bug: None
Test: `m -j32` succeeds. Sailfish boots and basic_vr sample app works
Change-Id: I853015872afc443aecee10411ef2d6b79184d051
clang-format
ndroid.bp
ufferhubd/Android.mk
ufferhubd/buffer_hub.cpp
ufferhubd/buffer_hub.h
ufferhubd/bufferhubd.cpp
ufferhubd/bufferhubd.rc
ufferhubd/consumer_channel.cpp
ufferhubd/consumer_channel.h
ufferhubd/consumer_queue_channel.cpp
ufferhubd/consumer_queue_channel.h
ufferhubd/producer_channel.cpp
ufferhubd/producer_channel.h
ufferhubd/producer_queue_channel.cpp
ufferhubd/producer_queue_channel.h
erformanced/Android.mk
erformanced/CPPLINT.cfg
erformanced/cpu_set.cpp
erformanced/cpu_set.h
erformanced/directory_reader.h
erformanced/main.cpp
erformanced/performance_service.cpp
erformanced/performance_service.h
erformanced/performance_service_tests.cpp
erformanced/performanced.rc
erformanced/stdio_filebuf.h
erformanced/string_trim.h
erformanced/task.cpp
erformanced/task.h
erformanced/unique_file.h
ensord/Android.mk
ensord/pose_service.cpp
ensord/pose_service.h
ensord/sensor_fusion.cpp
ensord/sensor_fusion.h
ensord/sensor_hal_thread.cpp
ensord/sensor_hal_thread.h
ensord/sensor_ndk_thread.cpp
ensord/sensor_ndk_thread.h
ensord/sensor_service.cpp
ensord/sensor_service.h
ensord/sensor_thread.cpp
ensord/sensor_thread.h
ensord/sensord.cpp
ensord/sensord.rc
ensord/test/poselatencytest.cpp
irtual_touchpad/Android.mk
irtual_touchpad/EvdevInjector.cpp
irtual_touchpad/EvdevInjector.h
irtual_touchpad/VirtualTouchpad.cpp
irtual_touchpad/VirtualTouchpad.h
irtual_touchpad/VirtualTouchpadService.cpp
irtual_touchpad/VirtualTouchpadService.h
irtual_touchpad/aidl/android/dvr/VirtualTouchpadService.aidl
irtual_touchpad/main.cpp
irtual_touchpad/tests/VirtualTouchpad_test.cpp
irtual_touchpad/virtual_touchpad.rc
r_manager/Android.mk
r_manager/vr_manager.cpp
r_window_manager/Android.bp
r_window_manager/Android.mk
r_window_manager/AndroidManifest.xml
r_window_manager/application.cpp
r_window_manager/application.h
r_window_manager/composer/1.0/Android.bp
r_window_manager/composer/1.0/IVrComposerCallback.hal
r_window_manager/composer/1.0/IVrComposerView.hal
r_window_manager/composer/Android.bp
r_window_manager/composer/impl/sync_timeline.cpp
r_window_manager/composer/impl/vr_composer_view.cpp
r_window_manager/composer/impl/vr_composer_view.h
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h
r_window_manager/composer_view/Android.bp
r_window_manager/composer_view/vr_composer_view.cpp
r_window_manager/composer_view/vr_composer_view.rc
r_window_manager/controller_mesh.cpp
r_window_manager/controller_mesh.h
r_window_manager/elbow_model.cpp
r_window_manager/elbow_model.h
r_window_manager/hwc_callback.cpp
r_window_manager/hwc_callback.h
r_window_manager/java/com/google/vr/windowmanager/BootCompletedReceiver.java
r_window_manager/java/com/google/vr/windowmanager/VrWindowManagerService.java
r_window_manager/proguard.flags
r_window_manager/render_thread.cpp
r_window_manager/render_thread.h
r_window_manager/res/drawable-nodpi/vr_icon.png
r_window_manager/res/drawable-nodpi/vr_icon_background.png
r_window_manager/res/values/styles.xml
r_window_manager/reticle.cpp
r_window_manager/reticle.h
r_window_manager/shell_view.cpp
r_window_manager/shell_view.h
r_window_manager/surface_flinger_view.cpp
r_window_manager/surface_flinger_view.h
r_window_manager/texture.cpp
r_window_manager/texture.h
r_window_manager/vr_window_manager_jni.cpp
51a0a56385f4176447d8168f9395341b3e7574a0 08-Dec-2016 Daniel Nicoara <dnicoara@google.com> VR: Create VR implementation for HWC HIDL interface

* Implement the IComposerClient interface for a VR HWC.
* Introduce new command to send layer information to the VR HWC.
* Add observer interface in the VR HWC service allowing VR Window
Manager to consume SurfaceFlinger output.

Bug: 32541196, 33297385
Test: Compiled and ran with modified surfaceflinger that connects to the
VR hwcomposer and made sure there are no crashes.

Change-Id: Ic2c882ba5e4c570cbd0b7a180845a5e61a768cad
ndroid.bp
r_window_manager/Android.bp
r_window_manager/composer/1.0/Android.bp
r_window_manager/composer/1.0/IVrComposerClient.hal
r_window_manager/composer/impl/sync_timeline.cpp
r_window_manager/composer/impl/sync_timeline.h
r_window_manager/composer/impl/vr_composer_client.cpp
r_window_manager/composer/impl/vr_composer_client.h
r_window_manager/composer/impl/vr_hwc.cpp
r_window_manager/composer/impl/vr_hwc.h