summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-11-09 11:32:22 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-09 11:32:22 -0800
commit23872771fd7eb5c69199829261041d8ecf3a85ed (patch)
tree5e4150a7d91f79ee095478b9e53698f208abe344
parent4ee50302450ad34f44d3516323f36b4c6f1e25f0 (diff)
parentd0a0bca6cc5bc0b0c0362b17d92f230c88a84fd2 (diff)
downloadandroid_packages_apps_BluetoothExt-23872771fd7eb5c69199829261041d8ecf3a85ed.tar.gz
android_packages_apps_BluetoothExt-23872771fd7eb5c69199829261041d8ecf3a85ed.tar.bz2
android_packages_apps_BluetoothExt-23872771fd7eb5c69199829261041d8ecf3a85ed.zip
Merge "Bluetooth: Check for device connection state."
-rw-r--r--bttestapp/src/org/codeaurora/bluetooth/bttestapp/HfpTestActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/bttestapp/src/org/codeaurora/bluetooth/bttestapp/HfpTestActivity.java b/bttestapp/src/org/codeaurora/bluetooth/bttestapp/HfpTestActivity.java
index aaf1369..05e722b 100644
--- a/bttestapp/src/org/codeaurora/bluetooth/bttestapp/HfpTestActivity.java
+++ b/bttestapp/src/org/codeaurora/bluetooth/bttestapp/HfpTestActivity.java
@@ -389,8 +389,10 @@ public class HfpTestActivity extends MonkeyActivity implements IBluetoothConnect
if (mBluetoothHeadsetClient != null) {
mCalls.clear();
Integer id = 1;
+ int connState = mBluetoothHeadsetClient.getConnectionState(mDevice);
// save all calls status
- if (!mBluetoothHeadsetClient.getCurrentCalls(mDevice).isEmpty()) {
+ if (connState == BluetoothProfile.STATE_CONNECTED &&
+ !mBluetoothHeadsetClient.getCurrentCalls(mDevice).isEmpty()) {
for (BluetoothHeadsetClientCall call :
mBluetoothHeadsetClient.getCurrentCalls(mDevice)) {
mCalls.put(id, call);