summaryrefslogtreecommitdiffstats
path: root/core/java/android/bluetooth/BluetoothA2dp.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/bluetooth/BluetoothA2dp.java')
-rw-r--r--core/java/android/bluetooth/BluetoothA2dp.java28
1 files changed, 10 insertions, 18 deletions
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index 920ef89..61b4303 100644
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -26,11 +26,8 @@ import android.os.ServiceManager;
import android.server.BluetoothA2dpService;
import android.util.Log;
-import java.util.Collections;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
/**
@@ -167,35 +164,35 @@ public final class BluetoothA2dp implements BluetoothProfile {
/**
* {@inheritDoc}
*/
- public Set<BluetoothDevice> getConnectedDevices() {
+ public List<BluetoothDevice> getConnectedDevices() {
if (DBG) log("getConnectedDevices()");
if (mService != null && isEnabled()) {
try {
- return toDeviceSet(mService.getConnectedDevices());
+ return mService.getConnectedDevices();
} catch (RemoteException e) {
Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
- return toDeviceSet(new BluetoothDevice[0]);
+ return new ArrayList<BluetoothDevice>();
}
}
if (mService == null) Log.w(TAG, "Proxy not attached to service");
- return toDeviceSet(new BluetoothDevice[0]);
+ return new ArrayList<BluetoothDevice>();
}
/**
* {@inheritDoc}
*/
- public Set<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
+ public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
if (DBG) log("getDevicesMatchingStates()");
if (mService != null && isEnabled()) {
try {
- return toDeviceSet(mService.getDevicesMatchingConnectionStates(states));
+ return mService.getDevicesMatchingConnectionStates(states);
} catch (RemoteException e) {
Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
- return toDeviceSet(new BluetoothDevice[0]);
+ return new ArrayList<BluetoothDevice>();
}
}
if (mService == null) Log.w(TAG, "Proxy not attached to service");
- return toDeviceSet(new BluetoothDevice[0]);
+ return new ArrayList<BluetoothDevice>();
}
/**
@@ -396,11 +393,6 @@ public final class BluetoothA2dp implements BluetoothProfile {
return false;
}
- private Set<BluetoothDevice> toDeviceSet(BluetoothDevice[] devices) {
- return Collections.unmodifiableSet(
- new HashSet<BluetoothDevice>(Arrays.asList(devices)));
- }
-
private static void log(String msg) {
Log.d(TAG, msg);
}