OSDN Git Service

android-x86/frameworks-native.git
9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Tue, 9 Jun 2015 08:03:13 +0000 (01:03 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoMerge "media: change parameters for OMX_EventOutputRendered" into mnc-dev
Lajos Molnar [Tue, 9 Jun 2015 00:04:17 +0000 (00:04 +0000)]
Merge "media: change parameters for OMX_EventOutputRendered" into mnc-dev

9 years agoDon't corrupt parcel when writeFileDescriptor() fails
Christopher Tate [Thu, 4 Jun 2015 01:44:15 +0000 (18:44 -0700)]
Don't corrupt parcel when writeFileDescriptor() fails

We now check for fd-legality before committing binder objects to
the flattened data buffer rather than after.  Previously we would
wind up corrupting the parcel and incurring driver-level errors,
as well as potentially leaking FDs.

Bug 21428802

Change-Id: Ice0d641b3dcc41fb1b8c68ce2e2ebd744c2863a1

9 years agolibgui/SurfaceFlinger: Add getConsumerName
Dan Stoza [Mon, 8 Jun 2015 16:32:50 +0000 (09:32 -0700)]
libgui/SurfaceFlinger: Add getConsumerName

Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is update on connect
and dequeueBuffer, which should be good enough for most uses.

Bug: 6667401
Change-Id: I22c7881d778e495cf8276de7bbcd769e52429915

9 years agoMerge "Revert "libgui: Add getConsumerName"" into mnc-dev
Dan Stoza [Mon, 8 Jun 2015 16:30:14 +0000 (16:30 +0000)]
Merge "Revert "libgui: Add getConsumerName"" into mnc-dev

9 years agoRevert "libgui: Add getConsumerName"
Dan Stoza [Mon, 8 Jun 2015 16:30:08 +0000 (16:30 +0000)]
Revert "libgui: Add getConsumerName"

This reverts commit 107fbe5599016b0e35145a1a00c4f238b63d61e4.

Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744

9 years agoMerge "libgui: Add getConsumerName" into mnc-dev
Dan Stoza [Mon, 8 Jun 2015 16:21:03 +0000 (16:21 +0000)]
Merge "libgui: Add getConsumerName" into mnc-dev

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Sat, 6 Jun 2015 08:03:39 +0000 (01:03 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agomedia: change parameters for OMX_EventOutputRendered
Lajos Molnar [Sat, 6 Jun 2015 00:49:25 +0000 (17:49 -0700)]
media: change parameters for OMX_EventOutputRendered

This allows batching of rendered events.

Bug: 20503131
Change-Id: I3b319317c0434eb225198f8c4bf716edf68079a2

9 years agoEnable more flexible usage of blobs in parcels.
Jeff Brown [Wed, 12 Nov 2014 00:44:25 +0000 (16:44 -0800)]
Enable more flexible usage of blobs in parcels.

Add functions to allow a client to take over the ashmem region
that was transferred so that it can claim it for its own and
reuse it.

Add support for mutable ashmem regions too.

Bug: 21428802
Change-Id: I16eca338cdb99b07d81fc43573d53ce86dbc60c8

9 years agolibgui: Add getConsumerName
Dan Stoza [Fri, 5 Jun 2015 22:01:58 +0000 (15:01 -0700)]
libgui: Add getConsumerName

Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is updated on connect
and dequeueBuffer, which should be good enough for most uses.

Bug: 6667401
Change-Id: Ife94bd89023fe7c00bad916932b9a19233fd2290

9 years agoMerge "libgui: Add generation numbers to BufferQueue" into mnc-dev
Dan Stoza [Fri, 5 Jun 2015 15:38:34 +0000 (15:38 +0000)]
Merge "libgui: Add generation numbers to BufferQueue" into mnc-dev

9 years agoSF: Don't crop surface damage against viewport
Dan Stoza [Fri, 5 Jun 2015 02:40:03 +0000 (19:40 -0700)]
SF: Don't crop surface damage against viewport

Apply the display transform to surface damage, but don't intersect it
with the viewport.

Bug: 21486007
Change-Id: I94e697cea52096a960385d5f3b89609fdcf30a02

9 years agoDO NOT MERGE Remove unused ParcelFileDescriptor methods in parcel.
Tim Kilbourn [Wed, 3 Jun 2015 18:25:56 +0000 (11:25 -0700)]
DO NOT MERGE Remove unused ParcelFileDescriptor methods in parcel.

Attempts to replicate Java parceling in native code is fraught with
peril.

Change-Id: I4359036c5dddd1b886d886beef1d060523e53e5f
(cherry picked from commit f47a381001d4d4ce66c2e35aac5b96a26acc0730)

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Thu, 4 Jun 2015 08:02:46 +0000 (01:02 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoCall selinux_status_open() prior to use of selinux_status_updated().
Stephen Smalley [Wed, 3 Jun 2015 13:25:37 +0000 (09:25 -0400)]
Call selinux_status_open() prior to use of selinux_status_updated().

The selinux_status_*() interfaces require calling selinux_status_open()
first.  Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

(cherrypicked from commit bea0746b241d15626cf0a56828efc1d4640dbda7)

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
9 years agolibgui: Add generation numbers to BufferQueue
Dan Stoza [Tue, 2 Jun 2015 22:45:22 +0000 (15:45 -0700)]
libgui: Add generation numbers to BufferQueue

This change allows producers to set a generation number on a
BufferQueue. This number will be embedded in any new GraphicBuffers
created in that BufferQueue, and attempts to attach buffers which have
a different generation number will fail.

It also plumbs the setGenerationNumber method through Surface, with the
additional effect that any buffers attached to the Surface after
setting a new generation number will automatically be updated with the
new number (as opposed to failing, as would happen on through IGBP).

Bug: 20923096
Change-Id: I32bf726b035f99c3e5834beaf76afb9f01adcbc2

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Wed, 3 Jun 2015 08:02:36 +0000 (01:02 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agomedia: rename VideoGrallocMetadata.hHandle to pHandle
Lajos Molnar [Wed, 3 Jun 2015 02:43:16 +0000 (19:43 -0700)]
media: rename VideoGrallocMetadata.hHandle to pHandle

This is so that it can be equivalent to the previously named
VideoDecoderOutputMetaData struct.

Bug: 13222807

Change-Id: I9463694f65436a7edb1f6b592efc0a6329232a27

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Tue, 2 Jun 2015 08:02:20 +0000 (01:02 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agofix build: media: add back legacy name for VideoGrallocMetadata
Lajos Molnar [Tue, 2 Jun 2015 04:13:47 +0000 (21:13 -0700)]
fix build: media: add back legacy name for VideoGrallocMetadata

Change-Id: Ie101eb355887072b2ab92f489b86115a40952bd1

9 years agoMerge "media: refine kMetadataBufferTypes" into mnc-dev
Lajos Molnar [Tue, 2 Jun 2015 03:32:00 +0000 (03:32 +0000)]
Merge "media: refine kMetadataBufferTypes" into mnc-dev

9 years agoMerge "Track camera and flashlight usage in battery stats." into mnc-dev
Ruben Brunk [Tue, 2 Jun 2015 01:48:21 +0000 (01:48 +0000)]
Merge "Track camera and flashlight usage in battery stats." into mnc-dev

9 years agoMerge "Disregard alleged binder entities beyond parcel bounds" into mnc-dev
Christopher Tate [Tue, 2 Jun 2015 01:05:46 +0000 (01:05 +0000)]
Merge "Disregard alleged binder entities beyond parcel bounds" into mnc-dev

9 years agoTrack camera and flashlight usage in battery stats.
Ruben Brunk [Wed, 27 May 2015 00:30:11 +0000 (17:30 -0700)]
Track camera and flashlight usage in battery stats.

Bug: 15986092

Change-Id: I272ec070113a0bfc41c637c45a6e1a2ab346e87b

9 years agolibgui: Propagate error by clearing sp<GB>
Dan Stoza [Mon, 1 Jun 2015 20:59:15 +0000 (13:59 -0700)]
libgui: Propagate error by clearing sp<GB>

Clears the sp<GraphicBuffer> returned by createGraphicBuffer when there
is an error during unflattening.

Bug: 21498231
Change-Id: I886da4474fc06853cc59188d62044b7d7549126b

9 years agoMerge "SF: Reduce resync samples without present" into mnc-dev
Dan Stoza [Mon, 1 Jun 2015 16:30:46 +0000 (16:30 +0000)]
Merge "SF: Reduce resync samples without present" into mnc-dev

9 years agoMerge "libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc" into mnc-dev
Dan Stoza [Mon, 1 Jun 2015 16:30:31 +0000 (16:30 +0000)]
Merge "libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc" into mnc-dev

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Sat, 30 May 2015 08:04:15 +0000 (01:04 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agomedia: refine kMetadataBufferTypes
Lajos Molnar [Sat, 16 May 2015 03:31:57 +0000 (20:31 -0700)]
media: refine kMetadataBufferTypes

- Fix kMetadataBufferTypeANWBuffer, so that it only relies on
system/core structures. This resolves potential linker issues if
the framework changes.
- Add fence to be passed with kMetadataBufferTypeANWBuffer.
- Add utility structures to access the metadata buffer layouts.

Related-bug: 19614055
Bug: 13222807
Bug: 12386081
Change-Id: I608958fd394b08cc3396bcbd5cdd350b87bc66f3

9 years agoFix libgui crop matrix test.
Michael Lentine [Fri, 29 May 2015 23:05:36 +0000 (16:05 -0700)]
Fix libgui crop matrix test.

On devices that have the crop image extension the crop is not applied to the
transform matrix so we have to expect different results in this case.

Change-Id: If62dec1111fb77c9fa2c4332d121665960ce0216

9 years agoSF: Reduce resync samples without present
Dan Stoza [Fri, 29 May 2015 20:00:23 +0000 (13:00 -0700)]
SF: Reduce resync samples without present

Reduces the number of resync samples that DispSync will attempt to
collect without an intervening present from 12 to 4. The former value
was causing excessive power draw for some vendors' implementations, and
reducing it doesn't seem to harm anything.

Bug: 20724456
Change-Id: Ifd6e0490be67756ed001d509a38e8a36953b4618

9 years agolibui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc
Dan Stoza [Fri, 29 May 2015 19:48:04 +0000 (12:48 -0700)]
libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc

Applies GRALLOC_USAGE_ALLOC_MASK to the incoming usage bits before
calling alloc on the gralloc module. This filters out the new flag
GRALLOC_USAGE_FOREIGN_BUFFERS, which is used to send a hint to the
producer, but which does not affect the allocation of buffers.

Bug: 19801661
Change-Id: Ia37a3eddba2e97598e50ac3e10877430adfa9247

9 years agoCheck that width and height parameters are small.
Michael Lentine [Fri, 29 May 2015 00:43:06 +0000 (17:43 -0700)]
Check that width and height parameters are small.

The product of width and height should be less than UINT32_MAX (in practice
smaller). Adding the checks prevents overflows when allocating buffers.

Bug: 20726612
Change-Id: I9769edf0688a9bfe69906d49fa0540cadf4c49b0

9 years agoRevert "Modify EGL to disconnect the window when the surface gets destroyed."
Michael Lentine [Thu, 28 May 2015 23:48:08 +0000 (16:48 -0700)]
Revert "Modify EGL to disconnect the window when the surface gets destroyed."

This reverts commit 00699fa64197cc72a160d69e1f0003cdd43dc136.

9 years agoRevert "Modify EGL to disconnect the window when the surface gets destroyed."
Michael Lentine [Thu, 28 May 2015 23:48:08 +0000 (16:48 -0700)]
Revert "Modify EGL to disconnect the window when the surface gets destroyed."

This reverts commit 00699fa64197cc72a160d69e1f0003cdd43dc136.

9 years agoFix EGL shim extension injection for GL ES 3 drivers.
Alistair Strachan [Fri, 22 May 2015 21:10:09 +0000 (14:10 -0700)]
Fix EGL shim extension injection for GL ES 3 drivers.

The Android EGL shim injects GL_EXT_debug_marker into the ES driver
EXTENSIONS string for the OpenGL ES 1.x and 2.0/3.0/3.1 drivers if
the extension is not already provided. This feature is used by
GLES_trace.

In Open GL ES 3.0 it became possible to query an indexed version of
the EXTENSIONS string via GetStringi(). NUM_EXTENSIONS Gets were
also added to the specification (taken from Open GL).

If the shim does not have to inject the extension, then there is no
problem, as glGetString() and glGetStringi() / NUM_EXTENSIONS will
be consistent. However, if the Android EGL shim injects the
extension, NUM_EXTENSIONS and GetStringi() will report one less
extension than is really available.

Consistency between these methods is tested by the dEQP framework
with the dEQP-GLES3.functional.state_query.string.extensions test.
If the driver does not provide GL_EXT_debug_marker, this test
fails.

This change wraps all of the affected entry points so that the
wrapped driver extensions are never visible directly to dEQP,
eliminating the inconsistency.

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Thu, 28 May 2015 08:03:43 +0000 (01:03 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoDisregard alleged binder entities beyond parcel bounds
Christopher Tate [Thu, 28 May 2015 00:53:02 +0000 (17:53 -0700)]
Disregard alleged binder entities beyond parcel bounds

When appending one parcel's contents to another, ignore binder
objects within the source Parcel that appear to lie beyond the
formal bounds of that Parcel's data buffer.

Bug 17312693

Change-Id: If592a260f3fcd9a56fc160e7feb2c8b44c73f514

9 years agoSF: Skip render-to-texture for color transforms
Dan Stoza [Mon, 20 Oct 2014 22:46:09 +0000 (15:46 -0700)]
SF: Skip render-to-texture for color transforms

In cases where SurfaceFlinger is applying a color matrix (usually for
accessibility features), we previously would perform a render-to-
texture for the initial composition, and then apply the matrix during
a copy to the framebuffer. This changes that behavior to just apply the
matrix during composition without a render-to-texture pass.

This may result in a perceived change of the image in cases with alpha
blending, since the blending is performed at a different stage of the
pipeline and the system effectively performs non-linear blends.
However, neither this nor the prior render-to-texture pass is strictly
correct in that regard, and this approach is less error-prone and
likely faster.

Change-Id: I2110ff0374f61d76df7b087dde8a1ed98990440c

9 years agoMerge "Add hotplug support for primary display." into mnc-dev
Michael Lentine [Wed, 27 May 2015 17:39:55 +0000 (17:39 +0000)]
Merge "Add hotplug support for primary display." into mnc-dev

9 years agolibgui: Fix surface damage on rotated buffers
Dan Stoza [Tue, 26 May 2015 20:22:27 +0000 (13:22 -0700)]
libgui: Fix surface damage on rotated buffers

Flips the width and height when the buffer comes in with a 90 degree
rotation so that performing the Y-flip from GL works correctly.

Bug: 20761426
Change-Id: I41c9edc8549c6cbdb534277b996ff20c59034582

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Sat, 23 May 2015 08:04:14 +0000 (01:04 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoMerge "Fix surfaceflinger tests." into mnc-dev
Michael Lentine [Fri, 22 May 2015 20:16:10 +0000 (20:16 +0000)]
Merge "Fix surfaceflinger tests." into mnc-dev

9 years agoMerge "Fix libgui tests." into mnc-dev
Michael Lentine [Fri, 22 May 2015 20:16:01 +0000 (20:16 +0000)]
Merge "Fix libgui tests." into mnc-dev

9 years agoAdd hotplug support for primary display.
Michael Lentine [Wed, 13 May 2015 01:04:26 +0000 (18:04 -0700)]
Add hotplug support for primary display.

When the primary is connected/disconnected on tv devices HWComposer updates
it's display parameters but doesn't destroy or recreate the display.

Bug: 18698244

Change-Id: I759c8f75d3e3a7462b85eb51973fb5072b71a702

9 years agoFix surfaceflinger tests.
Michael Lentine [Thu, 21 May 2015 20:48:24 +0000 (13:48 -0700)]
Fix surfaceflinger tests.

Update the screenshot code and add correct return values to surface flinger's
capturescreenshot function.

Buf: 18138368

Change-Id: Ieb42d289088589f941502fbd69da7aa939265e07

9 years agoFix libgui tests.
Michael Lentine [Tue, 19 May 2015 22:23:43 +0000 (15:23 -0700)]
Fix libgui tests.

Update IGraphicsBufferProducerTest to the new maximum enum value which is now
NATIVE_WINDOW_BUFFER_AGE. Update SurfaceTextureGLToGL_test to use the correct
counts for GraphicsBuffer refs.

Buf: 18138368

Change-Id: Ie2f7e00b414d63100b16944e3ab36b1ffceecd57

9 years agoMerge "fix BufferItem flatten/unflatten alignment" into mnc-dev
Chong Zhang [Fri, 22 May 2015 19:04:05 +0000 (19:04 +0000)]
Merge "fix BufferItem flatten/unflatten alignment" into mnc-dev

9 years agofix BufferItem flatten/unflatten alignment
Chong Zhang [Fri, 22 May 2015 17:54:25 +0000 (10:54 -0700)]
fix BufferItem flatten/unflatten alignment

bug: 21370100
Change-Id: Ia3991dc591c176bdbd1d78d1804aa22777525b62

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Tue, 19 May 2015 08:02:56 +0000 (01:02 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoMerge "Adding round qualifier constant to native API." into mnc-dev
Adam Powell [Mon, 18 May 2015 21:30:15 +0000 (21:30 +0000)]
Merge "Adding round qualifier constant to native API." into mnc-dev

9 years agoMerge "Refactor ConsumerBase and it's derived classes." into mnc-dev
Michael Lentine [Mon, 18 May 2015 21:29:39 +0000 (21:29 +0000)]
Merge "Refactor ConsumerBase and it's derived classes." into mnc-dev

9 years agoRefactor ConsumerBase and it's derived classes.
Michael Lentine [Mon, 18 May 2015 20:41:23 +0000 (13:41 -0700)]
Refactor ConsumerBase and it's derived classes.

Move setDefaultBufferSize, setDefaultBufferFormat, and
setDefaultBufferDataSpace into ConsumerBase and remove them from
CpuConsumer and BufferItemConsumer.

Bug: 19977701

Change-Id: Ic68992464c5da6da7a41c4063a53029a69efcd1b

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Sat, 16 May 2015 08:02:21 +0000 (01:02 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoDon't use TEMP_FAILURE_RETRY on close in frameworks/native.
Elliott Hughes [Sat, 16 May 2015 00:05:40 +0000 (17:05 -0700)]
Don't use TEMP_FAILURE_RETRY on close in frameworks/native.

Bug: http://b/20501816
Change-Id: Id13a62f02243c6c4831e2f47944dc34fa822f5b6
(cherry picked from commit 997abb668b9248c2174c6cf169a0b7c6a02fd2cb)

9 years agoAdding round qualifier constant to native API.
Adam Lesinski [Thu, 14 May 2015 21:28:32 +0000 (14:28 -0700)]
Adding round qualifier constant to native API.

Change-Id: I43e6c029412d0ed1d345c16fdce90e2879c52a8e

9 years agoFix async_stop
John Reck [Fri, 15 May 2015 17:00:34 +0000 (10:00 -0700)]
Fix async_stop

Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41

9 years agoMerge "Add ConsumerBase::isAbandoned" into mnc-dev
John Reck [Thu, 14 May 2015 23:27:45 +0000 (23:27 +0000)]
Merge "Add ConsumerBase::isAbandoned" into mnc-dev

9 years agoAdd ConsumerBase::isAbandoned
John Reck [Thu, 14 May 2015 22:55:11 +0000 (15:55 -0700)]
Add ConsumerBase::isAbandoned

Bug: 20105644
Change-Id: I21526b5397ea51a15500c44a99daa9d75fc4ea67

9 years agoMerge "SurfaceFlinger: Handle EGL errors more cleanly" into mnc-dev
Dan Stoza [Thu, 14 May 2015 17:42:20 +0000 (17:42 +0000)]
Merge "SurfaceFlinger: Handle EGL errors more cleanly" into mnc-dev

9 years agoSurfaceFlinger: Handle EGL errors more cleanly
Dan Stoza [Thu, 14 May 2015 16:27:25 +0000 (09:27 -0700)]
SurfaceFlinger: Handle EGL errors more cleanly

Adds some more safety checking for cases where we get an error while
trying to create the EGLImage. The checking puts the Layer into a
failed state after detecting an error, since the shadow queue may no
longer be synchronized.

Bug: 20957332
Change-Id: I68b4c40eab3e58731b875ed5752f2c7d17f14bcb

9 years agoMerge "Modify EGL to disconnect the window when the surface gets destroyed." into...
Michael Lentine [Thu, 14 May 2015 16:39:27 +0000 (16:39 +0000)]
Merge "Modify EGL to disconnect the window when the surface gets destroyed." into mnc-dev

9 years agoMerge changes from topic 'button_actions' into mnc-dev
Michael Wright [Thu, 14 May 2015 15:31:10 +0000 (15:31 +0000)]
Merge changes from topic 'button_actions' into mnc-dev

* changes:
  Fix input tests to work with new MotionEvent member
  Revert "Revert "Add new MotionEvent actions for button press and release.""

9 years agoFix input tests to work with new MotionEvent member
Michael Wright [Thu, 14 May 2015 15:29:13 +0000 (16:29 +0100)]
Fix input tests to work with new MotionEvent member

Change-Id: I0dde0f91f693903f26edc116b5dbcbf33bac2b93

9 years agoRevert "Revert "Add new MotionEvent actions for button press and release.""
Michael Wright [Thu, 14 May 2015 13:48:03 +0000 (14:48 +0100)]
Revert "Revert "Add new MotionEvent actions for button press and release.""

This reverts commit 70b41ef580644fd0fe6fa9b8ac7e4a745cfb6db3.

9 years agoMerge "Revert "Add new MotionEvent actions for button press and release."" into mnc-dev
Michael Wright [Thu, 14 May 2015 13:47:07 +0000 (13:47 +0000)]
Merge "Revert "Add new MotionEvent actions for button press and release."" into mnc-dev

9 years agoRevert "Add new MotionEvent actions for button press and release."
Michael Wright [Thu, 14 May 2015 13:46:17 +0000 (14:46 +0100)]
Revert "Add new MotionEvent actions for button press and release."

This reverts commit 48a8a0e4322969e1551536d6183af3a1faa2240b.

9 years agoMerge "Add new MotionEvent actions for button press and release." into mnc-dev
Michael Wright [Thu, 14 May 2015 13:31:24 +0000 (13:31 +0000)]
Merge "Add new MotionEvent actions for button press and release." into mnc-dev

9 years agoAdd new MotionEvent actions for button press and release.
Michael Wright [Mon, 11 May 2015 18:52:27 +0000 (19:52 +0100)]
Add new MotionEvent actions for button press and release.

Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to
signal a button press or release. If these actions happen
simulanteously with a DOWN or UP event then they're explicitly
ordered to happen after the DOWN or preceding the UP in order to send
them to the most recently targeted view.

Also, introduce new stylus button constants that differ from the
constants we use for mouse buttons.

Bug: 20704355
Change-Id: Ib960a5004db5429ad2fc8db020704773e2978327

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Thu, 14 May 2015 08:02:45 +0000 (01:02 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoModify EGL to disconnect the window when the surface gets destroyed.
Michael Lentine [Wed, 23 Jul 2014 17:19:41 +0000 (10:19 -0700)]
Modify EGL to disconnect the window when the surface gets destroyed.

Bug: 14445579

Change-Id: I1d263ff6cffcb6e448761fca7ca4b06466ad65aa

9 years agoMerge "Switch libGLESv1_CM/libGLESv2 to hash-style=both" into mnc-dev
Dmitriy Ivanov [Wed, 13 May 2015 22:11:17 +0000 (22:11 +0000)]
Merge "Switch libGLESv1_CM/libGLESv2 to hash-style=both" into mnc-dev

9 years agoSwitch libGLESv1_CM/libGLESv2 to hash-style=both
Dmitriy Ivanov [Wed, 13 May 2015 22:05:07 +0000 (15:05 -0700)]
Switch libGLESv1_CM/libGLESv2 to hash-style=both

  Old version of unity uses custom linker to link
  itself and libmono. The custom linker does not
  support lookups with gnu-hash style. Switching
  libraries needed by libunity.so to --hash-style=both
  fixes this problem.

Bug: http://b/20093774
Change-Id: I2a4887cf7a5ee80a8976ecaad54b52dc62518e55

9 years agoMerge "Replace JNI primitive array critical calls with non-critical ones." into mnc-dev
Hiroshi Yamauchi [Wed, 13 May 2015 18:37:56 +0000 (18:37 +0000)]
Merge "Replace JNI primitive array critical calls with non-critical ones." into mnc-dev

9 years agoMerge "Use previous pressure value if the current fusion data is zero." into mnc-dev
Michael Wright [Wed, 13 May 2015 16:56:05 +0000 (16:56 +0000)]
Merge "Use previous pressure value if the current fusion data is zero." into mnc-dev

9 years agoMerge "Synthesize events for pressure and button changes." into mnc-dev
Michael Wright [Wed, 13 May 2015 16:55:47 +0000 (16:55 +0000)]
Merge "Synthesize events for pressure and button changes." into mnc-dev

9 years agoMerge "Fix PTS handling for buffer replacement" into mnc-dev
Dan Stoza [Wed, 13 May 2015 16:34:05 +0000 (16:34 +0000)]
Merge "Fix PTS handling for buffer replacement" into mnc-dev

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Wed, 13 May 2015 08:02:59 +0000 (01:02 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoMerge "Verify that the native handle was created" into mnc-dev
Adam Lesinski [Wed, 13 May 2015 03:38:35 +0000 (03:38 +0000)]
Merge "Verify that the native handle was created" into mnc-dev

9 years agoVerify that the native handle was created
Adam Lesinski [Wed, 13 May 2015 00:35:48 +0000 (17:35 -0700)]
Verify that the native handle was created

The inputs to native_handle_create can cause an overflowed allocation,
so check the return value of native_handle_create before accessing
the memory it returns.

Bug:19334482
Change-Id: I1f489382776c2a1390793a79dc27ea17baa9b2a2

9 years agoMerge "libgui: Always allow allocation on connect" into mnc-dev
Dan Stoza [Tue, 12 May 2015 21:57:27 +0000 (21:57 +0000)]
Merge "libgui: Always allow allocation on connect" into mnc-dev

9 years agolibgui: Always allow allocation on connect
Dan Stoza [Tue, 12 May 2015 21:55:15 +0000 (14:55 -0700)]
libgui: Always allow allocation on connect

This change places BufferQueue into a predictable state where
allocation is allowed whenever a producer connects. This allows clients
to disconnect and reconnect without having to worry about being locked
out of allocation.

Bug: 20554276
Change-Id: Ic0f920a3d4204f2cafdfa69e46f3bb4204571d7e

9 years agoReplace JNI primitive array critical calls with non-critical ones.
Hiroshi Yamauchi [Sat, 9 May 2015 00:54:55 +0000 (17:54 -0700)]
Replace JNI primitive array critical calls with non-critical ones.

The glgen part.

Bug: 19235243
Change-Id: I69dfa84f15366808b964517c1ba270ddeb3c5940

9 years agoFix PTS handling for buffer replacement
Dan Stoza [Tue, 12 May 2015 19:56:16 +0000 (12:56 -0700)]
Fix PTS handling for buffer replacement

This changes the way that SurfaceFlinger's shadow buffer management
works such that instead of tracking the size of the shadow queue in the
BufferQueue, SF tracks the last frame number it has seen, and passes
that into the acquireBuffer call. BufferQueueConsumer then ensures that
it never returns a buffer newer than that frame number, even if that
means that it must return PRESENT_LATER for an otherwise valid buffer.

Change-Id: I3fcb45f683ed660c3f18a8b85ae1f8a962ba6f0e

9 years agoMerge "Improve logging in SensorService dump output." into mnc-dev
Aravind Akella [Tue, 12 May 2015 19:12:42 +0000 (19:12 +0000)]
Merge "Improve logging in SensorService dump output." into mnc-dev

9 years agoImprove logging in SensorService dump output.
Aravind Akella [Thu, 7 May 2015 19:40:52 +0000 (12:40 -0700)]
Improve logging in SensorService dump output.

Maintain a per sensor circular buffer of last 10 sensor_events and the wall clock time
at which each event is received.

Change-Id: Ia50c825ab5a7aaf0932ce7dce7ac8b9be7071e77

9 years agoMerge "libEGL: whitelist the EGL_KHR_create_context_no_error extension" into mnc-dev
Jesse Hall [Tue, 12 May 2015 17:31:23 +0000 (17:31 +0000)]
Merge "libEGL: whitelist the EGL_KHR_create_context_no_error extension" into mnc-dev

9 years agolibEGL: whitelist the EGL_KHR_create_context_no_error extension
Jesse Hall [Fri, 24 Apr 2015 08:40:42 +0000 (01:40 -0700)]
libEGL: whitelist the EGL_KHR_create_context_no_error extension

Allow EGL implementations to expose the
EGL_KHR_create_context_no_error extension if they wish.

https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_create_context_no_error.txt

Change-Id: I3290ccc2a69a1fa0b00ec3f1aa4f876906c64bfb

9 years agoUse previous pressure value if the current fusion data is zero.
Michael Wright [Thu, 23 Apr 2015 16:39:53 +0000 (17:39 +0100)]
Use previous pressure value if the current fusion data is zero.

Occasionally we'll receive the stylus up signal (pressure = 0) before
we receive the touch screen up signal. Rather than giving pointer a
pressure value of 0 (which is one of the signals of hovering) or
falling back to the touchscreen pressure values (which would make for
an inconsistent stream), use the previous pressure value which should
always be non-zero for a stream of fused data.

Bug: 20449776
Change-Id: I71eb97e7c4ea53e42b0eb54fc1f8ae7f89aad9d1

9 years agoSynthesize events for pressure and button changes.
Michael Wright [Tue, 21 Apr 2015 18:02:58 +0000 (19:02 +0100)]
Synthesize events for pressure and button changes.

Even when there isn't movement on the touchscreen we should produce
events for pressure and button state changes generated by external
stylii.

Change-Id: I9fd7ba85902d5d6bfb28d5e5ff5d8f340a94c2bf

9 years agolibgui: Hook up onFrameReplaced
Dan Stoza [Mon, 11 May 2015 22:33:01 +0000 (15:33 -0700)]
libgui: Hook up onFrameReplaced

This completes the plumbing from ConsumerListener::onFrameReplaced into
SurfaceFlinger (and other consumers that may care).

Change-Id: I376e78ace95d6748e8662e6b4d47c0dfa697a300

9 years agomerge in mnc-release history after reset to mnc-dev
The Android Automerger [Sat, 9 May 2015 08:02:46 +0000 (01:02 -0700)]
merge in mnc-release history after reset to mnc-dev

9 years agoMerge "Fix the arguments to memcpy." into mnc-dev
Aravind Akella [Sat, 9 May 2015 00:17:40 +0000 (00:17 +0000)]
Merge "Fix the arguments to memcpy." into mnc-dev

9 years agoFix the arguments to memcpy.
Aravind Akella [Fri, 8 May 2015 22:59:23 +0000 (15:59 -0700)]
Fix the arguments to memcpy.

Change-Id: Ieaee26f46f43a9d412537047566178985370198b

9 years agoMerge "SF: Apply pending transactions to new sidebands" into mnc-dev
Dan Stoza [Fri, 8 May 2015 16:32:26 +0000 (16:32 +0000)]
Merge "SF: Apply pending transactions to new sidebands" into mnc-dev

9 years agoMerge "surfaceflinger: Fix range check for getFormat" into mnc-dev
Pat Tjin [Thu, 7 May 2015 20:57:48 +0000 (20:57 +0000)]
Merge "surfaceflinger: Fix range check for getFormat" into mnc-dev

9 years agoFix broken NDK sensor manager API.
Svet Ganov [Thu, 7 May 2015 17:50:59 +0000 (10:50 -0700)]
Fix broken NDK sensor manager API.

Change-Id: I21bb8b0dcfd3f1c812753a9fd77dea792e7155f2

9 years agosurfaceflinger: Fix range check for getFormat
Ajay Dudani [Sun, 3 May 2015 18:44:55 +0000 (11:44 -0700)]
surfaceflinger: Fix range check for getFormat

Fix potential buffer overflow error in getFormat with indices
greater than MAX_HWC_DISPLAYS.

Change-Id: I5e5b69d8d043e900f5e33ca9a62e94ae5f857b68

9 years agoFix broken NDK sensor manager API.
Svet Ganov [Thu, 7 May 2015 17:50:59 +0000 (10:50 -0700)]
Fix broken NDK sensor manager API.

Change-Id: I21bb8b0dcfd3f1c812753a9fd77dea792e7155f2