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

Commit fd6e9457 authored by vnori's avatar vnori Committed by android-build-merger
Browse files

Merge "Dont crash when test devices send bad messages. tested this on master...

Merge "Dont crash when test devices send bad messages. tested this on master with go/ag/4552612" am: 5ee35baa am: 8aa30e66
am: 44ec893a

Change-Id: I46da51b4cd34fefd65e35f0142106de6f15f98dd
parents 44c048d8 44ec893a
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -456,8 +456,12 @@ final class MceStateMachine extends StateMachine {
                            Log.d(TAG, "Message Sent......." + messageHandle);
                        }
                        // ignore the top-order byte (converted to string) in the handle for now
                        // some test devices don't populate messageHandle field.
                        // in such cases, no need to wait up for response for such messages.
                        if (messageHandle != null && messageHandle.length() > 2) {
                            mSentMessageLog.put(messageHandle.substring(2),
                                    ((RequestPushMessage) message.obj).getBMsg());
                        }
                    } else if (message.obj instanceof RequestGetMessagesListing) {
                        processMessageListing((RequestGetMessagesListing) message.obj);
                    }
@@ -605,6 +609,9 @@ final class MceStateMachine extends StateMachine {
            if (DBG) {
                Log.d(TAG, "got a status for " + handle + " Status = " + status);
            }
            // some test devices don't populate messageHandle field.
            // in such cases, ignore such messages.
            if (handle == null || handle.length() <= 2) return;
            PendingIntent intentToSend = null;
            // ignore the top-order byte (converted to string) in the handle for now
            String shortHandle = handle.substring(2);