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

Commit e818b304 authored by Grace Jia's avatar Grace Jia Committed by Automerger Merge Worker
Browse files

Merge "Fix NullPointerException in ImsPhone when send EVNET_CALL_RING_CONTINUE...

Merge "Fix NullPointerException in ImsPhone when send EVNET_CALL_RING_CONTINUE message." am: 983b27b5 am: f5304430 am: 5d31de08

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1506595

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6ec0b8a6a2bb66921794d71a0546df9a97f5ef47
parents 153713aa 5d31de08
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1770,7 +1770,7 @@ public class ImsPhone extends ImsPhoneBase {
        AsyncResult ar = (AsyncResult) msg.obj;
        Message onComplete;
        SS ss = null;
        if (ar.userObj instanceof SS) {
        if (ar != null && ar.userObj instanceof SS) {
            ss = (SS) ar.userObj;
        }

+8 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ public class ImsPhoneTest extends TelephonyTest {
    private static final int EVENT_SUPP_SERVICE_FAILED = 2;
    private static final int EVENT_INCOMING_RING = 3;
    private static final int EVENT_EMERGENCY_CALLBACK_MODE_EXIT = 4;
    private static final int EVENT_CALL_RING_CONTINUE = 15;

    private boolean mIsPhoneUtInEcm = false;

@@ -950,6 +951,13 @@ public class ImsPhoneTest extends TelephonyTest {
        verify(mImsCT).sendUSSD(eq("*135#"), any());
    }

    @Test
    @SmallTest
    public void testHandleMessageCallRingContinue() throws Exception {
        Message m = Message.obtain(mImsPhoneUT.getHandler(), EVENT_CALL_RING_CONTINUE);
        mImsPhoneUT.handleMessage(m);
    }

    private ServiceState getServiceStateDataAndVoice(int rat, int regState, boolean isRoaming) {
        ServiceState ss = new ServiceState();
        ss.setStateOutOfService();