26989 Commits

Author SHA1 Message Date
Hung-ying Tyan
273d2ea3f9 Merge "Fix setting audio group mode in SipPhone." into gingerbread 2011-01-04 17:45:36 -08:00
James Dong
a7ac739b74 Suppress the recording sound in the recorded video
bug - 3309194

Change-Id: Ib8fb248943bc22f963d67537bfdbc6056c5a159b
2011-01-04 17:34:44 -08:00
Eric Laurent
730ba19bc8 Fix issue 3302649.
The cause of the problem is that AudioTrack::start() can fail if it is called from a newly created
thread that has the same ID as the AudioTrack callback thread that has just been stopped and not yet exited.
This is possible as the thread ID used by the Thread class is not the TID.

The fix consists in clearing the thread ID before exiting the thread loop.

Change-Id: I66e679665c384403cb3ba2c31746f5de72d5836d
2011-01-04 11:58:04 -08:00
Chia-chi Yeh
3cf7137642 RTP: Send silence packets on idle streams for every second.
Originally a stream does not send packets when it is receive-only or there is
nothing to mix. However, this causes some problems with certain firewalls and
proxies. A firewall might remove a port mapping when there is no outgoing
packet for a preiod of time, and a proxy might wait for incoming packets from
both sides before start forwarding. To solve these problems, we send out a
silence packet on the stream for every second. It should be good enough to
keep the stream alive with relatively low resources.

Bug: 3119690
Change-Id: Ib9c55e5dddfba28928bd9b376832b68bda24c0e4
2011-01-04 19:54:49 +08:00
Nick Pelly
8f49c025ca Merge "Added response flags and DSFID extras for NfcV technology (API part)." into gingerbread 2011-01-03 22:38:14 -08:00
Martijn Coenen
7eb32a4427 Added response flags and DSFID extras for NfcV technology (API part).
Also fixed a missing assignment in NfcB technology.

Change-Id: Ic564a0a17a9638c11fa528056da40f74ed37e9e6
2011-01-04 17:37:29 +11:00
Nick Pelly
a743448a1b Merge "Tweak Ndef.getType() API. Rename constants, expand javadoc." into gingerbread 2011-01-03 22:32:56 -08:00
Nick Pelly
ddbb2c997b Tweak Ndef.getType() API. Rename constants, expand javadoc.
Change-Id: I9d2c83411411fea4ef46bb7c30ebdbcd9ee3e7d8
2011-01-04 17:31:48 +11:00
Nick Pelly
163bd40749 Merge "Added getType() to NDEF technology class (API part)." into gingerbread 2011-01-03 20:58:26 -08:00
Martijn Coenen
d27ebf1e69 Added getType() to NDEF technology class (API part).
Change-Id: Idfa391dd9d4a401e1daa3dc90ca57e4a3d9e0fa3
2011-01-04 15:57:39 +11:00
Nick Pelly
8c09ef91ae Merge "Removed selectAid() from IsoDep." into gingerbread 2011-01-03 20:09:03 -08:00
Martijn Coenen
912aa1cd70 Removed selectAid() from IsoDep.
It's a convenience method that can be implemented with transceive();
not really needed for now.

Change-Id: Idd855c85b15d97ae679d11d908834be3cb2741d8
2011-01-04 15:08:34 +11:00
Nick Pelly
4b94dee833 Merge "Added transfer/restore convience cmds to MF Classic tech." into gingerbread 2011-01-03 18:33:09 -08:00
Martijn Coenen
a42b352594 Added transfer/restore convience cmds to MF Classic tech.
Change-Id: I675993bc3aae6a741d63be458a0dfea240dd5316
2011-01-04 13:32:06 +11:00
John Wang
06fccc3251 Merge "Clear request list while timeout." into gingerbread 2011-01-03 08:44:17 -08:00
Hung-ying Tyan
1d12ef09a8 Fix setting audio group mode in SipPhone.
Bug: 3119690
Change-Id: I495d3c031ee4c272d360fe19553ef9726a3f8771
2010-12-29 16:07:17 +08:00
John Wang
00d520b66c Clear request list while timeout.
The wakelock will be kept held if there is outstanding requests
in request list. When WAKE_LOCK_TIMEOUT occurs, all requests
in mRequestList already waited at least DEFAULT_WAKE_LOCK_TIMEOUT
but no response. Those lost requests return GENERIC_FAILURE and
request list is cleared.

bug:3292426
Change-Id: I369c6ba4d6836d65ef616140e48c7304faf888f0
2010-12-28 17:14:18 -08:00
Alon Albert
672ebb61a7 Merge "Improved ignore-backoff handling Allow a non-epidited ignore-backoff op to pass through an expidited backed off op." into gingerbread 2010-12-28 14:44:51 -08:00
Dianne Hackborn
6eef0ca594 Merge "frameworks/base: Fix to release references in ActivityManagerService" into gingerbread 2010-12-23 14:19:03 -08:00
Vairavan Srinivasan
a207ce2aba frameworks/base: Fix to release references in ActivityManagerService
ServiceRecord's bindings is a hashmap to keep track of all active
bindings to the service. This is not cleared when the service is
brought down by activity manager. This adds up the references to
IntentBindRecords and its references to ServiceRecord. Fix is to
clear the bindings.

ServiceRecord's restarter is a reference to the service and is not
cleared when the service is brought down by activity manager. This
adds up the references to ServiceRecord. Fix is to set the reference
to null when the service is brought down by activity manager.

Change-Id: Ica448cd5f60192c8adb23209b5d0e2cf0c04e446
2010-12-23 14:16:56 -08:00
Jeff Brown
c6f2b3b302 Merge "Fix policy issues when screen is off. (DO NOT MERGE)" into gingerbread 2010-12-23 12:41:59 -08:00
Dianne Hackborn
2dda21b93f Merge "Another stab at fixing issue #3149290 java.lang.RuntimeException:..." into gingerbread 2010-12-22 18:34:40 -08:00
Dianne Hackborn
7becaeea7b Another stab at fixing issue #3149290 java.lang.RuntimeException:...
...Unable to pause activity
{com.android.settings/com.android.settings.applications.StorageUse}

Change-Id: Ibfa28a1c5af50dd150dfcafe71e905426d312643
2010-12-22 18:29:32 -08:00
Dianne Hackborn
690d20bb53 Fix issue # 3227963: SecurityException: Neither user 10023 nor...
...current process has android.permission.WAKE_LOCK

When updating a system app, we would actually uninstall the package
of the system app, which also meant removing its uid...!  It was just
luck that we would get the same uid when installing the update after
that.  During that time, if anyone tried to do anything related to
that uid, it would be unknown.

This change tweaks how we go about replacing system apps by making
it more like normal apps -- to make this work, if we need to disable
the system app, we generate a new PackageSetting from the current
system app and replace it into our data structures, so we can update
that without trashing the current correct information about the (still
actually there) system app.

Also fixed a problem where we were not killing the currently running
app before installing, like we do when updating a normal application.

And fixed a problem where we were not deleting the /data .apk when
uninstalling a system app update.

And added a new option to the "pm" command to clear the data associated
with an app.

Change-Id: I0e879677849aa42950a3c360bf78ad820e87674b
2010-12-22 16:31:44 -08:00
Jeff Brown
eb9f7a01b0 Fix policy issues when screen is off. (DO NOT MERGE)
Rewrote interceptKeyBeforeQueueing to make the handling more systematic.
Behavior should be identical except:
- We never pass keys to applications when the screen is off and the keyguard
  is not showing (the proximity sensor turned off the screen).
  Previously we passed all non-wake keys through in this case which
  caused a bug on Crespo where the screen would come back on if a soft key
  was held at the time of power off because the resulting key up event
  would sneak in just before the keyguard was shown.  It would then be
  passed through to the dispatcher which would poke user activity and
  wake up the screen.
- We propagate the key flags when broadcasting media keys which
  ensures that recipients can tell when the key is canceled.
- We ignore endcall or power if canceled (shouldn't happen anyways).

Changed the input dispatcher to not poke user activity for canceled
events since they are synthetic and should not wake the device.

Changed the lock screen so that it does not poke the wake lock when the
grab handle is released.  This fixes a bug where the screen would come
back on immediately if the power went off while the user was holding
one of the grab handles because the sliding tab would receive an up
event after screen turned off and release the grab handles.

Bug: 3144874
Change-Id: Iebb91e10592b4ef2de4b1dd3a2e1e4254aacb697
2010-12-22 16:00:21 -08:00
Alon Albert
d41fe75f09 Improved ignore-backoff handling
Allow a non-epidited ignore-backoff op to pass through
an expidited backed off op.

To do this, I first refactored the complicated if statement:

            if (best == null
                    || ((bestSyncableIsUnknownAndNotARetry == syncableIsUnknownAndNotARetry)
                        ? (best.expedited == op.expedited
                           ? opRunTime < bestRunTime
                           : op.expedited)
                        : syncableIsUnknownAndNotARetry)) {
                best = op;
                bestSyncableIsUnknownAndNotARetry = syncableIsUnknownAndNotARetry;
                bestRunTime = opRunTime;
            }

Into a more readable:
            boolean setBest = false;
            if (best == null) {
                setBest = true;
            } else if (bestSyncableIsUnknownAndNotARetry == syncableIsUnknownAndNotARetry) {
                if (best.expedited == op.expedited) {
                    if (opRunTime < bestRunTime) {
                        //  if both have same level, earlier time wins
                        setBest = true;
                    }
                } else {
                    if (op.expedited) {
                        setBest = true;
                    }
                }
            } else {
                if (syncableIsUnknownAndNotARetry) {
                    setBest = true;
                }
            }
            if (setBest) {
                best = op;
                bestSyncableIsUnknownAndNotARetry = syncableIsUnknownAndNotARetry;
                bestRunTime = opRunTime;
            }

The refactoring was all done automatically with IntelliJ to avoid human error
in the conversion.

After verifying this code still behaved as expected including the error
condition in the bug, I added handling for the cases when a non-expidited op
may override an expedited op if certain conditions occur, specificaly, if the
expidited op is backed off and the non-expidited op is not.

Finally, refactored to make it testable and added tests and logging.

Bug: 3128963

Change-Id: I131cbcec6073ea5fe425f6b5aa88ca56c02b6598
2010-12-22 14:40:43 -08:00
James Dong
2bf89b2197 Merge "Expose AMRNB/WB and AAC encoder and related file output formats - do not merge" into gingerbread 2010-12-22 12:38:11 -08:00
James Dong
d609ca7f6a Expose AMRNB/WB and AAC encoder and related file output formats - do not merge
bug - 3305667

Change-Id: I8f137af7f87cb010f75cae1777b9ec6b6af8214f
2010-12-22 12:12:12 -08:00
Mattias Petersson
1622eee2e4 Improve performance of WindowState.toString()
This fix improves the performance by caching the string that should
be returned, and reuse it next time if possible.
This will make it faster to switch between activities, approximately
half the time to create the new view when changing from landscape to
portrait. Also, the time for starting a new application is be reduced
as WindowState.toString is being called thousands of times in this
case.

Change-Id: I2b8b9bc1e251d1af43b6c85f049c01452f2573a2
2010-12-22 10:42:47 -08:00
Jeff Hamilton
3ce86481cb Remove canBeFormatted().
It's not easy to determine if this
is possible, so instead apps should
attempt a format and handle errors
in the format request.

Change-Id: I078a208b849e71ef3fb6b5970a9111ece4a2d201
2010-12-22 11:31:21 -06:00
Hung-ying Tyan
e0bd2688eb Merge "Check if VoIP API is supported in SipManager." into gingerbread 2010-12-21 18:34:15 -08:00
Gilles Debunne
1cbb9a06c8 Ran fixPngMetaTags on all the core/res assets.
This removes the empty iTxt meta tags in png which are not supported by
Java 1.5. This script should be run every time the SDK is released.

Bug 3069421

Change-Id: I1610e52597937040f9da343046cd98aa075f728d
2010-12-21 16:46:21 -08:00
Robert Greenwalt
5d0fafe807 Merge "Be sure and report NO_CONNECTIVITY when needed." into gingerbread 2010-12-21 16:02:13 -08:00
Gilles Debunne
e0cf3b3430 Asset cleanup. DO NOT MERGE
Assets moved from drawable to drawable-mdpi. Hdpi version created.

Change-Id: Iec08f79e22688a7b5dfc149aed68617ebf217564
2010-12-21 15:17:04 -08:00
Dianne Hackborn
5261cea2e0 Merge "Fix issue #3224616: TimeUtils.formatDuration() can drop 0s." into gingerbread 2010-12-21 13:27:15 -08:00
Robert Greenwalt
d68e321841 Be sure and report NO_CONNECTIVITY when needed.
Reports that we sometimes didn't report NO_CONNECTIVITY led to this suggested change.
Could not repro the problem, but the change looks ok anyway.  Better safe than sorry.

bug:3276408
Change-Id: I0cdb48a05a5c9dfcf3a0b468a6eae43d461023b1
2010-12-21 11:43:28 -08:00
Hung-ying Tyan
5bd3782f24 Check if VoIP API is supported in SipManager.
This is to make SipManager.isVoipSupported() effective.
Also add NPE check now that we may return null SipAudioCall when VOIP is not
supported.

Bug: 3251016

Change-Id: Icd551123499f55eef190743b90980922893c4a13
2010-12-21 11:51:03 +08:00
Bjorn Bringert
f5f7510486 Fix issue #3224616: TimeUtils.formatDuration() can drop 0s.
Integrated from master.

Change-Id: Ie12dd25cce03c06fafb7df1335266322df43b038
2010-12-20 15:23:02 -08:00
Simon Wilson
0c8ad64d64 Merge "fix [3127755] Launcher is missing anti-aliasing" into gingerbread 2010-12-20 14:09:52 -08:00
Mike LeBeau
12b82c8da7 Merge "Unhide RecognizerResultsIntent. This API was reviewed for Froyo, but we didn't want to make it public then because it wasn't until our first Market release of Voice Search that the APIs would be in use by our app." into gingerbread 2010-12-20 11:55:56 -08:00
Scott Main
00410256a6 cherrypick Change-Id: I51b73bb0bb09ef0b928efec151f55e0bf8ffc954
docs: fix typos

Change-Id: Ic31053b1a17b8b2e0842ba6077ad635e642dc705
2010-12-20 08:54:37 -08:00
Mike LeBeau
52af3a4f9a Unhide RecognizerResultsIntent. This API was
reviewed for Froyo, but we didn't want to make it
public then because it wasn't until our first
Market release of Voice Search that the APIs would
be in use by our app.

http://b/3135351

Change-Id: I49053717cac08e3976c22e3a105139b6755aadb8
2010-12-20 10:50:31 -05:00
Mathias Agopian
c724f2fba3 disable the bypass mode. DO NOT MERGE.
SF bypass mode triggers a bug in the display controller that
case cause the device to freeze.

Change-Id: If29b4d5132f463d13831b082b904c235f15a19fb
2010-12-18 03:45:26 -08:00
Martijn Coenen
ab82a5b9a8 Clean up and polish Mifare Classic tech.
- It's useful to have accessors at block level, so apps don't really have to know
  about the sector structure (and how many blocks there are in a sector).
- There's no way to tell whether a read/write/ didn't work because of auth
  failure. The documentation should be changed to make this point clear.
- Added increment/decrement commands, for atomic increment/decrement of value blocks.

Change-Id: I590feacbcd1443f1be7a86ab046a5b1f33e2e04c
2010-12-17 13:20:32 -08:00
Dianne Hackborn
c8e8a12b3c Merge "Fix issue #3289835: NullPointerException in..." into gingerbread 2010-12-17 10:37:25 -08:00
Hung-ying Tyan
a936b256eb Remove SIP realm/domain check
as the realm may be different from the domain.

Bug: 3283834
Change-Id: I64c9f0d6d626afdb397c5d378d30afa9d6a64ca9
2010-12-17 10:20:06 +08:00
Hung-ying Tyan
acf649356b Merge "Check port in create peer's SIP profile." into gingerbread 2010-12-16 18:04:54 -08:00
Nick Pelly
29f9ee973e Merge "Need to check ndef before writing ndef." into gingerbread 2010-12-16 16:35:51 -08:00
Martijn Coenen
01d159aa2c Need to check ndef before writing ndef.
Regression due to all the (re)connect changes.

Change-Id: I637618f63518965e893a5a59db61002271666fa4
2010-12-16 16:34:56 -08:00
Scott Main
0d1e38ef99 cherrypick Change-Id: I58e21f636e15d4b1522b66b16ffd48f1eb31308c
docs: misc fixes to the drawable reference

Change-Id: I8b867234250ca18d5b6ee78a22b6150e1ba3e588
2010-12-16 15:48:36 -08:00