11757 Commits

Author SHA1 Message Date
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
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
Dianne Hackborn
5261cea2e0 Merge "Fix issue #3224616: TimeUtils.formatDuration() can drop 0s." into gingerbread 2010-12-21 13:27:15 -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
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
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
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
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
Dianne Hackborn
99441c45e4 Fix issue #3149290: java.lang.RuntimeException: Unable to pause activity
{com.android.settings/com.android.settings.applications.StorageUse}

AbsListView could call mAdapter.getItemId() if a save state happened
after the data changed but before a layout occurred.

Change-Id: Ica020971dc458dff79b56dd810733e217f4f7da6
2010-12-15 11:02:55 -08:00
Costin Manolache
a848d34450 Merge "Fix bug in permission grant system." into gingerbread 2010-12-14 10:07:26 -08:00
Brad Fitzpatrick
0927c90265 Merge "Fix StrictMode javadoc copy/paste error." into gingerbread 2010-12-13 15:25:09 -08:00
Nick Kralevich
9dbef975f0 Merge "Avoid leaking sockets." into gingerbread 2010-12-13 15:03:28 -08:00
Nick Kralevich
2ed20f8768 Avoid leaking sockets.
When a DNS lookup fails, we end up creating a datagram socket
but never properly close it.  This wastes limited valuable file
descriptors and causes CTS test failures.  Generally, we should
ensure that sockets or files are opened in a try block, and closed
in a finally block.

Bug: 3276283
Change-Id: I3432f3bc061268c7367948230f6edbdfcec55892
2010-12-13 14:32:17 -08:00
Dianne Hackborn
e4a5951925 Fix issue #3154576: battery stats checkin should include UID -> packages+ map
Includes some other small fixes to battery collection and a few
other things.

Output of package info looks like this:

5,0,i,uid,1000,com.android.settings
5,0,i,uid,1000,com.android.providers.subscribedfeeds
5,0,i,uid,1000,com.android.providers.settings
5,0,i,uid,1000,com.android.server.vpn
5,0,i,uid,1000,android
5,0,i,uid,1000,com.android.systemui
5,0,i,uid,1000,com.google.android.backup
5,0,i,uid,1001,com.android.phone
5,0,i,uid,1001,com.android.providers.telephony
5,0,i,uid,1022,com.android.nfc
5,0,i,uid,10021,com.google.android.location
5,0,i,uid,10021,com.google.android.syncadapters.calendar
5,0,i,uid,10021,com.google.android.gsf
5,0,i,uid,10021,com.google.android.syncadapters.contacts
5,0,i,uid,10026,com.android.providers.downloads.ui
5,0,i,uid,10026,com.android.providers.media
5,0,i,uid,10026,com.android.providers.drm
5,0,i,uid,10026,com.android.providers.downloads
5,0,i,uid,10032,com.android.launcher
5,0,i,uid,10039,com.google.android.gm
5,0,i,uid,10041,com.google.android.gallery3d
5,0,i,uid,10049,com.android.providers.calendar

Change-Id: I9e38f254eef146339113ad270f5c6e8b60fb7a1d
2010-12-13 14:31:40 -08:00
Brad Fitzpatrick
320274c5f1 Fix StrictMode javadoc copy/paste error.
Change-Id: Idd49111f0a1af6f331cffa0972191b2d4e25a385
2010-12-13 14:07:39 -08:00
Martijn Coenen
e3f6336bcf Fixed API for active NDEF reading and NDEF formatting.
- Added getNdefCached() to return the message read at discovery time.
- Fixed format() to check ndef before doing the write:
  libnfc actually requires a checkNdef to be done before writing.

Change-Id: I9b3108299c05539bdef92dd74f62f911fb5a16bf
2010-12-13 09:58:58 -06:00
Jeff Hamilton
641dd62155 First pass at advanced NFC tag dispatching APIs and other cleanup.
Change-Id: I022fcd481274a2f68d93218026e77551cfae8cae
2010-12-10 22:48:16 -06:00
Martijn Coenen
b79173f660 Changed technology close() to reconnect to the tag instead of physical disconnect.
Change-Id: I8935e4aae452adeec472c0b3ff3c77f1400a264e
2010-12-10 22:07:46 -06:00
Martijn Coenen
fc5a3b6cfb Changed transceive on all technologies to "raw", except for Mifare classes.
Change-Id: I3d680e37fec0ab84cdbb70d9fb6fff9527dd76a2
2010-12-10 22:06:35 -06:00
Martijn Coenen
3300e4c3ea Implemented isWritable() to indicate NDEF capability container r/w state.
Change-Id: Ie8bdf490c955e620f5e5029346fbe2e188ea4748
2010-12-10 22:02:09 -06:00
Nick Pelly
50b4d8f643 Make getSystemService(NFC_SERVICE) the NFC entry point.
This gives NFC service a handle to the application context.

Deprecate NfcAdapter.getDefaultAdapter(), it does not provide a context.
Using this method will print a warning, and will later throw an exception
if a method that requires a context is called. No 2.3 API's will fail, but
new API's that do require a context might fail.

Also add helper NfcAdapter.getDefaultAdapter(Context).

Change-Id: I9a6378de4ef4b61ad922f8d53e64e2a1a1d5d60c
2010-12-10 17:12:33 -08:00
Costin Manolache
5d275bba42 Fix bug in permission grant system.
Change-Id: Ic7d712e5a672c3eded16fee83235db01ab3c74fa
2010-12-09 16:53:33 -08:00
Brad Fitzpatrick
36af79434f Fix malformed Javadoc.
Change-Id: I5cfbd49272117defce5226da0f40a8392457a2e2
2010-12-08 11:31:07 -08:00
Nick Pelly
40ddd4a649 Merge "Implemented getSize() to return max ndef size." into gingerbread 2010-12-07 22:55:21 -08:00
Martijn Coenen
6d9fc7e1ef Implemented getSize() to return max ndef size.
Change-Id: Ia584e8cfa51a4eaef5f03dc436c78a67296c2cae
2010-12-07 22:54:07 -08:00
Martijn Coenen
5289b91c88 Implement ndef formatting.
Change-Id: I6e3e3abdc304bc14d7c93a413e42bf957963e288
2010-12-07 22:30:39 -08:00
Dianne Hackborn
42a23783aa Merge "Add more checks for bad values to protect from corrupt files." into gingerbread 2010-12-07 22:04:38 -08:00
Dianne Hackborn
7b9c56fe0f Add more checks for bad values to protect from corrupt files.
Change-Id: I4174c358c49b93e74920b00fcfd6c68659bf7d08
2010-12-07 22:02:59 -08:00
Mathias Agopian
05813b0eb9 Merge changes I244b5469,I32044e91 into gingerbread
* changes:
  [3253328, 3171580] Treat GONE and INVISIBLE views the same when calculating transparent regions
  [3171580] Fix two typos related to fixed-size buffers
2010-12-07 14:18:21 -08:00
Jeff Hamilton
0f74afbbf4 Merge "Remove Type X Tags from the top-level API." into gingerbread 2010-12-07 13:59:29 -08:00
Martijn Coenen
72df4ea830 Remove Type X Tags from the top-level API.
Also added an extra to carry the ndef message, so we can have it in multiple
Ndef instances without doing an active read.

Change-Id: I2ecabc24732990c5c9979ee3a001a7fb13da21d9
2010-12-07 13:51:47 -08:00
Daniel Sandler
f340d082b8 Merge "More precise status bar battery icons." into gingerbread 2010-12-07 12:03:36 -08:00
Nick Pelly
47e6ccb65a Merge "Corrected MIFARE default key set" into gingerbread 2010-12-07 09:29:21 -08:00
Jan Brands
65c3f9806e Corrected MIFARE default key set
The all-zero key is not a commonly used key.
Fixed naming

Change-Id: I2fb86079159195c6893ea758e8b0bbda266dc420
2010-12-07 09:27:06 -08:00
Dirk Dougherty
0871ee0c6f Doc change: fix href to axis_globe_inverted orientation diagram. 2010-12-06 19:40:21 -08:00
Martijn Coenen
9a9706a213 Added missing ndef technology to getTech.
Change-Id: I1f08e140c9bb43a8e894812adbc4d11801637f46
2010-12-06 18:44:12 -08:00
Nick Pelly
e58e8a715b Merge "Added NdefFormatable tag, initial class with supported methods." into gingerbread 2010-12-06 18:41:36 -08:00
Martijn Coenen
39f91ed529 Added NdefFormatable tag, initial class with supported methods.
Change-Id: Ifa358b5e980158d5e8accb9f42fdcfb29ad81e64
2010-12-06 18:38:49 -08:00
Nick Pelly
eba947a32a Merge "Remove ACTION_TAG_DISCOVERED from protected broadcast list." into gingerbread 2010-12-06 17:43:46 -08:00
Nick Pelly
35042f1f58 Remove ACTION_TAG_DISCOVERED from protected broadcast list.
ACTION_TAG_DISCOVERED is a start activity intent, not a broadcast intent, so
its presence in this list is redundant.

Change-Id: I05419ec9c4471b7b11c9ae50a02e5ac3d9e572d2
2010-12-06 17:32:59 -08:00
Daniel Sandler
5ebb8507d5 More precise status bar battery icons.
The rule is: 1px per 5%, which just about covers the entire
bounding box of the battery body (21px, actually).

(For the charging animation I got lazy and just cut an image
every 10% / 2px.)

Color band reference:
	Green: 100-30%
	Yellow: 25-20%
	Orange: 15%
	Red: 10-0%

Bug: 3136046
Change-Id: I49d2cc9dbfff7228a6af53dfd9d8d5e56c2233e7
2010-12-06 16:52:38 -05:00
Jeff Hamilton
c1576ad627 Update the docs to clarify the ordering constraints.
Change-Id: Ib3932e637a675c875b9ed3482826a150b845a385
2010-12-05 21:50:29 -06:00
Nick Pelly
3d524e5626 Merge gingerbread-nfc into gingerbread 2010-12-05 18:08:16 -08:00
Nick Pelly
d8c323321c Merge "Merge branch gingerbread-nfc into gingerbread." into gingerbread 2010-12-05 14:46:29 -08:00
Nick Pelly
16ec9c5bb5 Merge branch gingerbread-nfc into gingerbread.
Change-Id: I37d657a16061fddfbb0993463f24d6d3945cddd1
Signed-off-by: Nick Pelly <npelly@google.com>
2010-12-05 14:45:29 -08:00
Mathias Agopian
e33811512e [3253328, 3171580] Treat GONE and INVISIBLE views the same when calculating transparent regions
We only used to check for INVISIBLE, which prevented some Surfaceview
optimization to take place.

Change-Id: I244b54696d861a022ca1c334ff61ab7efb899587
2010-12-03 17:35:06 -08:00
Jan Brands
2fe24e3e14 First implementation of MifareUltralight
Change-Id: I77818ddc89b529c17fc41d6c0850688365c6b770
2010-12-03 23:45:03 +01:00
Xia Wang
3591bebd59 Merge "Restore Wi-Fi configuration after the test. DO NOT MERGE" into gingerbread 2010-12-02 13:40:23 -08:00