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

Commit 65d863e4 authored by Ashwini Munigala's avatar Ashwini Munigala
Browse files

MAP: PushMessage Email parsing issue

Handle illFormated BMessage email parsing
issue for not rfc822 complaint body format.

Change-Id: I0370d63f0042ce59a947dcc72d19f7c1ec8ea3bb
CRs-fixed: 752501
parent 69a644f7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -749,7 +749,8 @@ public class BluetoothMapbMessageMmsEmail extends BluetoothMapbMessage {
               if (beginMsg == -1) {
                   throw new IllegalArgumentException("Ill-formatted bMessage, no BEGIN:MSG");
               }
               int endMsg = body.lastIndexOf("END:MSG", beginMsg);
               //Last occurence of END:MSG
               int endMsg = body.lastIndexOf("END:MSG");
               if (endMsg == -1) {
                   throw new IllegalArgumentException("Ill-formatted bMessage, no END:MSG");
               }
@@ -764,7 +765,8 @@ public class BluetoothMapbMessageMmsEmail extends BluetoothMapbMessage {
       int endVersionPos;
       if(rfc822Flag == 0){
          if(mimeFlag == 0) {
             endVersionPos = body.lastIndexOf("END:MSG", beginVersionPos) ;
             //Last occurence of END:MSG
             endVersionPos = body.lastIndexOf("END:MSG") ;
             if (endVersionPos != -1) {
                 setEmailBody(body.substring(beginVersionPos, (endVersionPos - CRLF.length())));
             } else {