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

Commit c55ff1b5 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Resolve NPE crash when BT cmpt enabled

When receiving a pkg changed intent notifying Telecom that the BT component is enabled, we were seeing fatal crashes as a result of us already having been bounded to the BT services but no ICS being connected. Prevent the NPE by checking if the key exists in the cached user to BT ICS mapping.

Bug: 422826448
Flag: EXEMPT bug fix
Test: m Telecom
Change-Id: Id0b129b50f4377b48e08303fafd41c7ab10874e5
parent 5ebcd6af
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -332,8 +332,10 @@ public class InCallController extends CallsManagerListenerBase implements

                    // Notify this new added call
                    if (mInCallServiceInfo.getType() == IN_CALL_SERVICE_TYPE_BLUETOOTH) {
                        if (mBTInCallServices.containsKey(userFromCall)) {
                            sendCallToService(call, mInCallServiceInfo, mBTInCallServices
                                    .get(userFromCall).second);
                        }
                    } else {
                        sendCallToService(call, mInCallServiceInfo,
                                mInCallServices.get(userFromCall).get(mInCallServiceInfo));