9590 Commits

Author SHA1 Message Date
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
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
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
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
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
Jeff Hamilton
c1576ad627 Update the docs to clarify the ordering constraints.
Change-Id: Ib3932e637a675c875b9ed3482826a150b845a385
2010-12-05 21:50:29 -06: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
Jeff Hamilton
609b3e429a Merge remote branch 'ohd/gingerbread' into merge 2010-12-02 09:41:16 -06:00
Kenny Root
938d097263 Merge "Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService" into gingerbread 2010-12-01 14:18:23 -08:00
Kenny Root
1de2eac9d0 Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService
Be compatible with the old DownloadProvider behavior of being able to
operate on content URIs returned from .insert()

Bug: 3242328
Change-Id: I7dad15ac0fefa867c3c8a33a579fc9899ac80262
2010-12-01 11:37:53 -08:00
Brad Fitzpatrick
981a72a150 Merge "[don't auto-merge] Don't re-read SharedPreferences unnecessarily." into gingerbread 2010-12-01 08:46:52 -08:00
Martijn Coenen
67a337bc51 Fixed technology name typo's.
Change-Id: If39b109cb60c762d50c21f6aaced0a31abb66c40
2010-12-01 14:16:59 +01:00
Mathias Agopian
7badd2c402 allow rotation-vector to have 4 components
- upadte documentation for rotation vector
- update method dealing with rotation vector to deal with 4 components
- virtual rotation-vector sensor reports all four components
- improve SensorManager documentation layout

Whent he 4-th component of the rotation-vector is present, we can save
a square-root when computing the quaternion or rotation matrix from it.

Change-Id: Ia84d278dd5f0909fab1c5ba050f8df2679e2c7c8
2010-11-30 14:07:09 -08:00
Brad Fitzpatrick
d2bbaaf294 [don't auto-merge] Don't re-read SharedPreferences unnecessarily.
Bug: 3211034
Bug: 3216290
Change-Id: Idd5cc25965d400f20122372ca1cf47d4703dd87c
2010-11-30 12:59:28 -08:00
Ben Murdoch
27e728f22d Merge "Hide plugin views when we start playing HTML5 video" into gingerbread 2010-11-30 02:43:29 -08:00
Martijn Coenen
bc7180bba4 Implement historical bytes / attrib on IsoDep
Change-Id: Ic7afa29515d10fec72ac8f27adc411788ad6f68c
2010-11-29 17:03:35 +01:00
Martijn Coenen
438feb9b3b Provide system code and manufacturer code for Felica tech.
Change-Id: I56d5308ad5fa4998a88e1e0aec51fe301ab99078
2010-11-25 09:40:50 +01:00
Martijn Coenen
1253ebc74a Fixed NfcAdapter init and getTechnology().
- GetTechnology() used a binary search, but the array was linked to another
  array (extras) which was not sorted. So made it linear.
- The tag technologies were instantiated with a null NfcAdapter.

Change-Id: Iae15169a89155c3a5c9f81824f809d6010ebac01
2010-11-24 11:13:57 +01:00
Daniel Tomas
9024564107 Secure Element access implementation
Change-Id: I907e6771ecc5babe895115c3a49288fa2144a187
2010-11-19 22:23:45 -06:00
Jeff Hamilton
6be655c768 Rough first pass at the NFC technology API.
Change-Id: I903ad6bc124bf9a65af788dae45f55d58704ef7b
2010-11-19 20:26:29 -06:00
Wu-cheng Li
589e838116 Merge "Improve camera documentation." into gingerbread 2010-11-19 18:14:43 -08:00
Mathias Agopian
f71384cd61 Fix SensorManager.getOrientation() documentation.
This function doesn't use the same reference coordinate system used
for the rotation matrix, unlike what the documentation previously
stated.

Change-Id: I38abeb74540d33b67f72993b54d7a00a73588dde
2010-11-19 16:25:11 -08:00
Wu-cheng Li
99a3f3e4e0 Improve camera documentation.
bug:3212606
Change-Id: Iee7106e4665c08a4c75471114010b75d63ac74ce
2010-11-19 16:20:04 +08:00
Jeff Hamilton
4934d3361e Revert "Merge "Remove the My Tag feature." into gingerbread"
This reverts commit ef5694692f88bb91ed6ee1191b11a66ec594ff39, reversing
changes made to 65816a32ee2c2181895e3be636f3173a6e769f67.
2010-11-11 20:42:28 -06:00
Ben Murdoch
1708ad53c3 Hide plugin views when we start playing HTML5 video
Plugins like Flash draw directly to the screen on top
of all other views - including the fullscreen HTML5 video
view. This means that if you start an HTML5 video on a page
also serving a flash clip then flash will obscure the video.

This patch hides plugin views before start the video and shows
them again when the VideoView is destroyed.

Bug: 3183521
Change-Id: I9839c47e9d64b081651b952057e9283630362b29
2010-11-11 16:07:26 +00:00
Dianne Hackborn
34594e75e4 Merge "Fix issue #3177284: Account for wake lock power usage on Crespo" into gingerbread 2010-11-10 17:58:28 -08:00
Owen Lin
45ca778d8e Merge "Make sure the controller will get repositioned after size changing." into gingerbread 2010-11-09 19:02:23 -08:00
Mathias Agopian
b48189ccfe Merge "Improve gyro and accelerometer java doc" into gingerbread 2010-11-09 17:12:11 -08:00
Mathias Agopian
fa33565714 Improve gyro and accelerometer java doc
Change-Id: If055512cb51d6e3b9f2094a730bf373ca963d97d
2010-11-09 13:53:25 -08:00
Jesse Wilson
28c742573c Add @Deprecated to match @deprecated where it's missing.
Change-Id: Ice95022671968386a601f32df7850f9baa1d2dd0
2010-11-09 10:10:11 -08:00
Owen Lin
a8381dfc5e Make sure the controller will get repositioned after size changing.
Bug: 3177061
Change-Id: I8f9606d4e05146ba568e8fe370cfe115dadedab9
2010-11-09 19:32:30 +08:00
Dianne Hackborn
0c8b4d3f7e Fix issue #3177284: Account for wake lock power usage on Crespo
Change-Id: I5e3d6c4772f08277ee775dba191a5054dd5a4ca2
2010-11-08 19:10:58 -08:00
Adam Powell
06fd1dc5bf Merge "DO NOT MERGE Fix bug 3121030 - Text handles erroneously appear over extract mode IME window" into gingerbread 2010-11-08 18:14:01 -08:00