Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +7 −5 Original line number Diff line number Diff line Loading @@ -1335,9 +1335,15 @@ public class GsmCdmaPhone extends Phone { } TelephonyManager tm = mContext.getSystemService(TelephonyManager.class); boolean isEmergency = tm.isEmergencyNumber(dialString); /** Check if the call is Wireless Priority Service call */ boolean isWpsCall = dialString != null ? (dialString.startsWith(PREFIX_WPS) || dialString.startsWith(PREFIX_WPS_CLIR_ACTIVATE) || dialString.startsWith(PREFIX_WPS_CLIR_DEACTIVATE)) : false; ImsPhone.ImsDialArgs.Builder imsDialArgsBuilder; imsDialArgsBuilder = ImsPhone.ImsDialArgs.Builder.from(dialArgs) .setIsEmergency(isEmergency); .setIsEmergency(isEmergency) .setIsWpsCall(isWpsCall); mDialArgs = dialArgs = imsDialArgsBuilder.build(); Phone imsPhone = mImsPhone; Loading @@ -1345,10 +1351,6 @@ public class GsmCdmaPhone extends Phone { CarrierConfigManager configManager = (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE); /** Check if the call is Wireless Priority Service call */ boolean isWpsCall = dialString != null ? (dialString.startsWith(PREFIX_WPS) || dialString.startsWith(PREFIX_WPS_CLIR_ACTIVATE) || dialString.startsWith(PREFIX_WPS_CLIR_DEACTIVATE)) : false; boolean allowWpsOverIms = configManager.getConfigForSubId(getSubId()) .getBoolean(CarrierConfigManager.KEY_SUPPORT_WPS_OVER_IMS_BOOL); Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +12 −1 Original line number Diff line number Diff line Loading @@ -170,6 +170,7 @@ public class ImsPhone extends ImsPhoneBase { private android.telecom.Connection.RttTextStream mRttTextStream; private int mRetryCallFailCause = ImsReasonInfo.CODE_UNSPECIFIED; private int mRetryCallFailNetworkType = TelephonyManager.NETWORK_TYPE_UNKNOWN; private boolean mIsWpsCall = false; public static ImsDialArgs.Builder from(DialArgs dialArgs) { if (dialArgs instanceof ImsDialArgs) { Loading @@ -182,7 +183,8 @@ public class ImsPhone extends ImsPhoneBase { .setClirMode(dialArgs.clirMode) .setRetryCallFailCause(((ImsDialArgs)dialArgs).retryCallFailCause) .setRetryCallFailNetworkType( ((ImsDialArgs)dialArgs).retryCallFailNetworkType); ((ImsDialArgs)dialArgs).retryCallFailNetworkType) .setIsWpsCall(((ImsDialArgs)dialArgs).isWpsCall); } return new ImsDialArgs.Builder() .setUusInfo(dialArgs.uusInfo) Loading @@ -208,6 +210,11 @@ public class ImsPhone extends ImsPhoneBase { return this; } public ImsDialArgs.Builder setIsWpsCall(boolean isWpsCall) { this.mIsWpsCall = isWpsCall; return this; } public ImsDialArgs build() { return new ImsDialArgs(this); } Loading @@ -222,11 +229,15 @@ public class ImsPhone extends ImsPhoneBase { public final int retryCallFailCause; public final int retryCallFailNetworkType; /** Indicates the call is Wireless Priority Service call */ public final boolean isWpsCall; private ImsDialArgs(ImsDialArgs.Builder b) { super(b); this.rttTextStream = b.mRttTextStream; this.retryCallFailCause = b.mRetryCallFailCause; this.retryCallFailNetworkType = b.mRetryCallFailNetworkType; this.isWpsCall = b.mIsWpsCall; } } Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +43 −6 Original line number Diff line number Diff line Loading @@ -871,6 +871,8 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { */ private boolean mShouldUpdateImsConfigOnDisconnect = false; private Pair<Boolean, Integer> mPendingSilentRedialInfo = null; /** * Default implementation for retrieving shared preferences; uses the actual PreferencesManager. */ Loading Loading @@ -1277,6 +1279,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { throws CallStateException { boolean isPhoneInEcmMode = isPhoneInEcbMode(); boolean isEmergencyNumber = dialArgs.isEmergency; boolean isWpsCall = dialArgs.isWpsCall; if (!shouldNumberBePlacedOnIms(isEmergencyNumber, dialString)) { Rlog.i(LOG_TAG, "dial: shouldNumberBePlacedOnIms = false"); Loading Loading @@ -1319,7 +1322,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { mLastDialString = dialString; mLastDialArgs = dialArgs; mPendingMO = new ImsPhoneConnection(mPhone, dialString, this, mForegroundCall, isEmergencyNumber); isEmergencyNumber, isWpsCall); if (isEmergencyNumber && dialArgs != null && dialArgs.intentExtras != null) { Rlog.i(LOG_TAG, "dial ims emergency dialer: " + dialArgs.intentExtras.getBoolean( TelecomManager.EXTRA_IS_USER_INTENT_EMERGENCY_CALL)); Loading Loading @@ -2941,15 +2944,27 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { if (mPendingMO != null) { // To initiate dialing circuit-switched call if (reasonInfo.getCode() == ImsReasonInfo.CODE_LOCAL_CALL_CS_RETRY_REQUIRED && mBackgroundCall.getState() == ImsPhoneCall.State.IDLE && mRingingCall.getState() == ImsPhoneCall.State.IDLE) { && mRingingCall.getState() == ImsPhoneCall.State.IDLE && isForegroundHigherPriority()) { mForegroundCall.detach(mPendingMO); removeConnection(mPendingMO); mPendingMO.finalize(); mPendingMO = null; // if we need to perform CSFB of call, hang up any background call // before redialing if it is a lower priority. if (mBackgroundCall.getState().isAlive()) { try { hangup(mBackgroundCall); mPendingSilentRedialInfo = new Pair<>(reasonInfo.getExtraCode() == ImsReasonInfo.EXTRA_CODE_CALL_RETRY_EMERGENCY, eccCategory); } catch (CallStateException ex) { mPendingSilentRedialInfo = null; } } else { updatePhoneState(); mPhone.initiateSilentRedial(reasonInfo.getExtraCode() == ImsReasonInfo.EXTRA_CODE_CALL_RETRY_EMERGENCY, eccCategory); } return; } else { sendCallStartFailedDisconnect(imsCall, reasonInfo); Loading Loading @@ -3157,6 +3172,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { } mShouldUpdateImsConfigOnDisconnect = false; } if (mPendingSilentRedialInfo != null) { mPhone.initiateSilentRedial(mPendingSilentRedialInfo.first, mPendingSilentRedialInfo.second); mPendingSilentRedialInfo = null; } } @Override Loading Loading @@ -5088,4 +5109,20 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { } mPhone.notifySuppServiceFailed(Phone.SuppService.CONFERENCE); } /** * Calculate whether CSFB or not with fg call type and bg call type. * @return {@code true} if bg call is not alive or fg call has higher score than bg call. */ private boolean isForegroundHigherPriority() { if (!mBackgroundCall.getState().isAlive()) { return true; } ImsPhoneConnection fgConnection = mForegroundCall.getFirstConnection(); ImsPhoneConnection bgConnection = mBackgroundCall.getFirstConnection(); if (fgConnection.getCallPriority() > bgConnection.getCallPriority()) { return true; } return false; } } src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java +21 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,8 @@ public class ImsPhoneConnection extends Connection implements private boolean mIsEmergency = false; private boolean mIsWpsCall = false; /** * Used to indicate that video state changes detected by * {@link #updateMediaCapabilities(ImsCall)} should be ignored. When a video state change from Loading Loading @@ -231,7 +233,7 @@ public class ImsPhoneConnection extends Connection implements /** This is an MO call, created when dialing */ public ImsPhoneConnection(Phone phone, String dialString, ImsPhoneCallTracker ct, ImsPhoneCall parent, boolean isEmergency) { ImsPhoneCall parent, boolean isEmergency, boolean isWpsCall) { super(PhoneConstants.PHONE_TYPE_IMS); createWakeLock(phone.getContext()); acquireWakeLock(); Loading Loading @@ -261,6 +263,8 @@ public class ImsPhoneConnection extends Connection implements setEmergencyCallInfo(mOwner); } mIsWpsCall = isWpsCall; fetchDtmfToneDelay(phone); if (phone.getContext().getResources().getBoolean( Loading Loading @@ -1411,6 +1415,10 @@ public class ImsPhoneConnection extends Connection implements return mIsEmergency; } protected boolean isWpsCall() { return mIsWpsCall; } /** * Handles notifications from the {@link ImsVideoCallProviderWrapper} of session modification * responses received. Loading Loading @@ -1578,4 +1586,16 @@ public class ImsPhoneConnection extends Connection implements return android.telecom.Connection.VERIFICATION_STATUS_NOT_VERIFIED; } } /** * The priority of the call to the user. A higher number means higher priority. */ protected int getCallPriority() { if (isEmergency()) { return 2; } else if (isWpsCall()) { return 1; } return 0; } } tests/telephonytests/src/com/android/internal/telephony/imsphone/ImsPhoneConnectionTest.java +8 −8 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { logd("Testing initial state of MO ImsPhoneConnection"); mConnectionUT = new ImsPhoneConnection(mImsPhone, String.format("+1 (700).555-41NN%c1234", PhoneNumberUtils.PAUSE), mImsCT, mForeGroundCall, false); PhoneNumberUtils.PAUSE), mImsCT, mForeGroundCall, false, false); assertEquals(PhoneConstants.PRESENTATION_ALLOWED, mConnectionUT.getNumberPresentation()); assertEquals(PhoneConstants.PRESENTATION_ALLOWED, mConnectionUT.getCnapNamePresentation()); assertEquals("+1 (700).555-41NN,1234", mConnectionUT.getOrigDialString()); Loading @@ -140,7 +140,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { public void testImsUpdateStateForeGround() { // MO Foreground Connection dailing -> active mConnectionUT = new ImsPhoneConnection(mImsPhone, "+1 (700).555-41NN1234", mImsCT, mForeGroundCall, false); mForeGroundCall, false, false); // initially in dialing state doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); assertTrue(mConnectionUT.update(mImsCall, Call.State.ACTIVE)); Loading @@ -155,7 +155,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { public void testUpdateCodec() { // MO Foreground Connection dailing -> active mConnectionUT = new ImsPhoneConnection(mImsPhone, "+1 (700).555-41NN1234", mImsCT, mForeGroundCall, false); mForeGroundCall, false, false); doReturn(Call.State.ACTIVE).when(mForeGroundCall).getState(); assertTrue(mConnectionUT.updateMediaCapabilities(mImsCall)); } Loading @@ -178,7 +178,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { @SmallTest public void testImsUpdateStatePendingHold() { mConnectionUT = new ImsPhoneConnection(mImsPhone, "+1 (700).555-41NN1234", mImsCT, mForeGroundCall, false); mForeGroundCall, false, false); doReturn(true).when(mImsCall).isPendingHold(); assertFalse(mConnectionUT.update(mImsCall, Call.State.ACTIVE)); verify(mForeGroundCall, times(0)).update(eq(mConnectionUT), eq(mImsCall), Loading Loading @@ -223,7 +223,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { @SmallTest public void testPostDialWait() { mConnectionUT = new ImsPhoneConnection(mImsPhone, String.format("+1 (700).555-41NN%c1234", PhoneNumberUtils.WAIT), mImsCT, mForeGroundCall, false); PhoneNumberUtils.WAIT), mImsCT, mForeGroundCall, false, false); doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); doAnswer(new Answer() { @Override Loading @@ -246,7 +246,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { @MediumTest public void testPostDialPause() { mConnectionUT = new ImsPhoneConnection(mImsPhone, String.format("+1 (700).555-41NN%c1234", PhoneNumberUtils.PAUSE), mImsCT, mForeGroundCall, false); PhoneNumberUtils.PAUSE), mImsCT, mForeGroundCall, false, false); doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); doAnswer(new Answer() { @Override Loading Loading @@ -374,7 +374,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { {"12345*00000", "12346", "12346"}}; for (String[] testAddress : testAddressMappingSet) { mConnectionUT = new ImsPhoneConnection(mImsPhone, testAddress[0], mImsCT, mForeGroundCall, false); mForeGroundCall, false, false); mConnectionUT.setIsIncoming(true); mImsCallProfile.setCallExtra(ImsCallProfile.EXTRA_OI, testAddress[1]); mConnectionUT.updateAddressDisplay(mImsCall); Loading @@ -392,7 +392,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { String updateAddress = "6789"; mConnectionUT = new ImsPhoneConnection(mImsPhone, inputAddress, mImsCT, mForeGroundCall, false); false, false); mConnectionUT.setIsIncoming(false); mImsCallProfile.setCallExtra(ImsCallProfile.EXTRA_OI, updateAddress); mConnectionUT.updateAddressDisplay(mImsCall); Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +7 −5 Original line number Diff line number Diff line Loading @@ -1335,9 +1335,15 @@ public class GsmCdmaPhone extends Phone { } TelephonyManager tm = mContext.getSystemService(TelephonyManager.class); boolean isEmergency = tm.isEmergencyNumber(dialString); /** Check if the call is Wireless Priority Service call */ boolean isWpsCall = dialString != null ? (dialString.startsWith(PREFIX_WPS) || dialString.startsWith(PREFIX_WPS_CLIR_ACTIVATE) || dialString.startsWith(PREFIX_WPS_CLIR_DEACTIVATE)) : false; ImsPhone.ImsDialArgs.Builder imsDialArgsBuilder; imsDialArgsBuilder = ImsPhone.ImsDialArgs.Builder.from(dialArgs) .setIsEmergency(isEmergency); .setIsEmergency(isEmergency) .setIsWpsCall(isWpsCall); mDialArgs = dialArgs = imsDialArgsBuilder.build(); Phone imsPhone = mImsPhone; Loading @@ -1345,10 +1351,6 @@ public class GsmCdmaPhone extends Phone { CarrierConfigManager configManager = (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE); /** Check if the call is Wireless Priority Service call */ boolean isWpsCall = dialString != null ? (dialString.startsWith(PREFIX_WPS) || dialString.startsWith(PREFIX_WPS_CLIR_ACTIVATE) || dialString.startsWith(PREFIX_WPS_CLIR_DEACTIVATE)) : false; boolean allowWpsOverIms = configManager.getConfigForSubId(getSubId()) .getBoolean(CarrierConfigManager.KEY_SUPPORT_WPS_OVER_IMS_BOOL); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +12 −1 Original line number Diff line number Diff line Loading @@ -170,6 +170,7 @@ public class ImsPhone extends ImsPhoneBase { private android.telecom.Connection.RttTextStream mRttTextStream; private int mRetryCallFailCause = ImsReasonInfo.CODE_UNSPECIFIED; private int mRetryCallFailNetworkType = TelephonyManager.NETWORK_TYPE_UNKNOWN; private boolean mIsWpsCall = false; public static ImsDialArgs.Builder from(DialArgs dialArgs) { if (dialArgs instanceof ImsDialArgs) { Loading @@ -182,7 +183,8 @@ public class ImsPhone extends ImsPhoneBase { .setClirMode(dialArgs.clirMode) .setRetryCallFailCause(((ImsDialArgs)dialArgs).retryCallFailCause) .setRetryCallFailNetworkType( ((ImsDialArgs)dialArgs).retryCallFailNetworkType); ((ImsDialArgs)dialArgs).retryCallFailNetworkType) .setIsWpsCall(((ImsDialArgs)dialArgs).isWpsCall); } return new ImsDialArgs.Builder() .setUusInfo(dialArgs.uusInfo) Loading @@ -208,6 +210,11 @@ public class ImsPhone extends ImsPhoneBase { return this; } public ImsDialArgs.Builder setIsWpsCall(boolean isWpsCall) { this.mIsWpsCall = isWpsCall; return this; } public ImsDialArgs build() { return new ImsDialArgs(this); } Loading @@ -222,11 +229,15 @@ public class ImsPhone extends ImsPhoneBase { public final int retryCallFailCause; public final int retryCallFailNetworkType; /** Indicates the call is Wireless Priority Service call */ public final boolean isWpsCall; private ImsDialArgs(ImsDialArgs.Builder b) { super(b); this.rttTextStream = b.mRttTextStream; this.retryCallFailCause = b.mRetryCallFailCause; this.retryCallFailNetworkType = b.mRetryCallFailNetworkType; this.isWpsCall = b.mIsWpsCall; } } Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +43 −6 Original line number Diff line number Diff line Loading @@ -871,6 +871,8 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { */ private boolean mShouldUpdateImsConfigOnDisconnect = false; private Pair<Boolean, Integer> mPendingSilentRedialInfo = null; /** * Default implementation for retrieving shared preferences; uses the actual PreferencesManager. */ Loading Loading @@ -1277,6 +1279,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { throws CallStateException { boolean isPhoneInEcmMode = isPhoneInEcbMode(); boolean isEmergencyNumber = dialArgs.isEmergency; boolean isWpsCall = dialArgs.isWpsCall; if (!shouldNumberBePlacedOnIms(isEmergencyNumber, dialString)) { Rlog.i(LOG_TAG, "dial: shouldNumberBePlacedOnIms = false"); Loading Loading @@ -1319,7 +1322,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { mLastDialString = dialString; mLastDialArgs = dialArgs; mPendingMO = new ImsPhoneConnection(mPhone, dialString, this, mForegroundCall, isEmergencyNumber); isEmergencyNumber, isWpsCall); if (isEmergencyNumber && dialArgs != null && dialArgs.intentExtras != null) { Rlog.i(LOG_TAG, "dial ims emergency dialer: " + dialArgs.intentExtras.getBoolean( TelecomManager.EXTRA_IS_USER_INTENT_EMERGENCY_CALL)); Loading Loading @@ -2941,15 +2944,27 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { if (mPendingMO != null) { // To initiate dialing circuit-switched call if (reasonInfo.getCode() == ImsReasonInfo.CODE_LOCAL_CALL_CS_RETRY_REQUIRED && mBackgroundCall.getState() == ImsPhoneCall.State.IDLE && mRingingCall.getState() == ImsPhoneCall.State.IDLE) { && mRingingCall.getState() == ImsPhoneCall.State.IDLE && isForegroundHigherPriority()) { mForegroundCall.detach(mPendingMO); removeConnection(mPendingMO); mPendingMO.finalize(); mPendingMO = null; // if we need to perform CSFB of call, hang up any background call // before redialing if it is a lower priority. if (mBackgroundCall.getState().isAlive()) { try { hangup(mBackgroundCall); mPendingSilentRedialInfo = new Pair<>(reasonInfo.getExtraCode() == ImsReasonInfo.EXTRA_CODE_CALL_RETRY_EMERGENCY, eccCategory); } catch (CallStateException ex) { mPendingSilentRedialInfo = null; } } else { updatePhoneState(); mPhone.initiateSilentRedial(reasonInfo.getExtraCode() == ImsReasonInfo.EXTRA_CODE_CALL_RETRY_EMERGENCY, eccCategory); } return; } else { sendCallStartFailedDisconnect(imsCall, reasonInfo); Loading Loading @@ -3157,6 +3172,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { } mShouldUpdateImsConfigOnDisconnect = false; } if (mPendingSilentRedialInfo != null) { mPhone.initiateSilentRedial(mPendingSilentRedialInfo.first, mPendingSilentRedialInfo.second); mPendingSilentRedialInfo = null; } } @Override Loading Loading @@ -5088,4 +5109,20 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { } mPhone.notifySuppServiceFailed(Phone.SuppService.CONFERENCE); } /** * Calculate whether CSFB or not with fg call type and bg call type. * @return {@code true} if bg call is not alive or fg call has higher score than bg call. */ private boolean isForegroundHigherPriority() { if (!mBackgroundCall.getState().isAlive()) { return true; } ImsPhoneConnection fgConnection = mForegroundCall.getFirstConnection(); ImsPhoneConnection bgConnection = mBackgroundCall.getFirstConnection(); if (fgConnection.getCallPriority() > bgConnection.getCallPriority()) { return true; } return false; } }
src/java/com/android/internal/telephony/imsphone/ImsPhoneConnection.java +21 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,8 @@ public class ImsPhoneConnection extends Connection implements private boolean mIsEmergency = false; private boolean mIsWpsCall = false; /** * Used to indicate that video state changes detected by * {@link #updateMediaCapabilities(ImsCall)} should be ignored. When a video state change from Loading Loading @@ -231,7 +233,7 @@ public class ImsPhoneConnection extends Connection implements /** This is an MO call, created when dialing */ public ImsPhoneConnection(Phone phone, String dialString, ImsPhoneCallTracker ct, ImsPhoneCall parent, boolean isEmergency) { ImsPhoneCall parent, boolean isEmergency, boolean isWpsCall) { super(PhoneConstants.PHONE_TYPE_IMS); createWakeLock(phone.getContext()); acquireWakeLock(); Loading Loading @@ -261,6 +263,8 @@ public class ImsPhoneConnection extends Connection implements setEmergencyCallInfo(mOwner); } mIsWpsCall = isWpsCall; fetchDtmfToneDelay(phone); if (phone.getContext().getResources().getBoolean( Loading Loading @@ -1411,6 +1415,10 @@ public class ImsPhoneConnection extends Connection implements return mIsEmergency; } protected boolean isWpsCall() { return mIsWpsCall; } /** * Handles notifications from the {@link ImsVideoCallProviderWrapper} of session modification * responses received. Loading Loading @@ -1578,4 +1586,16 @@ public class ImsPhoneConnection extends Connection implements return android.telecom.Connection.VERIFICATION_STATUS_NOT_VERIFIED; } } /** * The priority of the call to the user. A higher number means higher priority. */ protected int getCallPriority() { if (isEmergency()) { return 2; } else if (isWpsCall()) { return 1; } return 0; } }
tests/telephonytests/src/com/android/internal/telephony/imsphone/ImsPhoneConnectionTest.java +8 −8 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { logd("Testing initial state of MO ImsPhoneConnection"); mConnectionUT = new ImsPhoneConnection(mImsPhone, String.format("+1 (700).555-41NN%c1234", PhoneNumberUtils.PAUSE), mImsCT, mForeGroundCall, false); PhoneNumberUtils.PAUSE), mImsCT, mForeGroundCall, false, false); assertEquals(PhoneConstants.PRESENTATION_ALLOWED, mConnectionUT.getNumberPresentation()); assertEquals(PhoneConstants.PRESENTATION_ALLOWED, mConnectionUT.getCnapNamePresentation()); assertEquals("+1 (700).555-41NN,1234", mConnectionUT.getOrigDialString()); Loading @@ -140,7 +140,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { public void testImsUpdateStateForeGround() { // MO Foreground Connection dailing -> active mConnectionUT = new ImsPhoneConnection(mImsPhone, "+1 (700).555-41NN1234", mImsCT, mForeGroundCall, false); mForeGroundCall, false, false); // initially in dialing state doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); assertTrue(mConnectionUT.update(mImsCall, Call.State.ACTIVE)); Loading @@ -155,7 +155,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { public void testUpdateCodec() { // MO Foreground Connection dailing -> active mConnectionUT = new ImsPhoneConnection(mImsPhone, "+1 (700).555-41NN1234", mImsCT, mForeGroundCall, false); mForeGroundCall, false, false); doReturn(Call.State.ACTIVE).when(mForeGroundCall).getState(); assertTrue(mConnectionUT.updateMediaCapabilities(mImsCall)); } Loading @@ -178,7 +178,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { @SmallTest public void testImsUpdateStatePendingHold() { mConnectionUT = new ImsPhoneConnection(mImsPhone, "+1 (700).555-41NN1234", mImsCT, mForeGroundCall, false); mForeGroundCall, false, false); doReturn(true).when(mImsCall).isPendingHold(); assertFalse(mConnectionUT.update(mImsCall, Call.State.ACTIVE)); verify(mForeGroundCall, times(0)).update(eq(mConnectionUT), eq(mImsCall), Loading Loading @@ -223,7 +223,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { @SmallTest public void testPostDialWait() { mConnectionUT = new ImsPhoneConnection(mImsPhone, String.format("+1 (700).555-41NN%c1234", PhoneNumberUtils.WAIT), mImsCT, mForeGroundCall, false); PhoneNumberUtils.WAIT), mImsCT, mForeGroundCall, false, false); doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); doAnswer(new Answer() { @Override Loading @@ -246,7 +246,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { @MediumTest public void testPostDialPause() { mConnectionUT = new ImsPhoneConnection(mImsPhone, String.format("+1 (700).555-41NN%c1234", PhoneNumberUtils.PAUSE), mImsCT, mForeGroundCall, false); PhoneNumberUtils.PAUSE), mImsCT, mForeGroundCall, false, false); doReturn(Call.State.DIALING).when(mForeGroundCall).getState(); doAnswer(new Answer() { @Override Loading Loading @@ -374,7 +374,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { {"12345*00000", "12346", "12346"}}; for (String[] testAddress : testAddressMappingSet) { mConnectionUT = new ImsPhoneConnection(mImsPhone, testAddress[0], mImsCT, mForeGroundCall, false); mForeGroundCall, false, false); mConnectionUT.setIsIncoming(true); mImsCallProfile.setCallExtra(ImsCallProfile.EXTRA_OI, testAddress[1]); mConnectionUT.updateAddressDisplay(mImsCall); Loading @@ -392,7 +392,7 @@ public class ImsPhoneConnectionTest extends TelephonyTest { String updateAddress = "6789"; mConnectionUT = new ImsPhoneConnection(mImsPhone, inputAddress, mImsCT, mForeGroundCall, false); false, false); mConnectionUT.setIsIncoming(false); mImsCallProfile.setCallExtra(ImsCallProfile.EXTRA_OI, updateAddress); mConnectionUT.updateAddressDisplay(mImsCall); Loading