summaryrefslogtreecommitdiffstats
path: root/docs/html
diff options
context:
space:
mode:
authorRobert Ly <robertly@google.com>2011-07-12 10:58:02 -0700
committerRobert Ly <robertly@google.com>2011-07-26 14:12:24 -0700
commitf2ccec39c288fa5588f37e99f93024cb9de3296c (patch)
treef13a246a47b4e746cbf1fec1d59ee3eee9035451 /docs/html
parent070ce94b9fd91d1bb22161a85178440cb46d8ece (diff)
downloadframeworks_base-f2ccec39c288fa5588f37e99f93024cb9de3296c.zip
frameworks_base-f2ccec39c288fa5588f37e99f93024cb9de3296c.tar.gz
frameworks_base-f2ccec39c288fa5588f37e99f93024cb9de3296c.tar.bz2
cherrypick from hc-mr2 Change-Id: Iab11fd9bf007d2e2dcfd7b26a6b8539ed35cf60e
Change-Id: I15aaa631796673a9e552497b2ae6d5f1d17cb6d6
Diffstat (limited to 'docs/html')
-rw-r--r--docs/html/guide/topics/usb/host.jd6
1 files changed, 1 insertions, 5 deletions
diff --git a/docs/html/guide/topics/usb/host.jd b/docs/html/guide/topics/usb/host.jd
index 942708d..4967033 100644
--- a/docs/html/guide/topics/usb/host.jd
+++ b/docs/html/guide/topics/usb/host.jd
@@ -264,11 +264,7 @@ UsbDevice device = (UsbDevice) intent.getParcelableExtra(UsbManager.EXTRA_DEVICE
UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
...
HashMap&lt;String, UsbDevice&gt; deviceList = manager.getDeviceList();
-Iterator&lt;UsbDevice&gt; deviceIterator = deviceList.values().iterator();
-while(deviceIterator.hasNext()){
- UsbDevice device = deviceIterator.next();
- // your code
-}
+UsbDevice device = deviceList.get("deviceName");
</pre>
<p>If desired, you can also just obtain an iterator from the hash map and process each device one