libutils is being moved from frameworks/native/ to system/core/ in order
to facilitate native C++ platform (non-frameworks) code.
Change-Id: I44089fb960591a40b8a9c30faabb10459d107d71
Fallout from the Flattenable change, update all its uses.
Additionnaly, fix/tighten size checks when (un)flatten()ing
things.
Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)
The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).
Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
Making an object Flattenable doesn't force it to
become virtual anymore. For instance, Fence and GraphicBuffer
are now non-virtual classes.
Also change Flatennable protocol a bit so that it updates
its parameters (pointers, sizes) to make it easier
to implement a flattenable in terms of other flattenables.
Change-Id: Ie81dc7637180b3c2cfcbaf644f8987ca804eb891
A recent change to screencapture to have the call to
IGraphicBufferProducer happen on the incoming binder
thread didn't set the result so the result was always
returned as NO_ERROR.
This made screencap fail on some devices (e.g. Wolfie)
which relies on some kind of fallback mechanism to
generate the screencap but the fallback mechanism
doesn't get triggered because the error isn't returned.
Bug: 9989385
Change-Id: I2aee91ea1034869fcbb0f49b9a0087c3cff43bbe
Signed-off-by: Mike J. Chen <mjchen@google.com>
IBatteryPropertiesListener is used by clients such as BatteryService to
receive notifications of changed battery/power status (from healthd).
IBatteryPropertiesRegistrar manages registrations of
IBatteryPropertiesListener clients.
Add BatteryService native header with defines from BatteryManager, and
class BatteryProperties to pass battery/power status around.
Change-Id: I44e2736e503b586794097b7b9d31d07fefd9b15a
BufferQueue::dequeueBuffer() could incorrectly return
WOULD_BLOCK while in "cannot block" mode if it happened
while a consumer acquired the last allowed buffer
before releasing the old one (which is a valid thing
to do).
Change-Id: I318e5408871ba85e068ea9ef4dc9b578f1bb1043
libbinder is only built for the target, where bionic will provide
uio, so it does not need to include the libcutils wrapper around
uio for windows.
Change-Id: Ifc2dd353bf7ed51bf08ec0ae91c43b12830f94ba
* changes:
make sure to reset the framenumber when a buffer is marked FREE
Make ANW.setSwapInterval(0) work again
BuffferQueue disconnect is now always asynchrnous
BufferQueue improvements and APIs changes
we can now queue/dequeue a buffer in asynchrnous mode by using the
async parameter to these calls. async mode is only specified
with those calls (it is not modal anymore).
as a consequence it can only be specified when the buffer count
is not overidden, as error is returned otherwise.
Change-Id: Ic63f4f96f671cb9d65c4cecbcc192615e09a8b6b
we tag queued buffers with the "bufferqueue cannot block" flag
and use that bit to discard a buffer in the queue by new ones
comming in. this allows us to remove the buffer queue drain in
disconnect while maintaining the right behaviour if it gets
connected again (since each buffer remembers how it was enqueued).
Change-Id: I1e703d363a687b70b19ba49cef32213116e8bd3f
this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:
- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
those flags are used to put the BufferQueue in a mode where it
will never block if both flags are set. This is achieved by:
- returning an error from dequeueBuffer() if it would block
- making sure a buffer is always available by replacing
the previous buffer with the new one in queueBuffer()
(note: this is similar to what asynchrnous mode used to be)
Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.
Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d