Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8565c555 authored by Pradeep Panigrahi's avatar Pradeep Panigrahi Committed by Gerrit - the friendly Code Review server
Browse files

Bluetooth: MAP: Not doing Message listing when proper folder is not set

Add change to do message listing of any folder, only if it is a
subfolder of the current folder and not do message listing otherwise.
Without this change we were able to do message listing of any folder
irrespective of the current folder.

Change-Id: I1c2e703b287ab61fdfb1e852ea82c4d4174bc70b
CRs-fixed: 577982
parent 9401899b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ public class BluetoothMapFolderElement {
     */
    public BluetoothMapFolderElement getSubFolder(String folderName){
        for(BluetoothMapFolderElement subFolder : subFolders){
            if(subFolder.getName().equals(folderName))
            if(subFolder.getName().equalsIgnoreCase(folderName))
                return subFolder;
        }
        return null;
+5 −0
Original line number Diff line number Diff line
@@ -503,6 +503,11 @@ public class BluetoothMapObexServer extends ServerRequestHandler {
        if(folderName == null) {
            folderName = mCurrentFolder.getName();
        }
        Log.d(TAG, "sendMessageListingRsp for folder " +folderName);
        if(mCurrentFolder.getSubFolder(folderName) == null) {
            Log.d(TAG, "Proper Path not set. returning from here");
            return ResponseCodes.OBEX_HTTP_BAD_REQUEST;
        }
        if(appParams == null){
            appParams = new BluetoothMapAppParams();
            appParams.setMaxListCount(1024);