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

Commit af33e6d4 authored by Junyeong Bak's avatar Junyeong Bak
Browse files

Add null check for use getSimCallManagerFromCall



NPE can occur depending on the call object when connecting the generated connection service.

Test: Make a call
Bug: 151289416

Signed-off-by: default avatarJunyeong Bak <junyeong.bak@samsung.com>
Change-Id: I5ed0ad80ba05d9d43ce4403dc4f55497f7e38973
parent 31067ae2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ final class CreateConnectionTimeout extends Runnable {
        }

        // Timeout is only supported for SIM call managers that are set by the carrier.
        if (!Objects.equals(connectionManager.getComponentName(),
        if (connectionManager != null && !Objects.equals(connectionManager.getComponentName(),
                mPhoneAccountRegistrar.getSystemSimCallManagerComponent())) {
            Log.d(this, "isTimeoutNeededForCall, not a system sim call manager");
            return false;
+1 −1
Original line number Diff line number Diff line
@@ -1013,7 +1013,7 @@ public class InCallController extends CallsManagerListenerBase {
            // The call was regular but it is now external.  We must now remove it from any
            // InCallServices which do not support external calls.
            // Remove the call by sending a call update indicating the call was disconnected.
            Log.i(this, "Removing external call %", call);
            Log.i(this, "Removing external call %s", call);
            for (Map.Entry<InCallServiceInfo, IInCallService> entry : mInCallServices.entrySet()) {
                InCallServiceInfo info = entry.getKey();
                if (info.isExternalCallsSupported()) {
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.server.telecom;

import android.Manifest;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -493,6 +494,7 @@ public class PhoneAccountRegistrar {
     * target phone account.
     * @return phone account handle of sim call manager based on the ongoing call.
     */
    @Nullable
    public PhoneAccountHandle getSimCallManagerFromCall(Call call) {
        if (call == null) {
            return null;