Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +6 −0 Original line number Diff line number Diff line Loading @@ -2806,6 +2806,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { conn.getCall().detach(conn); removeConnection(conn); // If the call being disconnected was the pending MO call we should clear it. if (mPendingMO == conn) { mPendingMO.finalize(); mPendingMO = null; } // remove conference participants from the cached list when call is disconnected List<ConferenceParticipant> cpList = imsCall.getConferenceParticipants(); if (cpList != null) { Loading tests/telephonytests/src/com/android/internal/telephony/imsphone/ImsPhoneCallTrackerTest.java +24 −0 Original line number Diff line number Diff line Loading @@ -1902,6 +1902,30 @@ public class ImsPhoneCallTrackerTest extends TelephonyTest { } } /** * Tests the case where a dialed call has not yet moved beyond the "pending MO" phase, but the * user then disconnects. In such a case we need to ensure that the pending MO reference is * cleared so that another call can be placed. */ @Test @SmallTest public void testCallDisconnectBeforeActive() { ImsPhoneConnection connection = placeCall(); assertEquals(1, mCTUT.getConnections().size()); // Call is the pending MO right now. assertEquals(connection, mCTUT.getPendingMO()); assertEquals(Call.State.DIALING, mCTUT.mForegroundCall.getState()); assertEquals(PhoneConstants.State.OFFHOOK, mCTUT.getState()); mImsCallListener.onCallTerminated(connection.getImsCall(), new ImsReasonInfo(ImsReasonInfo.CODE_USER_TERMINATED_BY_REMOTE, 0)); // Make sure pending MO got nulled out. assertNull(mCTUT.getPendingMO()); // Try making another call; it should not fail. ImsPhoneConnection connection2 = placeCall(); } private void sendCarrierConfigChanged() { Intent intent = new Intent(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED); intent.putExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX, mPhone.getSubId()); Loading Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +6 −0 Original line number Diff line number Diff line Loading @@ -2806,6 +2806,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { conn.getCall().detach(conn); removeConnection(conn); // If the call being disconnected was the pending MO call we should clear it. if (mPendingMO == conn) { mPendingMO.finalize(); mPendingMO = null; } // remove conference participants from the cached list when call is disconnected List<ConferenceParticipant> cpList = imsCall.getConferenceParticipants(); if (cpList != null) { Loading
tests/telephonytests/src/com/android/internal/telephony/imsphone/ImsPhoneCallTrackerTest.java +24 −0 Original line number Diff line number Diff line Loading @@ -1902,6 +1902,30 @@ public class ImsPhoneCallTrackerTest extends TelephonyTest { } } /** * Tests the case where a dialed call has not yet moved beyond the "pending MO" phase, but the * user then disconnects. In such a case we need to ensure that the pending MO reference is * cleared so that another call can be placed. */ @Test @SmallTest public void testCallDisconnectBeforeActive() { ImsPhoneConnection connection = placeCall(); assertEquals(1, mCTUT.getConnections().size()); // Call is the pending MO right now. assertEquals(connection, mCTUT.getPendingMO()); assertEquals(Call.State.DIALING, mCTUT.mForegroundCall.getState()); assertEquals(PhoneConstants.State.OFFHOOK, mCTUT.getState()); mImsCallListener.onCallTerminated(connection.getImsCall(), new ImsReasonInfo(ImsReasonInfo.CODE_USER_TERMINATED_BY_REMOTE, 0)); // Make sure pending MO got nulled out. assertNull(mCTUT.getPendingMO()); // Try making another call; it should not fail. ImsPhoneConnection connection2 = placeCall(); } private void sendCarrierConfigChanged() { Intent intent = new Intent(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED); intent.putExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX, mPhone.getSubId()); Loading