Also added a struct 'Size' containing a width and a height field.
Modified parse_size to optionally set an end pointer pointing to the
character after the found size.
Change-Id: I0c95ebf1ad4684721b32165f363db7d4d15a1b19
Sometimes the wrong fd was accessed when the device was addressed
by device id.
The earlier implementation assumed that two arrays were in sync
but one of them was compacted when devices were removed. Instead
of that dependency the device now keeps track of it's file descriptor.
Change-Id: Ib0f320603aafb07ded354bc3687de9759c9068f2
Merge commit 'a34c9ca30ea25d0c4d8ae51da7858c4ea58b7f25' into gingerbread
* commit 'a34c9ca30ea25d0c4d8ae51da7858c4ea58b7f25':
Add more error checking for ndc
In NativeDaemonConnector.doCommand() calls, there was inconsistent error
checking. This change adds error checking for every call and makes it so
that any call to .doCommand() that gets an error code won't cause the
code to hang forever.
Change-Id: If714282b6642f278fb8137f652af1a012670253b
The previous implementation fails to work properly when the .apk
and installed versions of the binaries have the same size and date.
Change-Id: I063817a935da9ad459858d7eec8bb3d940607850
When in a call, different audio modes need to be applied based on phone type.
(For example, SIP call needs to be in MODE_NORMAL while GSM call in MODE_IN_CALL.)
Originally, it's handled in PhoneUtils.setAudioMode(). It makes more sense now
to handle the actual logic in CallManager.
Change-Id: I58d8f31d6b4afe22f88da442daac2010781de801
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
Add extension to WifiLock to allow apps to operate
in high performance mode (high power & disable suspend
optimizations for battery consumption).
Bug: 2834260
Change-Id: I8b33d307f3d569bc92ba2139b9ed224ffc147547
Merge commit '3b70e159a8168c1154d31d7b0552bb3b0c099334' into gingerbread
* commit '3b70e159a8168c1154d31d7b0552bb3b0c099334':
Adding a sample accessibility service -make
Results in an approximately 60% reduction in InputDispatcher thread CPU time.
(Went from 3% to 1% when measured with CPU frequency scaling disabled.)
Change-Id: Ia6e6087a719ee518fe37b428a871c7240bd4143f
Adding DownloadManager.ERROR_CANNOT_RESUME for when we can't resume an
interrupted download (because the server didn't provide an ETag or
doesn't support range requests), as well as the necessary private
status code in Downloads.Impl.
Change-Id: I5a66f1e1964198552ab2216aa6d3cc0db2254e21
and reduce rounding errors in calculating the sample duration
- Default time scale for tracks other than audio is set to 90000.
- Audio track by default uses the audio sampling rate as the time scale.
- Default movie time scale remains to be 1000.
- The default time scale values will be overwritten by a user-supplied value if exits.
Change-Id: I81b40ed0626ea45e9fd24a89e21a2c5a4a2c3415
Add a constant to android.os.Build that returns a device-specific
alphanumeric serial number. It's optional -- it may be blank --
though CTS will require it to be present for non-telephony devices.
Change-Id: I338ae5f43ba679a5e98f2f437dc4efdaef0c835d
If the sip call is on-holding, we should not set the audio to
MODE_NORMAL, or it will affect the audio if there is an active pstn
call.
Change-Id: If1bcba952617bf8427bc9e2d64d483ba1ee37370