summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2009-08-14 18:33:38 -0700
committerNick Pelly <npelly@google.com>2009-08-18 08:24:22 -0700
commitbd022f423a33f0794bb53e5b0720da2d67e4631c (patch)
tree4def583f15b783ada3d49866a8cd29bcdb1bbe00 /wifi
parent82e7408be29c6c8c6ed80887ea97f48f38b3223d (diff)
downloadframeworks_base-bd022f423a33f0794bb53e5b0720da2d67e4631c.zip
frameworks_base-bd022f423a33f0794bb53e5b0720da2d67e4631c.tar.gz
frameworks_base-bd022f423a33f0794bb53e5b0720da2d67e4631c.tar.bz2
Bluetooth: API change.
Split BluetoothDevice into BluetoothDevice and BluetoothAdapter. BluetoothAdapter: Represents the local BT adapter. Operations on the local adapter (start a scan, etc). BluetoothDevice: Represents a remote BT device. Operations on remote devices (pair, connect, etc). IBluetoothDevice.aidl -> Bluetooth.aidl BluetoothDeviceService.java -> BluetoothDeviceService.java TODO: Javadoc
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiStateTracker.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 083cda3..fa24a98 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -39,6 +39,7 @@ import android.util.Log;
import android.util.Config;
import android.app.Notification;
import android.app.PendingIntent;
+import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothA2dp;
import android.content.ContentResolver;
@@ -49,6 +50,7 @@ import com.android.internal.app.IBatteryStats;
import java.util.List;
import java.util.ArrayList;
+import java.util.Set;
import java.net.UnknownHostException;
/**
@@ -645,10 +647,10 @@ public class WifiStateTracker extends NetworkStateTracker {
private void checkIsBluetoothPlaying() {
boolean isBluetoothPlaying = false;
- List<String> connected = mBluetoothA2dp.listConnectedSinks();
+ Set<BluetoothDevice> connected = mBluetoothA2dp.getConnectedSinks();
- for (String address : connected) {
- if (mBluetoothA2dp.getSinkState(address) == BluetoothA2dp.STATE_PLAYING) {
+ for (BluetoothDevice device : connected) {
+ if (mBluetoothA2dp.getSinkState(device) == BluetoothA2dp.STATE_PLAYING) {
isBluetoothPlaying = true;
break;
}