Merge commit 'f6354aca3a4d0571a66747d9cdc247a1d411d660' into gingerbread-plus-aosp
* commit 'f6354aca3a4d0571a66747d9cdc247a1d411d660':
CallManager: do not deliver ring event if fg call is live.
Merge commit '04e5a1cba9671d2d6b07dbb9bc3b8d18fa610321' into gingerbread-plus-aosp
* commit '04e5a1cba9671d2d6b07dbb9bc3b8d18fa610321':
Import revised translations. DO NOT MERGE
Merge commit '72ce42352c1c229e05d910b4176f3cddb608e814' into gingerbread-plus-aosp
* commit '72ce42352c1c229e05d910b4176f3cddb608e814':
Fix possible race conditions during channel unregistration.
Merge commit 'f996ed9f2e4a992e5d884077a15dcc23a8d90c44' into gingerbread-plus-aosp
* commit 'f996ed9f2e4a992e5d884077a15dcc23a8d90c44':
Make vCard importer/exporter aware of multi-byte parameters.
Previously, the input dispatcher assumed that the input channel's
receive pipe file descriptor was a sufficiently unique identifier for
looking up input channels in its various tables. However, it can happen
that an input channel is disposed and then a new input channel is
immediately created that reuses the same file descriptor. Ordinarily
this is not a problem, however there is a small opportunity for a race
to arise in InputQueue.
When InputQueue receives an input event from the dispatcher, it
generates a finishedToken that encodes the channel's receive pipe fd,
and a sequence number. The finishedToken is used by the ViewRoot
as a handle for the event so that it can tell the InputQueue when
the event has finished being processed.
Here is the race:
1. InputQueue receives an input event, assigns a new finishedToken.
2. ViewRoot begins processing the input event.
3. During processing, ViewRoot unregisters the InputChannel.
4. A new InputChannel is created and is registered with the Input Queue.
This InputChannel happens to have the same receive pipe fd as
the one previously registered.
5. ViewRoot tells the InputQueue that it has finished processing the
input event, passing along the original finishedToken.
6. InputQueue throws an exception because the finishedToken's receive
pipe fd is registered but the sequence number is incorrect so it
assumes that the client has called finish spuriously.
The fix is to include a unique connection id within the finishedToken so
that the InputQueue can accurately confirm that the token belongs to
the currently registered InputChannel rather than to an old one that
happened to have the same receive pipe fd. When it notices this, it
ignores the spurious finish.
I've also made a couple of other small changes to avoid similar races
elsewhere.
This patch set also includes a fix to synthesize a finished signal
when the input channel is unregistered on the client side to
help keep the server and client in sync.
Bug: 2834068
Change-Id: I1de34a36249ab74c359c2c67a57e333543400f7b
Merge commit 'e6bfceeb10a01c8e89f712c0ffddc9e5e3ad1842' into gingerbread-plus-aosp
* commit 'e6bfceeb10a01c8e89f712c0ffddc9e5e3ad1842':
Adding a sample accessibility service -make
Merge commit '3b70e159a8168c1154d31d7b0552bb3b0c099334' into gingerbread
* commit '3b70e159a8168c1154d31d7b0552bb3b0c099334':
Adding a sample accessibility service -make
Merge commit 'b3e957bb9d3a3811412e5d94233c7f7e2e777c28' into gingerbread-plus-aosp
* commit 'b3e957bb9d3a3811412e5d94233c7f7e2e777c28':
New download manager error code when we can't resume.
Merge commit '209e651805dd40ea87df7ff67f2755605be9308c' into gingerbread-plus-aosp
* commit '209e651805dd40ea87df7ff67f2755605be9308c':
Make the LED colors when charging customizable by the vendor
Merge commit 'c708e38356e9c381b640ef96db3b0b0fdd41d433' into gingerbread-plus-aosp
* commit 'c708e38356e9c381b640ef96db3b0b0fdd41d433':
Revert "InputMethodService: Fix ignore case in showInputMethodPickerFromClient"
Merge commit 'b6ef8bad8a48fdc28770cf34d0c9efefc7fdd815' into gingerbread-plus-aosp
* commit 'b6ef8bad8a48fdc28770cf34d0c9efefc7fdd815':
GPS: Initialize XTRA support when GPS is enabled
Merge commit '80810f86e93866674f3a4ca61f84887e7717aa63' into gingerbread-plus-aosp
* commit '80810f86e93866674f3a4ca61f84887e7717aa63':
Fix crash in status bar ticker.
Merge commit 'eff30e3d1b005fd0696390d1dd47ec4ff0c52784' into gingerbread-plus-aosp
* commit 'eff30e3d1b005fd0696390d1dd47ec4ff0c52784':
Change the default time scale for audio/video track during recording
Merge commit '997dc32b6bef1c9cc8ac6d4d598698507b2c4934' into gingerbread-plus-aosp
* commit '997dc32b6bef1c9cc8ac6d4d598698507b2c4934':
add an api for getting a device serial number
Merge commit '567722eee190f7cf88dc7ea95167db76d5514842' into gingerbread-plus-aosp
* commit '567722eee190f7cf88dc7ea95167db76d5514842':
Fix problems with determining when to kill apps for wake usage.