diff options
author | Robert Ly <robertly@google.com> | 2011-07-12 10:58:02 -0700 |
---|---|---|
committer | Robert Ly <robertly@google.com> | 2011-07-26 14:12:24 -0700 |
commit | f2ccec39c288fa5588f37e99f93024cb9de3296c (patch) | |
tree | f13a246a47b4e746cbf1fec1d59ee3eee9035451 /docs/html | |
parent | 070ce94b9fd91d1bb22161a85178440cb46d8ece (diff) | |
download | frameworks_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.jd | 6 |
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<String, UsbDevice> deviceList = manager.getDeviceList(); -Iterator<UsbDevice> 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 |