If we went through the update loop multiple times, and had finished
animating the first time, we would blow away that information the
second time and never kill the animation.
Also moved killing the animation back up to the animation step --
this involves destroying surfaces and such, and so really should
be done as part of the surface transaction. We can also consider
the screen rotation animation object to be owned by the animation,
so it can destroy it when done.
Change-Id: If24356c509c66d046f2ddfd9ad5bfe12504d7716
Use the caching permission check for dump to save IPC.
Cache getpid() to save kernel call for other permission checks.
The C runtime library getpid() can't cache due to a fork
race condition, but we know that mediaserver doesn't fork.
Don't construct String16 on the stack.
Change-Id: I6be6161dae5155d39ba6ed6228e7683e67be34ed
To support this feature, the input dispatcher now allows input
events to be acknowledged out-of-order. As a result, the
consumer can choose to defer handling an input event from one
device (because it is building a big batch) while continuing
to handle input events from other devices.
The InputEventReceiver now sends a notification when a batch
is pending. The ViewRoot handles this notification by scheduling
a draw on the next sync. When the draw happens, the InputEventReceiver
is instructed to consume all pending batched input events, the
input event queue is fully processed (as much as possible),
and then the ViewRoot performs traversals as usual.
With these changes in place, the input dispatch latency is
consistently less than one frame as long as the application itself
isn't stalled. Input events are delivered to the application
as soon as possible and are handled as soon as possible. In practice,
it is no longer possible for an application to build up a huge
backlog of touch events.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I42c01117eca78f12d66d49a736c1c122346ccd1d
Minor tweak to the dispatcher to handle as many finished signals
in a receive callback as possible instead of going back to
the Looper and waiting for the next poll() to hit the callback
again.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I8471107371693e21ce8ce7cca1e8d79ba4ca2351
This change enables the input dispatcher to send multiple touch
events to an application without waiting for them to be acknowledged.
Essentially this is a variation on the old streaming optimization
but it is much more comprehensive. Event dispatch will stall as
soon as 0.5sec of unacknowledged events are accumulated or a
focused event (such as a key event) needs to be delivered.
Streaming input events makes a tremendous difference in application
performance. The next step will be to enable batching of input
events on the client side once again.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I025df90c06165d719fcca7f63eed322a5cce4a78
The information gathered here will no longer be valid once we
start dispatching multiple events at a time to the same connection.
Moreover, we are more concerned with end-to-end latency, which we
can measure with sufficiently high accuracy in other ways.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I49a0c9876b64af56b40e96e0d98c45f325da2a73
The dispatcher no longer needs to track which connections are
active except perhaps for diagnostic purposes, so we might as well
remove this code.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: Ibadc830b7b792a59b9244d0a6e85f320c4947109
Since we no longer stream events to the application, we don't need to
keep the current list of input targets around longer than it takes
to begin the dispatch cycle.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I5824b04e564c8a4dec991598292441e46c331905
Since we will not longer be modifying events in place, we don't need
to use an ashmem region for input. Simplified the code to instead
use a socket of type SOCK_SEQPACKET.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: I05909075ed8b61b93900913e44c6db84857340d8
Don't worry, these features will be moving to a different part of
the pipeline. We're just getting them out of the way for now so
we can make deeper changes to how the input dispatcher works.
This is part of a series of changes to improve input system pipelining.
Bug: 5963420
Change-Id: If97de923c8165776882eef23f5204cc448dad0fc
Inline AudioFlinger::initCheck and remove unnecessary lock.
Remove redundant check of mAudioHwDevs.size().
No need to lock mHardwareLock for each device separately
during initialization.
Use size_t not int to loop through Vector, since size() returns size_t.
Add missing hardware lock for get_mic_mute() and get_input_buffer_size().
Add comments.
Change-Id: Iafae78ef78bbf65f703d99fcc27c2f4ff221aedc
* changes:
EthernetDataTracker: Don't run DHCP or set network available until link is up
Only send master volume or mute updates if the settings have changed
Make AudioManager.adjustMasterVolume public and hidden
Allow disabling network stats support in a resource overlay
Restore persisted master volume if the media server restarts
Don't allow changing master volume when muted
Show the flags in package manager debugging.
Modified the constructor of EndpointBase
Add a getEndpointInfo accessor to AIDL-generated RPC proxy classes
Defer persisting master data to avoid excessive database writes
Add an option that disables the AUDIO_BECOMING_NOISY intent send when a headset is hotplugged.
Remove reference counting and client death notification for master mute
AudioService: Send broadcasts when master volume and mute state change
Use the new get/putFlattenable methods on RpcData.
Don't try to unmarshal void return types when there are out parameters being returned.
AudioManager: Add wrapper methods for master volume support
AudioManager: Add support for master mute
NetworkTimeUpdateService: Schedule NTP on ethernet connect as well as wifi
For events, require that the parameters be marked in.
PhoneWindowManager: stifle warning that ITelephony service does not exist
AudioManager: transparently convert volume settings for other streams to master volume if config_useMasterVolume is set.
Support putting Flattenables in Lists.
Was generating code that uses the wrong RpcData.
store the hw addr in the extraInfo field of ethernet NetworkInfos
We can remove mExiting and use Thread::exitPending() instead.
The local sp<> on "this" in exit() is not needed, since the caller must
also hold an sp<> in order to be calling us. (Unless it was using a raw
pointer, but that would be dangerous for other reasons.)
Add comment explaining the mLock in exit().
Change-Id: I319e5107533a1a7cdbd13c292685f3e2be60f6c4