summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/map
diff options
context:
space:
mode:
authorPradeep Panigrahi <pradeepp@codeaurora.org>2013-12-18 19:39:04 +0530
committerLinux Build Service Account <lnxbuild@localhost>2014-11-04 08:25:04 -0700
commitaf027801ce88dc10d72ec064f9a65451a934beee (patch)
tree03a4529ba317fb112d87cb943e47cfa3ad75ff13 /src/com/android/bluetooth/map
parentc77a09ab28c8df2a95416c82339e12c3f043933e (diff)
downloadandroid_packages_apps_Bluetooth-af027801ce88dc10d72ec064f9a65451a934beee.tar.gz
android_packages_apps_Bluetooth-af027801ce88dc10d72ec064f9a65451a934beee.tar.bz2
android_packages_apps_Bluetooth-af027801ce88dc10d72ec064f9a65451a934beee.zip
Bluetooth: MAP: Do not set body header if maxlist count is 0
As per MAP profile spec when message listing or folder listing is done with 0 as max list count, then the response should not contain the body header. Hence add change for the same Change-Id: Idf50586ccf5616dec455cf36cb2d6edc24486e41 CRs-fixed: 590672
Diffstat (limited to 'src/com/android/bluetooth/map')
-rw-r--r--src/com/android/bluetooth/map/BluetoothMapObexServer.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapObexServer.java b/src/com/android/bluetooth/map/BluetoothMapObexServer.java
index fe2207e4e..9a092ef03 100644
--- a/src/com/android/bluetooth/map/BluetoothMapObexServer.java
+++ b/src/com/android/bluetooth/map/BluetoothMapObexServer.java
@@ -771,7 +771,9 @@ public class BluetoothMapObexServer extends ServerRequestHandler {
listSize = mOutContent.msgListingSize(folderToList, appParams);
hasUnread = mOutContent.msgListingHasUnread(folderToList, appParams);
outAppParams.setMessageListingSize(listSize);
+ Log.d(TAG, "not setting body and end of body header");
op.noBodyHeader();
+ op.noEndofBody();
}
// Build the application parameter header
@@ -864,10 +866,12 @@ public class BluetoothMapObexServer extends ServerRequestHandler {
if(maxListCount == BluetoothMapAppParams.INVALID_VALUE_PARAMETER)
maxListCount = 1024;
- if(maxListCount != 0)
- {
+ if(maxListCount != 0) {
outBytes = mCurrentFolder.encode(listStartOffset, maxListCount);
outStream = op.openOutputStream();
+ } else {
+ op.noBodyHeader();
+ op.noEndofBody();
}
// Build and set the application parameter header