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

Commit c6363866 authored by fionaxu's avatar fionaxu Committed by Amit Mahajan
Browse files

handle NPE for findAppRequestInfoSmsIntentLocked

If this NPE happens on a binder thread (when onFilterComplete() is
called), it leaves the InboundSmsHandler state machine in a bad state as
the binder thread crashes and SMS_DELIVER intent is never broadcast. The
call flow is CarrierServicesSmsFilterCallback.onFilterComplete() ->
InboundSmsHandler.dispatchSmsDeliveryIntent() ->
AppSmsManager.handleSmsReceivedIntent() ->
AppSmsManager.findAppRequestInfoSmsIntentLocked()

Bug: 63797078
Bug: 65599291
Test: Manual
Change-Id: I06181f7ce30585d091f5ecedce8107cfc75d9dd2
(cherry picked from commit 226f2f36)
parent fc138755
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ public class AppSmsManager {
        }
        StringBuilder fullMessageBuilder = new StringBuilder();
        for (SmsMessage message : messages) {
            if (message.getMessageBody() == null) {
            if (message == null || message.getMessageBody() == null) {
                continue;
            }
            fullMessageBuilder.append(message.getMessageBody());