27028 Commits

Author SHA1 Message Date
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
Dianne Hackborn
3ec27e06a7 Fix issue #3289835: NullPointerException in...
..PackageManagerService.grantPermissionsLP when updating system app

Change-Id: I36c1b96d2fe9a8737843d30f3a2669935fc281bb
2010-12-16 12:41:56 -08:00
Eric Laurent
5a756fb0f1 Merge "Fix issue 2712130: Sholes: problem when playing audio while recording over bluetooth SCO." into gingerbread 2010-12-16 11:18:29 -08:00
Scott Main
3165bbb155 cherrypick Change-Id: I7ec40d7c2908bd78b74ada8ba2b6838db4a0bac5
docs: misc fixes for the adb move

Change-Id: Ie7701d9c1656c6cb5ae6063562efeabd9eb737a3
2010-12-16 10:34:54 -08:00
Hung-ying Tyan
58ee2acba8 Check port in create peer's SIP profile.
SipURI returns port -1 when port is not present in the URI.
Don't call SipProfile.Builder.setPort() when that happens.

Bug: 3291248
Change-Id: I8e608cbc56ea82862df55fdba885f6a864db83ab
2010-12-16 20:46:50 +08:00
Eric Laurent
36d41b8103 Fix issue 2712130: Sholes: problem when playing audio while recording over bluetooth SCO.
The problem is that when an input stream is opened for record over bluetooth SCO, the kernel
mono audio device should be opened in RW mode to allow further use of this same device by an output stream
also routed to bluetooth SCO.
This does not happen because of a bug in AudioSystem::isBluetoothScoDevice() that does not return true
when the device is DEVICE_IN_BLUETOOTH_SCO_HEADSET (input device for blurtooth SCO).

Change-Id: Ic78bf324b4a68e65721d763dc7682ce7a8f14f75
2010-12-15 19:09:42 -08:00
Scott Main
4ea442b49c Merge "cherrypick Change-Id: I07634c137e515068911c61c04bf3e9400c3fe0d4 docs: misc changes; add path to adb tool in sdk; fix broken link to ninepatch docs; fix and add some other links" into gingerbread 2010-12-15 17:47:02 -08:00
Scott Main
58d1966767 cherrypick Change-Id: I07634c137e515068911c61c04bf3e9400c3fe0d4
docs: misc changes;
add path to adb tool in sdk;
fix broken link to ninepatch docs;
fix and add some other links

Change-Id: I27c7284ac2db2e6020c9cb0115fb932a2f503033
2010-12-15 17:44:38 -08:00
Mathias Agopian
f9954c7eab fix [3127755] Launcher is missing anti-aliasing
Enable limited forms of mipmaping when possible.

Change-Id: I39ad90becaa4048844fdbbbcb187333e7d59fc6a
2010-12-15 16:59:55 -08:00
Martijn Coenen
c58c3f1ae2 Implement additional Mifare Ultralight convenience methods.
Change-Id: I8d9dfadb5911b2d11d1ba6dcf1381decbb8386ef
2010-12-15 16:41:38 -06:00
Martijn Coenen
0d27f999f4 Expose reconnect(), to allow applications to reset tag state.
Change-Id: Ib5432e7f6b6aaf6ec1cb06693592cb7c6440a6f8
2010-12-15 16:41:38 -06:00
Martijn Coenen
4049f9d00a Implement multi-tech connect, enfore tech exclusivity.
- The NfcService now allows for connecting to a specific technology;
- The "active" parts of technology classes may not be used at the same time.

Change-Id: Ibb569f51cc6da4f3e24df9d0850c6f49a022b0c2
2010-12-15 16:41:38 -06:00