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

Commit 647eda72 authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Improve logging for multi-part messages for debugging.

Test: TH
Bug: 153609812
Change-Id: I177ac64406a07e47cfb77995d179751231a6da0c
parent 174e1b01
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -900,8 +900,9 @@ public abstract class InboundSmsHandler extends StateMachine {
                    // earlier segments. In that case, the broadcast will be sent as soon as all
                    // segments are in the table, and any later EVENT_BROADCAST_SMS messages will
                    // get a row count of 0 and return.
                    log("processMessagePart: returning false, as not all parts of the message"
                            + " have arrived", tracker.getMessageId());
                    log("processMessagePart: returning false. Only " + cursorCount + " of "
                            + messageCount + " segments " + " have arrived. refNumber: "
                            + refNumber, tracker.getMessageId());
                    return false;
                }

@@ -957,6 +958,8 @@ public abstract class InboundSmsHandler extends StateMachine {
                                        .get(DISPLAY_ADDRESS_COLUMN)), null);
                    }
                }
                log("processMessagePart: all " + messageCount + " segments "
                        + " received. refNumber: " + refNumber, tracker.getMessageId());
            } catch (SQLException e) {
                loge("processMessagePart: Can't access multipart SMS database, id: "
                        + tracker.getMessageId(), e);