24543 Commits

Author SHA1 Message Date
Hung-ying Tyan
a4cb657e3a CallManager: add setAudioMode()
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
2010-08-18 10:21:10 +08:00
Hung-ying Tyan
8eac20eacd SIP: implement conference call
Change-Id: Ifd420ed95e77e744c6aff28ac63e7363f97d9dc6
2010-08-18 10:00:36 +08:00
Hung-ying Tyan
f6354aca3a Merge "CallManager: do not deliver ring event if fg call is live." into gingerbread 2010-08-17 17:34:05 -07:00
Eric Fischer
04e5a1cba9 Merge "Import revised translations. DO NOT MERGE" into gingerbread 2010-08-17 17:19:21 -07:00
Jeff Brown
72ce42352c Merge "Fix possible race conditions during channel unregistration." into gingerbread 2010-08-17 17:05:38 -07:00
Jeff Brown
2cbecea4c9 Fix possible race conditions during channel unregistration.
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
2010-08-17 17:03:42 -07:00
Irfan Sheriff
a1af0d7c80 Merge "Fix SDK build" into gingerbread 2010-08-17 16:48:36 -07:00
Irfan Sheriff
4d32d81bd7 Fix SDK build
Add the tag and documentation when we open up the high perf mode

Change-Id: I921e46a7519561e59fb917d08a36dd1d3d2fc7f3
2010-08-17 16:45:53 -07:00
Eric Fischer
f870000ff0 Import revised translations. DO NOT MERGE
Change-Id: Id47f0897de1361ba755f149b2886d7d1f79ff494
2010-08-17 16:43:35 -07:00
Daisuke Miyakawa
f996ed9f2e Merge "Make vCard importer/exporter aware of multi-byte parameters." into gingerbread 2010-08-17 16:42:06 -07:00
Daisuke Miyakawa
b7688558cc Make vCard importer/exporter aware of multi-byte parameters.
Bug: 2922186
Change-Id: Ic877940242d87ef918bf8d4dac601d37b296259b
2010-08-17 16:40:47 -07:00
Chia-chi Yeh
3459d3037c RTP: remove froyo-compatible code.
Change-Id: I6822a4e4749a5909959658c29253242b4018aeb0
2010-08-18 07:09:59 +08:00
Irfan Sheriff
8c11e95230 DO NOT MERGE WifiLock extensions for high performance mode
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
2010-08-17 15:27:54 -07:00
Steve Howard
8651bd5d18 Fix up handling of null fields in DownloadManager.
Document fields that can have invalid/unknown values, and fix handling
of null local URI.

Change-Id: I7684c151f0a20c91340655246bec2ce0a60328e4
2010-08-17 14:10:25 -07:00
Wu-cheng Li
f008f3ea82 Document that autoFocus must be called in auto and macro mode.
Change-Id: Ia52f8bc8a75a7473edff50326a4a0467f4295e6a
2010-08-17 13:44:35 -07:00
Roman Nurik
e6bfceeb10 am 3b70e159: Merge "Adding a sample accessibility service -make" into froyo
Merge commit '3b70e159a8168c1154d31d7b0552bb3b0c099334' into gingerbread

* commit '3b70e159a8168c1154d31d7b0552bb3b0c099334':
  Adding a sample accessibility service -make
2010-08-17 10:45:30 -07:00
Roman Nurik
3b70e159a8 Merge "Adding a sample accessibility service -make" into froyo 2010-08-17 10:36:03 -07:00
Brad Fitzpatrick
67fed01522 Avoid unnecessary SharedPrefences disk writes.
Apps commonly edit + commit redundant changes to their
SharedPreferences, not checking the existing values.  Rather than
force all apps to double-check that their settings writes aren't
redundant, we should just make .commit() faster (avoiding the disk
write) when the file already exists on disk and no effective changes
were made.

Change-Id: I7edbd0d3ace5b69b7af6d12c39797c8b7f86230b
2010-08-17 10:29:15 -07:00
Steve Howard
b3e957bb9d Merge "New download manager error code when we can't resume." into gingerbread 2010-08-17 08:20:52 -07:00
Mike Lockwood
b6ef8bad8a Merge "GPS: Initialize XTRA support when GPS is enabled" into gingerbread 2010-08-17 04:46:29 -07:00
Mike Lockwood
1a1cd3a878 GPS: Initialize XTRA support when GPS is enabled
BUG: 2923148

Change-Id: If9a643e385c6c567b30f47d4caa35fa812a2ba43
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-08-17 07:45:47 -04:00
Hung-ying Tyan
912e0f7d9e CallManager: do not deliver ring event if fg call is live.
Change-Id: If5b1bca1f09557a2ee4de9ba429d80a0393279a0
2010-08-17 17:52:34 +08:00
Joseph Wen
f1f48bc7f2 Do JPEG tile-based decoding.
Change-Id: I5c1b4ac3c02eb4350ef0ba9a7877b22cfd730cfb
2010-08-17 14:34:02 +08:00
Jeff Brown
1ce4394c77 Merge "Throttle userActivity calls from input dispatcher." into gingerbread 2010-08-16 19:59:03 -07:00
Jeff Brown
90291577a0 Throttle userActivity calls from input dispatcher.
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
2010-08-16 18:33:50 -07:00
Steve Howard
33bbd12a05 New download manager error code when we can't resume.
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
2010-08-16 14:28:17 -07:00
Andreas Huber
3386c38d59 Make the OggExtractor less verbose.
Change-Id: Ieea5f3fa98d93ca6ad8fa7dcd23054e1cd0b6338
2010-08-16 14:11:40 -07:00
Mathias Agopian
833533c929 Improve Display javadoc slightly
Change-Id: Iaa7d599e11d42d4aaf50e87b141f9b8d04ba445e
2010-08-16 13:30:20 -07:00
Daniel Sandler
80810f86e9 Merge "Fix crash in status bar ticker." into gingerbread 2010-08-16 12:22:29 -07:00
Daniel Sandler
f8d5809eee Fix crash in status bar ticker.
Bug: 2900850
Change-Id: Iaf71e093578501258a24cd43e5deaf624d28461e
2010-08-16 15:15:41 -04:00
James Dong
eff30e3d1b Change the default time scale for audio/video track during recording
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
2010-08-16 10:38:35 -07:00
Doug Zongker
997dc32b6b Merge "add an api for getting a device serial number" into gingerbread 2010-08-16 09:19:40 -07:00
Doug Zongker
7d2e3df60d add an api for getting a device serial number
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
2010-08-16 09:18:50 -07:00
Chung-yih Wang
cfd15dd3c8 Fix the IN_CALL mode issue.
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
2010-08-16 18:02:31 +08:00
Dianne Hackborn
567722eee1 Merge "Fix problems with determining when to kill apps for wake usage." into gingerbread 2010-08-15 17:33:02 -07:00
Dianne Hackborn
1ebccf531d Fix problems with determining when to kill apps for wake usage.
Also improve debug printing of various times.

Change-Id: Ifcc288fd1bcbf44c069875ba97925b9e7ffe9a48
2010-08-15 17:27:29 -07:00
Irfan Sheriff
f76a05e985 Merge "DO NOT MERGE Fix wifi status icon" into gingerbread 2010-08-15 15:57:47 -07:00
Irfan Sheriff
72d54efd3d DO NOT MERGE Fix wifi status icon
Doing a setIcon makes the icon visible and overrides
setIconVisibility

Change-Id: I7a177cc07e46f211d421e4aa86203ece5936c3fb
2010-08-15 15:55:44 -07:00
James Dong
b72081966d Use audio clock as the reference media clock
o Only do this for realtime applications
o Adjust other track clock based on audio clock
o Assume other track uses wall clock as the media clock
o Use some heuristics to reduce the size of stts box by 2/3.

- also
o Remove one unused key from MetaData.h

Change-Id: Ib9432842627b61795b533508158c25258a527332
2010-08-13 18:12:48 -07:00
Mathias Agopian
6a73368be4 Merge "fix a typo that prevented glTexImage2D codepath to work" into gingerbread 2010-08-13 16:29:48 -07:00
Mathias Agopian
10f5c99223 fix a typo that prevented glTexImage2D codepath to work
Change-Id: I36a3bf9d1d2eacd9b14e00b0a6c53bf88bba381c
2010-08-13 16:25:13 -07:00
Robert Greenwalt
e300b8c10c Merge "DO NOT MERGE Always set/remove default routes." into gingerbread 2010-08-13 15:59:53 -07:00
Dianne Hackborn
a8d9291d7f Merge "Various battery info things:" into gingerbread 2010-08-13 15:56:29 -07:00
Robert Greenwalt
b738fb9938 DO NOT MERGE Always set/remove default routes.
Must clean up default route if a default 3g connection is replaced
by a non-default (ie, mms) connection on teh same interface.

Also stop mucking with all connections dns and routes - do it only
for the connection that has changed.

bug:2865974
Change-Id: Ifdf49080fa0413a4d826813706c809975a562dfa
2010-08-13 15:53:13 -07:00
Ying Wang
e05184f271 Merge "Output proguard keep flags for fragment classes." into gingerbread 2010-08-13 15:26:21 -07:00
Dianne Hackborn
9adb9c3b10 Various battery info things:
- Now track wake locks in battery history.
- Now track sensors in battery history.
- Some filtering of sensory data.
- Fixes to some data that wasn't cleared when resetting battery stats.
- Print amount discharged since last charge.

And the big part -- keep track of wake locks held per process,
and kill processes that hold wake locks too much while they are in
the background.  This includes information in the battery stats
about the process being killed, which will be available to the
developer if the app is reported.

Change-Id: I97202e94d00aafe0526ba2db74a03212e7539c54
2010-08-13 15:17:49 -07:00
Jake Hamby
3f442ece25 Merge "Fix character count bug and Javadoc typos in SMS (with test cases)" into gingerbread 2010-08-13 15:15:36 -07:00
Eric Fischer
244152bfb9 Merge "Change aapt's warning message to suggest formatted="false", not "true"." into gingerbread 2010-08-13 14:54:15 -07:00
Jake Hamby
4f17082167 Merge "Fix typo and bug in CTS test class." into gingerbread 2010-08-13 14:51:09 -07:00
Eric Fischer
98ee11ddb7 Change aapt's warning message to suggest formatted="false", not "true".
True is the default and specifying it won't suppress the warning.

Change-Id: I8ecc919b4059bf3321e781649cb46dd2d3807592
2010-08-13 14:49:55 -07:00