Commit Graph

43563 Commits

Author SHA1 Message Date
Jeff Brown
0a63adaff2 Enable deferred input messages to be batched.
This is part of a series of changes to improve input system pipelining.

Bug: 5963420
Change-Id: I6874d2128e880a35c6c33890c858cc6ee22af0fd
2012-02-13 12:44:01 -08:00
Jeff Brown
f0490c94d0 Implement batching of input events on the consumer side.
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
2012-02-13 10:28:41 -08:00
Jeff Brown
cd50850d48 Dispatch multiple touch events in parallel.
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
2012-02-13 10:28:41 -08:00
Jeff Brown
6cdee9831d Rewrite input transport using sockets.
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
2012-02-13 10:28:40 -08:00
Jeff Brown
dea7c0d26e Merge "Process input events immediately when received." 2012-02-13 10:26:40 -08:00
Jeff Brown
2089ea94fd Merge "Remove the input dispatcher throttle." 2012-02-13 10:26:33 -08:00
Marc Blank
3d7af491ce Merge "Use ' for apostrophe in HTML encoding" 2012-02-13 10:20:38 -08:00
Mike Lockwood
fbaf70abed Merge "Add support for non-linear ramping of master volume adjustment" 2012-02-10 21:55:52 -08:00
James Dong
4d35d9d343 Merge "Change the signature of method addTextSource() in AwesomePlayer" 2012-02-10 17:57:16 -08:00
Wink Saville
67932654e0 am 5caed1d9: am f11b6fbf: am 197fe269: Merge "Add OEM specific USB mode enumeration based on ro.bootmode property" into ics-mr1
* commit '5caed1d99b99a011501c532fbf970324ea82e13d':
2012-02-10 17:00:51 -08:00
Wink Saville
6f4421337d Merge "resolved conflicts for merge of e8b57fea to master" 2012-02-10 16:57:39 -08:00
Wink Saville
5185a1bc86 resolved conflicts for merge of e8b57fea to master
Change-Id: I2ccf2b4cb73faadd0c8608cc21dda5db888d2937
2012-02-10 16:11:18 -08:00
Glenn Kasten
131c7eedfb Merge "Simplify ThreadBase::exit() aka requestExitAndWait" 2012-02-10 15:32:16 -08:00
Glenn Kasten
acc8750e28 Merge "Disable HQ resamplers for now until qualified" 2012-02-10 15:31:54 -08:00
Glenn Kasten
86f536766a Merge "Move header declarations around for clarity" 2012-02-10 15:31:07 -08:00
Glenn Kasten
0f7612c899 Merge "Camel case readability & private disconnect(bool)" 2012-02-10 15:30:15 -08:00
Glenn Kasten
16d3edeae1 Merge "Remove aliasing" 2012-02-10 15:29:35 -08:00
Glenn Kasten
cfbf035fa9 Merge "Use mul from audioutils" 2012-02-10 15:28:57 -08:00
Wink Saville
ad8550d502 am f11b6fbf: am 197fe269: Merge "Add OEM specific USB mode enumeration based on ro.bootmode property" into ics-mr1
* commit 'f11b6fbfc8bab9a09e37ef9866c0da247474f4cf':
2012-02-10 15:28:54 -08:00
Glenn Kasten
611c6ff83d Merge "Mark fields const if only set in constructor" 2012-02-10 15:28:45 -08:00
Mike Lockwood
809b22e78d Merge changes Iefeba018,I1ce5b26d,Ie3f59793,Id3c5e1ec,I9063154a,Ib7bd88a3,I20963df8,I01060b08,I7dc29739,I5c55a051,Ia07aa3c4,I3194ea94,I0dc37cce,Ic3a7bb65,I0a7eaecf,Ifa7b0614,Ice952c8e,Ia5abdb9e,Ifcb310f9,If5f4ec97,I4767690f,I79824179,I6e0f981e,Id60ae7f6
* 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
2012-02-10 15:26:36 -08:00
Wink Saville
b6636dab3a am 812c2ff6: am 197fe269: Merge "Add OEM specific USB mode enumeration based on ro.bootmode property" into ics-mr1
* commit '812c2ff6312b25b9539399f38967f8a6ff40b733':
  Add OEM specific USB mode enumeration based on ro.bootmode property
2012-02-10 15:17:12 -08:00
Wink Saville
e0043bf472 am 197fe269: Merge "Add OEM specific USB mode enumeration based on ro.bootmode property" into ics-mr1
* commit '197fe26940022be75384f4038dd789f446d33122':
  Add OEM specific USB mode enumeration based on ro.bootmode property
2012-02-10 15:14:40 -08:00
Wink Saville
97c154c789 am 197fe269: Merge "Add OEM specific USB mode enumeration based on ro.bootmode property" into ics-mr1
* commit '197fe26940022be75384f4038dd789f446d33122':
  Add OEM specific USB mode enumeration based on ro.bootmode property
2012-02-10 15:14:40 -08:00
Svetoslav Ganov
1e32f3adeb Merge "UI automation service disconnected upon package change." 2012-02-10 15:13:26 -08:00
Wink Saville
23051433d2 Merge "Add OEM specific USB mode enumeration based on ro.bootmode property" into ics-mr1 2012-02-10 15:12:19 -08:00
Alex Sakhartchouk
1034fca6fb Merge "Making shader compilation errors throw a Java exception." 2012-02-10 15:00:21 -08:00
Amith Yamasani
18f189ce0c Merge "Multi-user - wallpaper service" 2012-02-10 14:34:52 -08:00
James Dong
66e697f50a Merge "Move away from MediaDebug and use ADebug instead" 2012-02-10 14:17:06 -08:00
Jason Sams
a64366ee40 Merge "Start implementing SurfaceTexture streaming into RS allocations." 2012-02-10 13:51:04 -08:00
Glenn Kasten
5ce6e65a08 Merge "No newline or space at end of ALOG format string" 2012-02-10 13:36:24 -08:00
Glenn Kasten
e97161adf9 Merge "Move declaration of stream_type_t up earlier" 2012-02-10 13:33:31 -08:00
Glenn Kasten
40523a5773 Merge "Fix typos in ALOG for pid vs tid" 2012-02-10 13:33:02 -08:00
Glenn Kasten
7a1378dcdd Merge "Rename type() to streamType()" 2012-02-10 13:30:24 -08:00
Eric Fischer
67638c9962 am 5b6f9bf5: (-s ours) am 8b6d7b06: am 650462bb: Import revised translations. DO NOT MERGE
* commit '5b6f9bf51c13532acac782a23506cb0b783b8876':
2012-02-10 13:15:26 -08:00
Eric Fischer
a146c8f67b am ffb2473b: (-s ours) am a2c92418: am 650462bb: Import revised translations. DO NOT MERGE
* commit 'ffb2473b3bd8a4986e41ff0a711e708656432eaf':
  Import revised translations.  DO NOT MERGE
2012-02-10 13:15:23 -08:00
Eric Fischer
c2a5c6878d am 8b6d7b06: am 650462bb: Import revised translations. DO NOT MERGE
* commit '8b6d7b063b5a94b59b4a1132763f4644ee1d8545':
2012-02-10 13:13:58 -08:00
Eric Fischer
058b593289 am a2c92418: am 650462bb: Import revised translations. DO NOT MERGE
* commit 'a2c9241869c14a058621668d65ca29fc8a867bbf':
  Import revised translations.  DO NOT MERGE
2012-02-10 13:13:30 -08:00
Eric Fischer
e67927d80f am 650462bb: Import revised translations. DO NOT MERGE
* commit '650462bbfd6218c918cd9507ea0a33fa9a936f26':
  Import revised translations.  DO NOT MERGE
2012-02-10 13:11:46 -08:00
Eric Fischer
0686f4ec1b am 650462bb: Import revised translations. DO NOT MERGE
* commit '650462bbfd6218c918cd9507ea0a33fa9a936f26':
  Import revised translations.  DO NOT MERGE
2012-02-10 13:11:45 -08:00
Dianne Hackborn
0800e56d10 Merge "Clean up and expose LongSparseArray." 2012-02-10 13:07:54 -08:00
Mike Lockwood
6b6c277406 Merge changes I54a4a41a,Ic067c9c3,I491f40dd,I3a2ce935,I3df2549c,Icba928ce
* changes:
  Make ActivityManagerService just kill apps when they crash on headless devices.
  Add support for disabling wallpaper service
  Fix merge problem
  Add the ability to pass float extras to AM.
  Adding a feature to indicate specific support for Bluetooth API.
  SystemServer: Add support for disabling AudioService and MountService
2012-02-10 13:05:13 -08:00
Mike Lockwood
769e3429a4 Merge "BatteryService: Don't fail to register native methods if kernel power supply driver is missing" 2012-02-10 13:03:24 -08:00
Eric Fischer
d3af61688f Merge "Import translations." 2012-02-10 12:54:21 -08:00
Mike Lockwood
48fc5ec69b Merge changes Id747dc81,I3a74bd36,I2395527c,I86aeb066,Ic33d5766,I7bef7390,I4b797dd8,Id3622e9e,I28087c63,Ia1c6d909,I95a766dd,I6c0236c5,Ib71287f4,I4bcbefdc,I22a7cb8d,Ie24dbeaf,I7dbc4b45,I21d524ea,Iaa5bf14e,I7db766c3,I93fcaca2,I1eb72044,I05ffbe7c,Ifdfe2ff8,Ia8f767a2
* changes:
  Fix problems dispatching media button events on headless devices
  Add headless mode for running the framework without the surface flinger
  SettingsProvider: Allow overridding default value for Setttings.Secure.DEVICE_PROVISIONED
  Load lockscreen.disabled setting on database create as well as upgrade
  SystemUI: Log an error instead of throwing an exception if navigation bar is enabled in tablet UI
  SettingsProvider: Add support for overriding lockscreen.disabled default value
  Allow overriding default STAY_ON_WHILE_PLUGGED_IN setting value in an overlay
  Disable output processing when opening serial port.
  Update aidl for new Broker API.
  aidl: All flattenable types now must also be parcelable.
  Update aidl to new APIs.
  Suport RpcData as a parcelable type.
  Modified AIDL to support authentication
  Fix disconnect from wired ethernet issues.
  Fix PresenterClass by adding a _listener field
  add presenters to aidl.
  Add SerialPort.sendBreak()
  Generate fallthrough for unhandled actions in RPC methods.
  PhoneWindowManager: Disable boot progress dialog on headless builds
  Support custom flattenable types for RPC.
  SystemServer: Don't start A2DP service if audio is not enabled
  Add RpcData as a built-in marshallable type.
  Add the full suite of RpcData types.
  Checkpoint adding @home RPC support to aidl
  ActivityManager: Make sure BOOT_COMPLETED Intent is sent when running headless
2012-02-10 11:50:10 -08:00
Mike Lockwood
a28f2b4e80 Merge "Quick and dirty test app for new SerialPort API" 2012-02-10 11:41:56 -08:00
Mike Lockwood
71f88551e4 Merge "New Serial Manager API:" 2012-02-10 11:41:41 -08:00
Dianne Hackborn
db8f43a7f1 Merge "Some cruft removal." 2012-02-10 11:14:39 -08:00
Justin Ho
d0a31838fc am 25d1d268: (-s ours) am 0fc225ed: am 744c5b0b: Merge "Import translations. DO NOT MERGE" into ics-mr1
* commit '25d1d268c1b00734f4bdd7fcb85ced97645a7f29':
2012-02-10 10:51:52 -08:00
Justin Ho
a01f83fe16 am 0fc225ed: am 744c5b0b: Merge "Import translations. DO NOT MERGE" into ics-mr1
* commit '0fc225ed37ec535ff9b5238f390a79dbaf7f377b':
2012-02-10 10:49:48 -08:00