summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNigel Hannam <cyanogenmod@hannam.eu>2013-02-18 21:26:07 +0000
committerNigel Hannam <cyanogenmod@hannam.eu>2013-02-18 21:26:07 +0000
commitcff630a495ea802b05784ad3390136e7c05d56be (patch)
tree6d16daaa18d807b0119cefaf5fa93ffe28cc3bb9
parent827d931b28bae5aa079628e059caa6c17b9a5173 (diff)
downloadandroid_packages_apps_Bluetooth-cff630a495ea802b05784ad3390136e7c05d56be.tar.gz
android_packages_apps_Bluetooth-cff630a495ea802b05784ad3390136e7c05d56be.tar.bz2
android_packages_apps_Bluetooth-cff630a495ea802b05784ad3390136e7c05d56be.zip
handleCpbsCommand was incorrectly sending two responses which broke phonebook sync with Audi 2G MMIcm-10.1-M2
Change-Id: I0c68c3806379fda6d516b070da9750d8ffab4ad5
-rwxr-xr-xsrc/com/android/bluetooth/hfp/AtPhonebook.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/com/android/bluetooth/hfp/AtPhonebook.java b/src/com/android/bluetooth/hfp/AtPhonebook.java
index d133706ff..029234a65 100755
--- a/src/com/android/bluetooth/hfp/AtPhonebook.java
+++ b/src/com/android/bluetooth/hfp/AtPhonebook.java
@@ -204,15 +204,11 @@ public class AtPhonebook {
if ("SM".equals(mCurrentPhonebook)) {
atCommandResponse = "+CPBS: \"SM\",0," + getMaxPhoneBookSize(0);
atCommandResult = HeadsetHalConstants.AT_RESPONSE_OK;
- if (atCommandResponse != null)
- mStateMachine.atResponseStringNative(atCommandResponse);
- mStateMachine.atResponseCodeNative(atCommandResult, atCommandErrorCode);
break;
}
PhonebookResult pbr = getPhonebookResult(mCurrentPhonebook, true);
if (pbr == null) {
atCommandErrorCode = BluetoothCmeError.OPERATION_NOT_SUPPORTED;
- mStateMachine.atResponseCodeNative(atCommandResult, atCommandErrorCode);
break;
}
int size = pbr.cursor.getCount();
@@ -231,7 +227,7 @@ public class AtPhonebook {
String[] args = atString.split("=");
// Select phonebook memory
if (args.length < 2 || !(args[1] instanceof String)) {
- mStateMachine.atResponseCodeNative(atCommandResult, atCommandErrorCode);
+ atCommandErrorCode = BluetoothCmeError.OPERATION_NOT_SUPPORTED;
break;
}
String pb = ((String)args[1]).trim();
@@ -240,7 +236,6 @@ public class AtPhonebook {
if (getPhonebookResult(pb, false) == null && !"SM".equals(pb)) {
if (DBG) log("Dont know phonebook: '" + pb + "'");
atCommandErrorCode = BluetoothCmeError.OPERATION_NOT_ALLOWED;
- mStateMachine.atResponseCodeNative(atCommandResult, atCommandErrorCode);
break;
}
mCurrentPhonebook = pb;