diff options
Diffstat (limited to 'media/java/android/media/AudioDevicesManager.java')
-rw-r--r-- | media/java/android/media/AudioDevicesManager.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/media/java/android/media/AudioDevicesManager.java b/media/java/android/media/AudioDevicesManager.java index 4e52953..bce2100 100644 --- a/media/java/android/media/AudioDevicesManager.java +++ b/media/java/android/media/AudioDevicesManager.java @@ -130,8 +130,7 @@ public class AudioDevicesManager { public ArrayList<AudioDeviceInfo> listDevices(int flags) { Slog.i(TAG, "AudioManager.listDevices(" + Integer.toHexString(flags) + ")"); - //FIXME - Use ArrayList<AudioDevicePort> when mAudioManager.listAudioDevicePorts() is fixed. - ArrayList<AudioPort> ports = new ArrayList<AudioPort>(); + ArrayList<AudioDevicePort> ports = new ArrayList<AudioDevicePort>(); int status = mAudioManager.listAudioDevicePorts(ports); Slog.i(TAG, " status:" + status + " numPorts:" + ports.size()); @@ -140,9 +139,9 @@ public class AudioDevicesManager { if (status == AudioManager.SUCCESS) { deviceList = new ArrayList<AudioDeviceInfo>(); - for (AudioPort port : ports) { - if (/*port instanceof AudioDevicePort &&*/ checkFlags((AudioDevicePort)port, flags)) { - deviceList.add(new AudioDeviceInfo((AudioDevicePort)port)); + for (AudioDevicePort port : ports) { + if (checkFlags(port, flags)) { + deviceList.add(new AudioDeviceInfo(port)); } } } |