OSDN Git Service

android-x86/frameworks-native.git
7 years agoMerge "Avoid a potential race condition on mDisplays" into oc-dev
Stephen Kiazyk [Wed, 12 Apr 2017 00:03:47 +0000 (00:03 +0000)]
Merge "Avoid a potential race condition on mDisplays" into oc-dev
am: 023e25afe9

Change-Id: If2fc7a180a11315c157cae9313e6c909fb17b3ba

7 years agoMerge "Avoid a potential race condition on mDisplays" into oc-dev
TreeHugger Robot [Tue, 11 Apr 2017 23:52:19 +0000 (23:52 +0000)]
Merge "Avoid a potential race condition on mDisplays" into oc-dev

7 years agoMerge "schedulerservice: implement getMaxAllowedPriority" into oc-dev
Steven Moreland [Tue, 11 Apr 2017 21:54:09 +0000 (21:54 +0000)]
Merge "schedulerservice: implement getMaxAllowedPriority" into oc-dev
am: 5c4122c2cb

Change-Id: I9130cb932f7c52f2a3f9b14be125987e7b111fa4

7 years agoMerge "schedulerservice: implement getMaxAllowedPriority" into oc-dev
TreeHugger Robot [Tue, 11 Apr 2017 21:45:01 +0000 (21:45 +0000)]
Merge "schedulerservice: implement getMaxAllowedPriority" into oc-dev

7 years agoAvoid a potential race condition on mDisplays
Stephen Kiazyk [Wed, 5 Apr 2017 23:46:49 +0000 (16:46 -0700)]
Avoid a potential race condition on mDisplays

Update: The HWC1 path needed to be updated in light of a change to
SurfaceFlinger.h. The build now works for both paths.

Original Message:

The race could occur when transitioning in/out of VR flinger mode.
It is now avoided by ensuring that the primary |DisplayDevice| is always
created once |mStateLock| is released, and ensuring that all accesses
to the primary |DisplayDevice| are guarded by |mStateLock|.

Bug: 36194616
Bug: 37249613
Test: Compiled for both HWC1 and HWC2 surface flinger builds.
      Normal behavior is unchanged. Explicitly testing the race
      condition required instrumenting code with sleep statements.

Change-Id: I0b00e857a3b2fd01948a888db2f0715d2a8204c1

7 years agoMerge "Remove .(ll)ndk suffix from (ll)ndk_library" am: 4e80c0077a am: cc18302254
Dan Willemsen [Tue, 11 Apr 2017 17:31:30 +0000 (17:31 +0000)]
Merge "Remove .(ll)ndk suffix from (ll)ndk_library" am: 4e80c0077a am: cc18302254
am: 1fa0018df5  -s ours

Change-Id: Ideaa5044d2900db42fc4887a04c22bd7e18a3e4f

7 years agoMerge "Remove .(ll)ndk suffix from (ll)ndk_library" am: 4e80c0077a
Dan Willemsen [Tue, 11 Apr 2017 17:06:30 +0000 (17:06 +0000)]
Merge "Remove .(ll)ndk suffix from (ll)ndk_library" am: 4e80c0077a
am: cc18302254

Change-Id: I2f9d38d79b2907e0354140e7f6a80e32e2f6676b

7 years agoMerge "Update BufferHub service/client with support for gralloc1 usage." into oc-dev
Corey Tabaka [Tue, 11 Apr 2017 16:58:34 +0000 (16:58 +0000)]
Merge "Update BufferHub service/client with support for gralloc1 usage." into oc-dev
am: b162d089a0

Change-Id: Id86beec15d3b84749ce1949319f38222214596ab

7 years agoMerge "android.frameworks.sensorservice@1.0: Looper thread SCHED_FIFO" into oc-dev
Yifan Hong [Tue, 11 Apr 2017 16:57:55 +0000 (16:57 +0000)]
Merge "android.frameworks.sensorservice@1.0: Looper thread SCHED_FIFO" into oc-dev
am: 6d62c84b1c

Change-Id: If5186e71018647eb29915c99f024b4ca3468d7f0

7 years agoMerge "Prevent runtime restart for crashed clients to framework sensorservice." into...
Andreas Huber [Tue, 11 Apr 2017 16:57:31 +0000 (16:57 +0000)]
Merge "Prevent runtime restart for crashed clients to framework sensorservice." into oc-dev
am: 006eb2838c

Change-Id: I8adcd5edeb1276065a7ebb63e69b02080aa67f20

7 years agoMerge "Remove .(ll)ndk suffix from (ll)ndk_library"
Dan Willemsen [Tue, 11 Apr 2017 16:55:11 +0000 (16:55 +0000)]
Merge "Remove .(ll)ndk suffix from (ll)ndk_library"
am: 4e80c0077a

Change-Id: I7796091eae2ea72c27bf5b74e5c607dda355ca6a

7 years agoMerge "Update BufferHub service/client with support for gralloc1 usage." into oc-dev
TreeHugger Robot [Tue, 11 Apr 2017 16:51:44 +0000 (16:51 +0000)]
Merge "Update BufferHub service/client with support for gralloc1 usage." into oc-dev

7 years agoMerge "android.frameworks.sensorservice@1.0: Looper thread SCHED_FIFO" into oc-dev
TreeHugger Robot [Tue, 11 Apr 2017 16:28:45 +0000 (16:28 +0000)]
Merge "android.frameworks.sensorservice@1.0: Looper thread SCHED_FIFO" into oc-dev

7 years agoMerge "Prevent runtime restart for crashed clients to framework sensorservice." into...
TreeHugger Robot [Tue, 11 Apr 2017 16:28:45 +0000 (16:28 +0000)]
Merge "Prevent runtime restart for crashed clients to framework sensorservice." into oc-dev

7 years agoandroid.frameworks.sensorservice@1.0: Looper thread SCHED_FIFO
Yifan Hong [Mon, 10 Apr 2017 18:49:21 +0000 (11:49 -0700)]
android.frameworks.sensorservice@1.0: Looper thread SCHED_FIFO

Looper thread uses SCHED_FIFO with a priority 10.

Test: sensor works (sanity checks with camera app), logcat
      doesn't show SCHED_FIFO could not be used

b/34386025 [Treble] Identify and fix Binder usage by camera HALs that isn't NDK-based
b/35219747 [Treble] Figure out the new interface between camera and sensor
b/36651814 [QCOM Treble] [REDACTED] Camera HAL uses Binder
b/36651420 [QCOM Treble] [REDACTED] location daemon uses Binder

Change-Id: I0f236a77cccdc8d67a933daf7d5046947c82a3cf

7 years agoMerge "Remove .(ll)ndk suffix from (ll)ndk_library"
Treehugger Robot [Tue, 11 Apr 2017 16:19:14 +0000 (16:19 +0000)]
Merge "Remove .(ll)ndk suffix from (ll)ndk_library"

7 years agoIServiceManager: dump stack on blocked vndbinder requests
Iliyan Malchev [Tue, 11 Apr 2017 15:54:50 +0000 (15:54 +0000)]
IServiceManager: dump stack on blocked vndbinder requests
am: 273e144215

Change-Id: I9f70a76d103a0ab4bfaaf4071453474a9f9b92fa

7 years agobinder: add getDriverName()
Iliyan Malchev [Tue, 11 Apr 2017 15:54:42 +0000 (15:54 +0000)]
binder: add getDriverName()
am: 3206224672

Change-Id: I1bfa64a2dd2e77de166e3b6674ae118939e1baaf

7 years agoRemove .(ll)ndk suffix from (ll)ndk_library
Dan Willemsen [Fri, 7 Apr 2017 22:48:39 +0000 (15:48 -0700)]
Remove .(ll)ndk suffix from (ll)ndk_library

Soong handles these automatically now.

Bug: 33241851
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Merged-In: Ie1cd267564095c51e536b7a84d53e7aed9dca288
Change-Id: Ie1cd267564095c51e536b7a84d53e7aed9dca288

7 years agoIServiceManager: dump stack on blocked vndbinder requests
Iliyan Malchev [Mon, 10 Apr 2017 21:09:04 +0000 (14:09 -0700)]
IServiceManager: dump stack on blocked vndbinder requests

Dump the stack of the thread requesting a service over /dev/vndbinder,
when the requestor is blocked waiting on the service.  This is very
helpful in identifying bugs in converting code to /dev/vndbinder.

Test: sailfish

Change-Id: Iaaf6a83df3465dd5b64cd83c19d8918cfa01d3d8
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agobinder: add getDriverName()
Iliyan Malchev [Mon, 10 Apr 2017 21:06:11 +0000 (14:06 -0700)]
binder: add getDriverName()

Ass ProcessState::getDriverName() to retrieve the /dev node that
libbinder is initialized with in this process.  This can be used
elsewhere to add debug code that is enabled for only one binder domain
or another.

Test: sailfish

Change-Id: I3ea9f0dcc97204508791bdeb70f790980be278a5
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoMerge changes from topic 'llndk_rename' into oc-dev
Steven Moreland [Tue, 11 Apr 2017 07:42:21 +0000 (07:42 +0000)]
Merge changes from topic 'llndk_rename' into oc-dev
am: c441fbfe43

Change-Id: I3a33c345c85b5d84a1e363ce471ffd729b340a16

7 years agoRemove .(ll)ndk suffix from (ll)ndk_library
Dan Willemsen [Tue, 11 Apr 2017 07:41:56 +0000 (07:41 +0000)]
Remove .(ll)ndk suffix from (ll)ndk_library
am: 219db6cbf0

Change-Id: I842bb82df688c75db8739bcd2298a3b4b758801f

7 years agoMerge changes from topic 'llndk_rename' into oc-dev
TreeHugger Robot [Tue, 11 Apr 2017 07:22:19 +0000 (07:22 +0000)]
Merge changes from topic 'llndk_rename' into oc-dev

* changes:
  Remove .(ll)ndk suffix from (ll)ndk_library
  Remove .(ll)ndk suffix from (ll)ndk_library

7 years agoschedulerservice: implement getMaxAllowedPriority
Steven Moreland [Tue, 11 Apr 2017 05:09:03 +0000 (22:09 -0700)]
schedulerservice: implement getMaxAllowedPriority

Test: SCHED_FIFO gets set on vendor marlin camera
Bug: 29251823
Change-Id: Ia6231651acb30620dd1655c8e65f3b380ec575d0

7 years agoPrevent runtime restart for crashed clients to framework sensorservice.
Andreas Huber [Fri, 7 Apr 2017 19:52:17 +0000 (12:52 -0700)]
Prevent runtime restart for crashed clients to framework sensorservice.

This only happens when the client dies, in which case the event queue
reference will be dropped on the client side, so the call to handleEvent
won't even be fired, except for a race condition.

The race condition is, if handleEvent is already fired,
then client dies and the event queue is going to be destroyed and the
fd is going to be removed, but before that the call onEvent fails.

Test: clients of SensorManager that uses event queue no longer
      crashes.
Bug: 35219747

Change-Id: Ibdf062528a219fae65ee6263ed742229ec3cd0d6

7 years agoMerge "Load Vulkan driver into sphal namespace" into oc-dev
Jesse Hall [Tue, 11 Apr 2017 03:19:59 +0000 (03:19 +0000)]
Merge "Load Vulkan driver into sphal namespace" into oc-dev
am: d5de418cf5

Change-Id: Ica441c37ca86452bb93fb75e4f73b20b35c8e17b

7 years agoMerge "Load Vulkan driver into sphal namespace" into oc-dev
TreeHugger Robot [Tue, 11 Apr 2017 03:14:13 +0000 (03:14 +0000)]
Merge "Load Vulkan driver into sphal namespace" into oc-dev

7 years agoMerge "libui: update for revised HIDL gralloc" into oc-dev
Chia-I Wu [Tue, 11 Apr 2017 01:14:18 +0000 (01:14 +0000)]
Merge "libui: update for revised HIDL gralloc" into oc-dev
am: 1d472756aa

Change-Id: Ic18afac0bf83669f7f2bb04d4a7ea47dcb865778

7 years agoMerge "Work on issue #36863299: [Fugu] CTS: PermissionFeatureTest failures:..." into...
Dianne Hackborn [Tue, 11 Apr 2017 01:10:56 +0000 (01:10 +0000)]
Merge "Work on issue #36863299: [Fugu] CTS: PermissionFeatureTest failures:..." into oc-dev
am: 8eb76853e6

Change-Id: I6432c7e742fc2ac1a440c0986ad154e7a6c5e6c5

7 years agoMerge "libui: update for revised HIDL gralloc" into oc-dev
Chia-I Wu [Tue, 11 Apr 2017 01:08:37 +0000 (01:08 +0000)]
Merge "libui: update for revised HIDL gralloc" into oc-dev

7 years agoMerge "Work on issue #36863299: [Fugu] CTS: PermissionFeatureTest failures:..." into...
TreeHugger Robot [Tue, 11 Apr 2017 00:47:50 +0000 (00:47 +0000)]
Merge "Work on issue #36863299: [Fugu] CTS: PermissionFeatureTest failures:..." into oc-dev

7 years agoRemove .(ll)ndk suffix from (ll)ndk_library
Steven Moreland [Mon, 10 Apr 2017 19:56:54 +0000 (12:56 -0700)]
Remove .(ll)ndk suffix from (ll)ndk_library

Soong handles these automatically now.

Bug: 33241851
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Change-Id: I5a16edfb57ca9d3059cdef0a57c7c79e614878fe

7 years agoRemove .(ll)ndk suffix from (ll)ndk_library
Dan Willemsen [Fri, 7 Apr 2017 22:48:39 +0000 (15:48 -0700)]
Remove .(ll)ndk suffix from (ll)ndk_library

Soong handles these automatically now.

Bug: 33241851
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Change-Id: Ie1cd267564095c51e536b7a84d53e7aed9dca288

7 years agoMerge "Get a hack in place for broken quotas." into oc-dev
Jeff Sharkey [Mon, 10 Apr 2017 19:51:12 +0000 (19:51 +0000)]
Merge "Get a hack in place for broken quotas." into oc-dev
am: 99dfb8a646

Change-Id: I20dc12745c89e2bf55aa21ef91c0ec37e57d2a49

7 years agoWork on issue #36863299: [Fugu] CTS: PermissionFeatureTest failures:...
Dianne Hackborn [Mon, 10 Apr 2017 18:55:24 +0000 (11:55 -0700)]
Work on issue #36863299: [Fugu] CTS: PermissionFeatureTest failures:...

...File ata/etc/tv_core_hardware.xml does not exist

Add new separate file for the CTS feature.

Test: none needed

Change-Id: I3be83072e65781224c735b920b0b4fba22f57e4c

7 years agoMerge "Get a hack in place for broken quotas." into oc-dev
TreeHugger Robot [Mon, 10 Apr 2017 18:45:47 +0000 (18:45 +0000)]
Merge "Get a hack in place for broken quotas." into oc-dev

7 years agolibui: update for revised HIDL gralloc
Chia-I Wu [Thu, 6 Apr 2017 19:34:32 +0000 (12:34 -0700)]
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

7 years agoMerge "Add missing functor for DVR API" into oc-dev
Daniel Nicoara [Mon, 10 Apr 2017 15:53:36 +0000 (15:53 +0000)]
Merge "Add missing functor for DVR API" into oc-dev
am: 0915dad29d

Change-Id: Ia49b10ec0ed2000dd71e3f437fa4955e913a4f40

7 years agoMerge "Add missing functor for DVR API" into oc-dev
TreeHugger Robot [Mon, 10 Apr 2017 15:46:58 +0000 (15:46 +0000)]
Merge "Add missing functor for DVR API" into oc-dev

7 years agoMerge "Revert "Avoid a potential race condition on mDisplays"" into oc-dev
Polina Bondarenko [Mon, 10 Apr 2017 11:15:22 +0000 (11:15 +0000)]
Merge "Revert "Avoid a potential race condition on mDisplays"" into oc-dev
am: ed7bc4a638

Change-Id: I323c1ed4ea99ad59e604ae44c4abc7513cde480a

7 years agoMerge "Revert "Avoid a potential race condition on mDisplays"" into oc-dev
Polina Bondarenko [Mon, 10 Apr 2017 11:07:31 +0000 (11:07 +0000)]
Merge "Revert "Avoid a potential race condition on mDisplays"" into oc-dev

7 years agoRevert "Avoid a potential race condition on mDisplays"
Polina Bondarenko [Mon, 10 Apr 2017 10:15:42 +0000 (10:15 +0000)]
Revert "Avoid a potential race condition on mDisplays"

This reverts commit 5576a555a14edd8c76addce2cee37b9b9ced2c3f.

Change-Id: I5d5889fccd94acacfbfef29847e4b65ef2543c75

7 years agoGet a hack in place for broken quotas.
Jeff Sharkey [Mon, 10 Apr 2017 06:19:46 +0000 (00:19 -0600)]
Get a hack in place for broken quotas.

Sadly we mixed together both UID and GID quotas in such a way that
we couldn't detangle the actual data-vs-cache usage in all cases.

Temporarily patch over this to get CTS passing until we can circle
back and try again.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 3673117537193650
Change-Id: I5870b4e9c22398762fc47672e4d5d78c06bef79f

7 years agoMerge "Load GL graphics drivers explicitly from sphal namespace" into oc-dev
Jiyong Park [Mon, 10 Apr 2017 01:58:17 +0000 (01:58 +0000)]
Merge "Load GL graphics drivers explicitly from sphal namespace" into oc-dev
am: 8bac3c1fb4

Change-Id: I4a3cce9773fe44c589f8b0adef9814930c1d94f0

7 years agoMerge "Load GL graphics drivers explicitly from sphal namespace" into oc-dev
TreeHugger Robot [Mon, 10 Apr 2017 01:53:32 +0000 (01:53 +0000)]
Merge "Load GL graphics drivers explicitly from sphal namespace" into oc-dev

7 years agoLoad Vulkan driver into sphal namespace
Jesse Hall [Fri, 7 Apr 2017 23:48:02 +0000 (16:48 -0700)]
Load Vulkan driver into sphal namespace

Test: bit CtsGraphicsTestCases:.VulkanFeaturesTest
Bug: 37143654
Change-Id: I4d14b7a7642071648d52d716870a41cfb4e844f1

7 years agoLoad GL graphics drivers explicitly from sphal namespace
Jiyong Park [Wed, 5 Apr 2017 05:23:52 +0000 (14:23 +0900)]
Load GL graphics drivers explicitly from sphal namespace

In Treble term, GL wrappers (libEGL.so, libGLES*.so, ...) are called
SP-NDK and actual drivers (libEGL_*.so, libGLESv2_*.so, ...)
are called SP-HALs. (SP = Same-Process).

SP-HALs are developed by vendors and thus they can use only a subset of
framework libraries that we call vndk-stable and subset of NDK
libraries. It consists of libc, libm, liblog, libz, libnativewindow,
libc++, ..., but not framework-only libraries such as libui, libandroid,
etc.

In order to enforce such restriction at run-time, we will use the linker
namespace. Specifically, we create a new namespace named 'sphal' and
configure it so that...
1) it can only search and load libraries from /vendor/lib,
2) it redirects the load/link request to the default namespace when the
allowed list of libraries are requested from the caller, and
3) it rejects to search/load any library other than 1) and 2).

The problem here is, GL wrapper need to tell the linker to load the
drivers from the separate namespace (the 'sphal' namespace other than
the default namespace. To specify the namespace, we need to use
android_dlopen_ext() instead of dlopen().`

Bug: 34407260
Bug: 37049319
Test: none, no op for now since we haven't create sphal namespace.

Change-Id: I376dd9e5cc904452f669c27eb85c59b30b43dc39

7 years agoMerge "Add HIDL Scheduler Service implementation." into oc-dev
Steven Moreland [Sat, 8 Apr 2017 02:35:56 +0000 (02:35 +0000)]
Merge "Add HIDL Scheduler Service implementation." into oc-dev
am: 873da45918

Change-Id: Id87150c6716059e1173fb5acd05db14b0d4451c2

7 years agoMerge "Add HIDL Scheduler Service implementation." into oc-dev
TreeHugger Robot [Sat, 8 Apr 2017 02:26:56 +0000 (02:26 +0000)]
Merge "Add HIDL Scheduler Service implementation." into oc-dev

7 years agoMerge "Enable FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS on phones and tablets" into...
Andrii Kulian [Sat, 8 Apr 2017 01:58:47 +0000 (01:58 +0000)]
Merge "Enable FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS on phones and tablets" into oc-dev
am: f49152330a

Change-Id: I8f66fc1f298dacfc04fe0ad80fc2e54b160b6dcb

7 years agoMerge "Avoid a potential race condition on mDisplays" into oc-dev
Stephen Kiazyk [Sat, 8 Apr 2017 01:57:44 +0000 (01:57 +0000)]
Merge "Avoid a potential race condition on mDisplays" into oc-dev
am: 063c5dc547

Change-Id: Id506c454592c4e14a4fb5b294acf9deee36aa04b

7 years agoMerge "Enable FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS on phones and tablets" into...
Andrii Kulian [Sat, 8 Apr 2017 01:51:23 +0000 (01:51 +0000)]
Merge "Enable FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS on phones and tablets" into oc-dev

7 years agoMerge "Avoid a potential race condition on mDisplays" into oc-dev
TreeHugger Robot [Sat, 8 Apr 2017 01:48:20 +0000 (01:48 +0000)]
Merge "Avoid a potential race condition on mDisplays" into oc-dev

7 years agoUpdate BufferHub service/client with support for gralloc1 usage.
Corey Tabaka [Sat, 8 Apr 2017 01:03:57 +0000 (18:03 -0700)]
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

7 years agoAdd HIDL Scheduler Service implementation.
Steven Moreland [Fri, 7 Apr 2017 17:46:25 +0000 (10:46 -0700)]
Add HIDL Scheduler Service implementation.

Test: marlin camera successfully sets permissions
Bug: 29251823
Change-Id: Ic7dc0377e5b0c3b08d32cf97dae39b6d35a0f631

7 years agoMerge "(DO NOT MERGE) media: Add new OMX extension for setting latency." into oc-dev
Hangyu Kuang [Sat, 8 Apr 2017 00:13:21 +0000 (00:13 +0000)]
Merge "(DO NOT MERGE) media: Add new OMX extension for setting latency." into oc-dev
am: ce3e88d14c

Change-Id: I7eb7430899c00a7f3c905ccf5721575c86a954b4

7 years agoMerge "(DO NOT MERGE) media: Add new OMX extension for setting latency." into oc-dev
TreeHugger Robot [Sat, 8 Apr 2017 00:02:08 +0000 (00:02 +0000)]
Merge "(DO NOT MERGE) media: Add new OMX extension for setting latency." into oc-dev

7 years agoAvoid a potential race condition on mDisplays
Stephen Kiazyk [Wed, 5 Apr 2017 23:46:49 +0000 (16:46 -0700)]
Avoid a potential race condition on mDisplays

The race could occur when transitioning in/out of VR flinger mode.
It is now avoided by ensuring that the primary |DisplayDevice| is always
created once |mStateLock| is released, and ensuring that all accesses
to the primary |DisplayDevice| are guarded by |mStateLock|.

Bug: 36194616
Test: Normal behavior is unchanged. Explicitly testing the race
condition required instrumenting code with sleep statements.

Change-Id: I1f8fcf23982c311d47267beca8127b6c29562ce5

7 years agoEnable FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS on phones and tablets
Andrii Kulian [Fri, 7 Apr 2017 23:12:44 +0000 (16:12 -0700)]
Enable FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS on phones and tablets

Bug: 36776777
Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: If3fbf32f1f6c3de2f12f4b446f9350ea666a0d97

7 years agoMerge "Don't stack-allocate binder objects." into oc-dev
Kevin Schoedel [Fri, 7 Apr 2017 23:04:49 +0000 (23:04 +0000)]
Merge "Don't stack-allocate binder objects." into oc-dev
am: 792530dcce

Change-Id: Icbed5136762f01f268ac5f33faefc9097a973eed

7 years agoMerge "Don't stack-allocate binder objects." into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 22:53:02 +0000 (22:53 +0000)]
Merge "Don't stack-allocate binder objects." into oc-dev

7 years agoMerge "Fix binderValueTypeTest" into oc-dev
Tri Vo [Fri, 7 Apr 2017 22:40:48 +0000 (22:40 +0000)]
Merge "Fix binderValueTypeTest" into oc-dev
am: 3375aa20b3

Change-Id: I2253c2c3f9565c1ea01b0b68bd6a6458beb552b3

7 years agoMerge "Fix binderValueTypeTest" into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 22:27:03 +0000 (22:27 +0000)]
Merge "Fix binderValueTypeTest" into oc-dev

7 years agoFix binderValueTypeTest
Tri Vo [Fri, 7 Apr 2017 20:15:06 +0000 (13:15 -0700)]
Fix binderValueTypeTest

Bug: 36903040
Test: compile, push, run on device.
Change-Id: I788dd7f5b5800a894aba4262553c7c6361549850

7 years agoMerge "Add separate 'vndservice' binary." into oc-dev
Martijn Coenen [Fri, 7 Apr 2017 20:07:08 +0000 (20:07 +0000)]
Merge "Add separate 'vndservice' binary." into oc-dev
am: cde29667e4

Change-Id: Iae0d0a37df6afdbd9f99b139afbcd6aa8a8c0c5a

7 years agoMerge "Add separate 'vndservice' binary." into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 20:03:29 +0000 (20:03 +0000)]
Merge "Add separate 'vndservice' binary." into oc-dev

7 years agoMerge "vr_hwc: Address ion buffer leakage" into oc-dev
Mark Urbanus [Fri, 7 Apr 2017 18:47:00 +0000 (18:47 +0000)]
Merge "vr_hwc: Address ion buffer leakage" into oc-dev
am: 1a50a60ad0

Change-Id: Iedf512b6d71097d5f5e6c97dcd9d347426d2c6a5

7 years agoMerge "vr_hwc: Address ion buffer leakage" into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 18:35:08 +0000 (18:35 +0000)]
Merge "vr_hwc: Address ion buffer leakage" into oc-dev

7 years agoMerge "libpdx: Fix ThreadLocalBufferTest.InitialValue unittest" into oc-dev
Alex Vakulenko [Fri, 7 Apr 2017 17:57:26 +0000 (17:57 +0000)]
Merge "libpdx: Fix ThreadLocalBufferTest.InitialValue unittest" into oc-dev
am: 99afa6dc8d

Change-Id: I42468f1d279fa41d90045bd7eb68e99e36d700e6

7 years agoMerge "libpdx: Fix ThreadLocalBufferTest.InitialValue unittest" into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 17:49:22 +0000 (17:49 +0000)]
Merge "libpdx: Fix ThreadLocalBufferTest.InitialValue unittest" into oc-dev

7 years agoAdd separate 'vndservice' binary.
Martijn Coenen [Fri, 7 Apr 2017 17:46:57 +0000 (10:46 -0700)]
Add separate 'vndservice' binary.

This is installed on the vendor partition,
and can be used to call into vndservicemanager
and the services it hosts.

Bug: 36987120
Test: vndservice list works
Change-Id: I2d72312276cd4402ee1b399713cd5322b125b00f

7 years agoVR HWC: Relax checks around layer presentation
Daniel Nicoara [Fri, 7 Apr 2017 17:37:53 +0000 (17:37 +0000)]
VR HWC: Relax checks around layer presentation
am: 3e7dad5722

Change-Id: Ic50616ef95f1e3d977f1f6f826d1e5030e6cd11c

7 years agoVR HWC: Relax checks around layer presentation
Daniel Nicoara [Thu, 6 Apr 2017 15:10:33 +0000 (11:10 -0400)]
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

7 years agoDon't stack-allocate binder objects.
Kevin Schoedel [Thu, 6 Apr 2017 17:49:41 +0000 (13:49 -0400)]
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

7 years agoMerge "Fix the latency model." into oc-dev
Okan Arikan [Fri, 7 Apr 2017 16:57:52 +0000 (16:57 +0000)]
Merge "Fix the latency model." into oc-dev
am: de73eb1047

Change-Id: Iaba80ab8508ceed5c3e0a4839777d0bd65f7ca6a

7 years agoMerge changes from topic 'vrflinger-prep' into oc-dev
Corey Tabaka [Fri, 7 Apr 2017 16:53:30 +0000 (16:53 +0000)]
Merge changes from topic 'vrflinger-prep' into oc-dev
am: 5bbb45e038

Change-Id: I34f55f64375479fbb4dcfa176b6ffa6deee141e4

7 years agoMerge "Fix the latency model." into oc-dev
Okan Arikan [Fri, 7 Apr 2017 16:51:21 +0000 (16:51 +0000)]
Merge "Fix the latency model." into oc-dev

7 years agoMerge changes from topic 'vrflinger-prep' into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 16:48:04 +0000 (16:48 +0000)]
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.

7 years agolibpdx: Fix ThreadLocalBufferTest.InitialValue unittest
Alex Vakulenko [Fri, 7 Apr 2017 15:55:03 +0000 (08:55 -0700)]
libpdx: Fix ThreadLocalBufferTest.InitialValue unittest

A call to GetBuffer() has been inadvertently removed during code
upstreaming to master. See the BUG below for more details.

Bug: 36456321
Test: `pdx_tests` now succeed on Sailfish
Change-Id: Ic7d6ecbbd9b0e59e74b48a66a9e3701dc44695bc

7 years agoFix the latency model.
Okan Arikan [Thu, 6 Apr 2017 23:35:56 +0000 (16:35 -0700)]
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

7 years agoMerge "Support halt the trace when schd-dbg hit deadline" into oc-dev
Howard Chen [Fri, 7 Apr 2017 03:46:03 +0000 (03:46 +0000)]
Merge "Support halt the trace when schd-dbg hit deadline" into oc-dev
am: 5ea0fe13cc

Change-Id: I645dde48291074b3557cdc60dee512b4a689d76c

7 years agoMerge "Support halt the trace when schd-dbg hit deadline" into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 03:39:19 +0000 (03:39 +0000)]
Merge "Support halt the trace when schd-dbg hit deadline" into oc-dev

7 years agoMerge "Add option to list vndservicemanager services." into oc-dev
Martijn Coenen [Fri, 7 Apr 2017 02:16:57 +0000 (02:16 +0000)]
Merge "Add option to list vndservicemanager services." into oc-dev
am: 6463f888ed

Change-Id: Iead3573a7bb2537ffbcaded7fabf29732d0d0bf0

7 years agoMerge "Add option to list vndservicemanager services." into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 02:09:00 +0000 (02:09 +0000)]
Merge "Add option to list vndservicemanager services." into oc-dev

7 years agoMerge "vrwm: Handle intents launched by the VR app" into oc-dev
Albert Chaulk [Fri, 7 Apr 2017 01:54:22 +0000 (01:54 +0000)]
Merge "vrwm: Handle intents launched by the VR app" into oc-dev
am: 4f50c6f388

Change-Id: I6b18191980cc248049845db1bdf9d3ec8b6f7691

7 years agoMerge "vrwm: Handle intents launched by the VR app" into oc-dev
TreeHugger Robot [Fri, 7 Apr 2017 01:45:22 +0000 (01:45 +0000)]
Merge "vrwm: Handle intents launched by the VR app" into oc-dev

7 years agoMerge "libpdx_uds: Fix RPC channel ID allocation to not recycle values as often"...
Alex Vakulenko [Fri, 7 Apr 2017 01:12:52 +0000 (01:12 +0000)]
Merge "libpdx_uds: Fix RPC channel ID allocation to not recycle values as often" into oc-dev
am: d7adb715ab

Change-Id: Ie5897ba681339c6e32bea24999287426be090e44

7 years agoMerge "libpdx_uds: Fix RPC channel ID allocation to not recycle values as often"...
TreeHugger Robot [Fri, 7 Apr 2017 01:07:57 +0000 (01:07 +0000)]
Merge "libpdx_uds: Fix RPC channel ID allocation to not recycle values as often" into oc-dev

7 years agoMerge changes from topics 'seinfo', 'public_dex' into oc-dev
Calin Juravle [Fri, 7 Apr 2017 00:37:00 +0000 (00:37 +0000)]
Merge changes from topics 'seinfo', 'public_dex' into oc-dev
am: 1f639435da

Change-Id: I02a2f1b5aef05f91d3766f28e2394b3091fcc1a1

7 years agoFix permission for public secondary dex files
Calin Juravle [Fri, 7 Apr 2017 00:36:44 +0000 (00:36 +0000)]
Fix permission for public secondary dex files
am: ebc8a79bbc

Change-Id: Iee64f192d00ab1a2e106493ba827e11f85748959

7 years agoMerge changes from topics 'seinfo', 'public_dex' into oc-dev
Calin Juravle [Fri, 7 Apr 2017 00:23:43 +0000 (00:23 +0000)]
Merge changes from topics 'seinfo', 'public_dex' into oc-dev

* changes:
  Restore selinux labels for secondary dex oat directory
  Fix permission for public secondary dex files

7 years agovr_hwc: Address ion buffer leakage
Mark Urbanus [Thu, 6 Apr 2017 22:29:57 +0000 (15:29 -0700)]
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

7 years agolibpdx_uds: Fix RPC channel ID allocation to not recycle values as often
Alex Vakulenko [Thu, 6 Apr 2017 21:51:54 +0000 (14:51 -0700)]
libpdx_uds: Fix RPC channel ID allocation to not recycle values as often

The value of channel ID for PDX service on UDS transport was actual file
descriptor value for the data socket. Since channels are open and closed
constantly, it is quite often that channel ID is being reused immediately,
so it is almost impossible to use `cid` as unique identifier for objects
being passed around.

Instead, we now use monotonically growing channel ID value.

To prevent the possibility of using channel ID as the socket FD and vice
versa, changed all helper functions that used to take socket_fd as an int
to explicitly use BorrowedHandle which disables implicit conversion from
int (and hence makes it impossible to mistakenly pass in the channel ID).

Bug: 37082296
Test: `m -j32` succeeds for sailfish-eng
      Ran libpdx_uds_tests on the device -> all pass
      Device boots and CubeSea and VrHome render correctly with vr_flinger

Change-Id: Ibb8dfee4d6c3f4b6120c0b6e20a253f1b9307c19

7 years agoMerge "vndservicemanager: use separate SELinux class." into oc-dev
Martijn Coenen [Thu, 6 Apr 2017 22:20:10 +0000 (22:20 +0000)]
Merge "vndservicemanager: use separate SELinux class." into oc-dev
am: 8385d60c69

Change-Id: Iccac8bab23f6f2ad081d2661e68dc5b81cbb294f

7 years agoMerge "vndservicemanager: use separate SELinux class." into oc-dev
TreeHugger Robot [Thu, 6 Apr 2017 22:06:36 +0000 (22:06 +0000)]
Merge "vndservicemanager: use separate SELinux class." into oc-dev

7 years agoMerge changes I2f531131,Ibaaca2a1,Ib0cba4c7,I5ea748b8,I046e3f07, ... into oc-dev
Dan Stoza [Thu, 6 Apr 2017 21:59:55 +0000 (21:59 +0000)]
Merge changes I2f531131,Ibaaca2a1,Ib0cba4c7,I5ea748b8,I046e3f07, ... into oc-dev
am: 42b5469646

Change-Id: Ifc5e39570cbe69eb26820ba8abc482fbe5744306

7 years agoRestore selinux labels for secondary dex oat directory
Calin Juravle [Wed, 5 Apr 2017 03:22:50 +0000 (20:22 -0700)]
Restore selinux labels for secondary dex oat directory

Bug: 36896515
Test: adb shell cmd package compile -r bg-dexopt --secondary-dex com.google.android.gms
      adb shell ls
/data/user_de/0/com.google.android.gms/app_chimera/m/0000000c/oat/arm64/
-Z
      youtube loads gms modules without extracting from apk

Change-Id: I4e12a6f532a1442a840e3ed8d01b98dd9a328eb6

7 years agoMerge changes I2f531131,Ibaaca2a1,Ib0cba4c7,I5ea748b8,I046e3f07, ... into oc-dev
TreeHugger Robot [Thu, 6 Apr 2017 21:51:17 +0000 (21:51 +0000)]
Merge changes I2f531131,Ibaaca2a1,Ib0cba4c7,I5ea748b8,I046e3f07, ... into oc-dev

* changes:
  libgui: Make IDisplayEventConn... a SafeInterface
  libgui: Remove RefBase from BitTube
  libgui: Make BitTube Parcelable and use unique_fd
  libgui: Format BitTube and move into gui namespace
  libgui: Move BitTube out of system include dir
  libgui: Normalize IDisplayEventConnection methods
  libgui: Format IDisplayEventConnection

7 years agovrwm: Handle intents launched by the VR app
Albert Chaulk [Thu, 6 Apr 2017 20:36:29 +0000 (16:36 -0400)]
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