diff options
author | Paul McLean <pmclean@google.com> | 2015-02-19 15:09:53 -0800 |
---|---|---|
committer | Paul McLean <pmclean@google.com> | 2015-02-19 15:33:34 -0800 |
commit | ceb47aae5a045856ad13a5534a4d96f9b36c9a65 (patch) | |
tree | cc7f65c6056a0176193aad4e4178ef6609bc6643 /media | |
parent | 83b40599bbda9f7f1f7d91f7cfdbb5c8a1872be0 (diff) | |
download | frameworks_base-ceb47aae5a045856ad13a5534a4d96f9b36c9a65.zip frameworks_base-ceb47aae5a045856ad13a5534a4d96f9b36c9a65.tar.gz frameworks_base-ceb47aae5a045856ad13a5534a4d96f9b36c9a65.tar.bz2 |
Changing AudioManager.listAudioDevicePorts to take a ArrayList<AudioDevicePort> argument.
Change-Id: Ide9a2f58a7544e263600e100ba4274403201c5fa
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioDevicesManager.java | 9 | ||||
-rw-r--r-- | media/java/android/media/AudioManager.java | 4 |
2 files changed, 6 insertions, 7 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)); } } } diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index da89cf4..9876995 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -3459,14 +3459,14 @@ public class AudioManager { * @see listAudioPorts(ArrayList<AudioPort>) * @hide */ - public int listAudioDevicePorts(ArrayList<AudioPort> devices) { + public int listAudioDevicePorts(ArrayList<AudioDevicePort> devices) { ArrayList<AudioPort> ports = new ArrayList<AudioPort>(); int status = updateAudioPortCache(ports, null); if (status == SUCCESS) { devices.clear(); for (int i = 0; i < ports.size(); i++) { if (ports.get(i) instanceof AudioDevicePort) { - devices.add(ports.get(i)); + devices.add((AudioDevicePort)ports.get(i)); } } } |