summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2011-03-08 19:40:12 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-08 19:40:12 -0800
commit46a2941b3f2e5c38388f3e503a22768ca2d9814a (patch)
treea7d9dc0944aab921a0c538d846c9f7ddf949ee04 /src/com/android/settings/bluetooth
parent4652c45e6b8ddf4e335a478e823052696b82011e (diff)
parent37bf3353d15fb7927b52fa8f8883a7c6c865fae4 (diff)
downloadpackages_apps_settings-46a2941b3f2e5c38388f3e503a22768ca2d9814a.zip
packages_apps_settings-46a2941b3f2e5c38388f3e503a22768ca2d9814a.tar.gz
packages_apps_settings-46a2941b3f2e5c38388f3e503a22768ca2d9814a.tar.bz2
Merge "Return profile state disconnected when not yet bound to service." into honeycomb-mr1
Diffstat (limited to 'src/com/android/settings/bluetooth')
-rw-r--r--src/com/android/settings/bluetooth/HeadsetProfile.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/settings/bluetooth/HeadsetProfile.java b/src/com/android/settings/bluetooth/HeadsetProfile.java
index dac47b7..e9c52ef 100644
--- a/src/com/android/settings/bluetooth/HeadsetProfile.java
+++ b/src/com/android/settings/bluetooth/HeadsetProfile.java
@@ -133,6 +133,8 @@ final class HeadsetProfile implements LocalBluetoothProfile {
}
public int getConnectionStatus(BluetoothDevice device) {
+ if (mService == null) return BluetoothProfile.STATE_DISCONNECTED;
+
List<BluetoothDevice> deviceList = mService.getConnectedDevices();
return !deviceList.isEmpty() && deviceList.get(0).equals(device)