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

Commit d725700b authored by Zhihai Xu's avatar Zhihai Xu
Browse files

MAP: make MMS parsing more robust

Some devices are not following the specs correctly and send plan-text as MMS without the right headers.
This patch makes the MMS parser more robust against faulty MMS messages.
Bug: 11161383

Change-Id: Ib891f3cdc810d32082b3afe93ca18df4fcbff1be
parent 761334b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -239,11 +239,11 @@ public class BluetoothMapObexServer extends ServerRequestHandler {
            if(folderName == null || folderName.equals("")) {
                folderName = mCurrentFolder.getName();
            }
            if(!folderName.equalsIgnoreCase("outbox") && !folderName.equalsIgnoreCase("draft")) {
            folderName = folderName.toLowerCase();
            if(!folderName.equals("outbox") && !folderName.equals("draft")) {
                if(D) Log.d(TAG, "Push message only allowed to outbox and draft. folderName: " + folderName);
                return ResponseCodes.OBEX_HTTP_NOT_ACCEPTABLE;
            }
            folderName = folderName.toLowerCase();
            /*  - Read out the message
             *  - Decode into a bMessage
             *  - send it.