summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStaffan Lindvall <staffan.lindvall.x@sonyericsson.com>2010-12-07 14:15:51 +0100
committerJean-Baptiste Queru <jbq@google.com>2010-12-28 11:34:15 -0800
commit6f02f510e5dc3fb994516128f2de1d78bc7f9b1e (patch)
tree9cb5603599d5b3cf7852468eb1d10ab45f71678d
parente7f887dab2591a46ecf80616e00f33bb5d847935 (diff)
downloadandroid_packages_apps_Bluetooth-6f02f510e5dc3fb994516128f2de1d78bc7f9b1e.tar.gz
android_packages_apps_Bluetooth-6f02f510e5dc3fb994516128f2de1d78bc7f9b1e.tar.bz2
android_packages_apps_Bluetooth-6f02f510e5dc3fb994516128f2de1d78bc7f9b1e.zip
Incorrect response code after pull of invalid vCard handle.
When calling pullVcardEntry with an invalid / non-existing vCard handle the response code is always "OK". Instead the phone should respond "NOT FOUND" according to Bluetooth PBAP specification. The problem exists both for phonebook and call logs. Change-Id: I339b1fe0cdb7fa9b6c6b425f1b1686c24cab9626
-rw-r--r--src/com/android/bluetooth/pbap/BluetoothPbapObexServer.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/bluetooth/pbap/BluetoothPbapObexServer.java b/src/com/android/bluetooth/pbap/BluetoothPbapObexServer.java
index eccd3a2e5..7cd949279 100644
--- a/src/com/android/bluetooth/pbap/BluetoothPbapObexServer.java
+++ b/src/com/android/bluetooth/pbap/BluetoothPbapObexServer.java
@@ -869,7 +869,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler {
int size = mVcardManager.getPhonebookSize(appParamValue.needTag);
if (size == 0) {
if (V) Log.v(TAG, "PhonebookSize is 0, return.");
- return ResponseCodes.OBEX_HTTP_OK;
+ return ResponseCodes.OBEX_HTTP_NOT_FOUND;
}
boolean vcard21 = appParamValue.vcard21;
@@ -879,7 +879,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler {
} else if (appParamValue.needTag == ContentType.PHONEBOOK) {
if (intIndex < 0 || intIndex >= size) {
Log.w(TAG, "The requested vcard is not acceptable! name= " + name);
- return ResponseCodes.OBEX_HTTP_OK;
+ return ResponseCodes.OBEX_HTTP_NOT_FOUND;
} else if (intIndex == 0) {
// For PB_PATH, 0.vcf is the phone number of this phone.
String ownerVcard = mVcardManager.getOwnerPhoneNumberVcard(vcard21);
@@ -891,7 +891,7 @@ public class BluetoothPbapObexServer extends ServerRequestHandler {
} else {
if (intIndex <= 0 || intIndex > size) {
Log.w(TAG, "The requested vcard is not acceptable! name= " + name);
- return ResponseCodes.OBEX_HTTP_OK;
+ return ResponseCodes.OBEX_HTTP_NOT_FOUND;
}
// For others (ich/och/cch/mch), 0.vcf is meaningless, and must
// begin from 1.vcf