summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadivel Thekkamalai <vthekk@codeaurora.org>2014-08-05 10:10:42 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-26 08:22:43 -0800
commitf50e5a75bacdba9158ac7ae1b9d89be536435a24 (patch)
tree195397d0fe45854c161c2474bf3360aa35f41677
parentddf20512704ddedf50c20f0b07152f1a7c3ee6bc (diff)
downloadandroid_frameworks_opt_bluetooth-f50e5a75bacdba9158ac7ae1b9d89be536435a24.tar.gz
android_frameworks_opt_bluetooth-f50e5a75bacdba9158ac7ae1b9d89be536435a24.tar.bz2
android_frameworks_opt_bluetooth-f50e5a75bacdba9158ac7ae1b9d89be536435a24.zip
Bluetooth: Do not disconnect pbap client session
For a dut initiated get vcard request, if the server is responding with 'Not Acceptable' response code, do not disconnect the pbap client session. It allows the user to do other pbap operations without initiating pbap connection request once again. Change-Id: Iaf8a89c7e804796904b6846a2902de919a60a5ae CRs-fixed: 691231
-rw-r--r--src/android/bluetooth/client/pbap/BluetoothPbapRequestPullVcardEntry.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/android/bluetooth/client/pbap/BluetoothPbapRequestPullVcardEntry.java b/src/android/bluetooth/client/pbap/BluetoothPbapRequestPullVcardEntry.java
index 009ec15..42b6692 100644
--- a/src/android/bluetooth/client/pbap/BluetoothPbapRequestPullVcardEntry.java
+++ b/src/android/bluetooth/client/pbap/BluetoothPbapRequestPullVcardEntry.java
@@ -71,7 +71,8 @@ final class BluetoothPbapRequestPullVcardEntry extends BluetoothPbapRequest {
Log.v(TAG, "checkResponseCode");
if (mResponse.getCount() == 0) {
- if (responseCode != ResponseCodes.OBEX_HTTP_NOT_FOUND) {
+ if (responseCode != ResponseCodes.OBEX_HTTP_NOT_FOUND &&
+ responseCode != ResponseCodes.OBEX_HTTP_NOT_ACCEPTABLE) {
throw new IOException("Invalid response received");
} else {
Log.v(TAG, "Vcard Entry not found");