summaryrefslogtreecommitdiffstats
path: root/services/usb
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2015-04-29 13:44:34 -0700
committerMike Lockwood <lockwood@google.com>2015-04-29 13:44:34 -0700
commit02868b1625f0b1fa6ce1fb2529186f155904dd03 (patch)
tree57fef52ee205f30a4f1b3ce4eeeb37e41b7a4ff4 /services/usb
parentc9bb40ea95101f8a46fab29beac02cc7204be320 (diff)
downloadframeworks_base-02868b1625f0b1fa6ce1fb2529186f155904dd03.zip
frameworks_base-02868b1625f0b1fa6ce1fb2529186f155904dd03.tar.gz
frameworks_base-02868b1625f0b1fa6ce1fb2529186f155904dd03.tar.bz2
MidiDeviceInfo: Add version string property
For USB devices, this is populated with the USB device version string. Change-Id: Ia9286d5f41783e4e960a9c724bf6b85b6599fe12
Diffstat (limited to 'services/usb')
-rw-r--r--services/usb/java/com/android/server/usb/UsbAlsaManager.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbAlsaManager.java b/services/usb/java/com/android/server/usb/UsbAlsaManager.java
index daccf95..27c97d0 100644
--- a/services/usb/java/com/android/server/usb/UsbAlsaManager.java
+++ b/services/usb/java/com/android/server/usb/UsbAlsaManager.java
@@ -401,6 +401,7 @@ public final class UsbAlsaManager {
Bundle properties = new Bundle();
String manufacturer = usbDevice.getManufacturerName();
String product = usbDevice.getProductName();
+ String version = usbDevice.getVersion();
String name;
if (manufacturer == null || manufacturer.isEmpty()) {
name = product;
@@ -412,6 +413,7 @@ public final class UsbAlsaManager {
properties.putString(MidiDeviceInfo.PROPERTY_NAME, name);
properties.putString(MidiDeviceInfo.PROPERTY_MANUFACTURER, manufacturer);
properties.putString(MidiDeviceInfo.PROPERTY_PRODUCT, product);
+ properties.putString(MidiDeviceInfo.PROPERTY_VERSION, version);
properties.putString(MidiDeviceInfo.PROPERTY_SERIAL_NUMBER,
usbDevice.getSerialNumber());
properties.putInt(MidiDeviceInfo.PROPERTY_ALSA_CARD, alsaDevice.mCard);