Loading src/java/com/android/internal/telephony/Connection.java +9 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,7 @@ public abstract class Connection { private int mPhoneType; private boolean mAnsweringDisconnectsActiveCall; private boolean mAllowAddCallDuringVideoCall; private boolean mAllowHoldingVideoCall; private boolean mIsEmergencyCall; Loading Loading @@ -1079,6 +1080,14 @@ public abstract class Connection { mAllowAddCallDuringVideoCall = allowAddCallDuringVideoCall; } public boolean shouldAllowHoldingVideoCall() { return mAllowHoldingVideoCall; } public void setAllowHoldingVideoCall(boolean allowHoldingVideoCall) { mAllowHoldingVideoCall = allowHoldingVideoCall; } /** * Sets whether the connection is the result of an external call which was pulled to the local * device. Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +34 −0 Original line number Diff line number Diff line Loading @@ -217,6 +217,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { } } conn.setAllowAddCallDuringVideoCall(mAllowAddCallDuringVideoCall); conn.setAllowHoldingVideoCall(mAllowHoldingVideoCall); addConnection(conn); setVideoCallProvider(conn, imsCall); Loading Loading @@ -469,6 +470,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { */ private boolean mAllowAddCallDuringVideoCall = true; /** * Carrier configuration option which determines whether holding a video call * should be allowed. */ private boolean mAllowHoldingVideoCall = true; /** * Carrier configuration option which determines whether to notify the connection if a handover * to wifi fails. Loading Loading @@ -830,6 +837,10 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { // if there is. checkForDialIssues(); if (!canAddVideoCallDuringImsAudioCall(videoState)) { throw new CallStateException("cannot dial in current state"); } if (isPhoneInEcmMode && isEmergencyNumber) { handleEcmTimer(ImsPhone.CANCEL_ECM_TIMER); } Loading Loading @@ -1015,6 +1026,9 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { mAllowAddCallDuringVideoCall = carrierConfig.getBoolean( CarrierConfigManager.KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL); mAllowHoldingVideoCall = carrierConfig.getBoolean( CarrierConfigManager.KEY_ALLOW_HOLDING_VIDEO_CALL_BOOL); mNotifyVtHandoverToWifiFail = carrierConfig.getBoolean( CarrierConfigManager.KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL); mSupportDowngradeVtToAudio = carrierConfig.getBoolean( Loading Loading @@ -1156,6 +1170,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { setVideoCallProvider(conn, imsCall); conn.setAllowAddCallDuringVideoCall(mAllowAddCallDuringVideoCall); conn.setAllowHoldingVideoCall(mAllowHoldingVideoCall); } catch (ImsException e) { loge("dialInternal : " + e); mOperationLocalLog.log("dialInternal exception: " + e); Loading Loading @@ -1561,6 +1576,25 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { && !mForegroundCall.isFull(); } private boolean canAddVideoCallDuringImsAudioCall(int videoState) { if (mAllowHoldingVideoCall) { return true; } ImsCall call = mForegroundCall.getImsCall(); if (call == null) { call = mBackgroundCall.getImsCall(); } boolean isImsAudioCallActiveOrHolding = (mForegroundCall.getState() == Call.State.ACTIVE || mBackgroundCall.getState() == Call.State.HOLDING) && call != null && !call.isVideoCall(); /* return TRUE if there doesn't exist ims audio call in either active or hold states */ return !isImsAudioCallActiveOrHolding || !VideoProfile.isVideo(videoState); } /** * Determines if there are issues which would preclude dialing an outgoing call. Throws a * {@link CallStateException} if there is an issue. Loading Loading
src/java/com/android/internal/telephony/Connection.java +9 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,7 @@ public abstract class Connection { private int mPhoneType; private boolean mAnsweringDisconnectsActiveCall; private boolean mAllowAddCallDuringVideoCall; private boolean mAllowHoldingVideoCall; private boolean mIsEmergencyCall; Loading Loading @@ -1079,6 +1080,14 @@ public abstract class Connection { mAllowAddCallDuringVideoCall = allowAddCallDuringVideoCall; } public boolean shouldAllowHoldingVideoCall() { return mAllowHoldingVideoCall; } public void setAllowHoldingVideoCall(boolean allowHoldingVideoCall) { mAllowHoldingVideoCall = allowHoldingVideoCall; } /** * Sets whether the connection is the result of an external call which was pulled to the local * device. Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +34 −0 Original line number Diff line number Diff line Loading @@ -217,6 +217,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { } } conn.setAllowAddCallDuringVideoCall(mAllowAddCallDuringVideoCall); conn.setAllowHoldingVideoCall(mAllowHoldingVideoCall); addConnection(conn); setVideoCallProvider(conn, imsCall); Loading Loading @@ -469,6 +470,12 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { */ private boolean mAllowAddCallDuringVideoCall = true; /** * Carrier configuration option which determines whether holding a video call * should be allowed. */ private boolean mAllowHoldingVideoCall = true; /** * Carrier configuration option which determines whether to notify the connection if a handover * to wifi fails. Loading Loading @@ -830,6 +837,10 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { // if there is. checkForDialIssues(); if (!canAddVideoCallDuringImsAudioCall(videoState)) { throw new CallStateException("cannot dial in current state"); } if (isPhoneInEcmMode && isEmergencyNumber) { handleEcmTimer(ImsPhone.CANCEL_ECM_TIMER); } Loading Loading @@ -1015,6 +1026,9 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { mAllowAddCallDuringVideoCall = carrierConfig.getBoolean( CarrierConfigManager.KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL); mAllowHoldingVideoCall = carrierConfig.getBoolean( CarrierConfigManager.KEY_ALLOW_HOLDING_VIDEO_CALL_BOOL); mNotifyVtHandoverToWifiFail = carrierConfig.getBoolean( CarrierConfigManager.KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL); mSupportDowngradeVtToAudio = carrierConfig.getBoolean( Loading Loading @@ -1156,6 +1170,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { setVideoCallProvider(conn, imsCall); conn.setAllowAddCallDuringVideoCall(mAllowAddCallDuringVideoCall); conn.setAllowHoldingVideoCall(mAllowHoldingVideoCall); } catch (ImsException e) { loge("dialInternal : " + e); mOperationLocalLog.log("dialInternal exception: " + e); Loading Loading @@ -1561,6 +1576,25 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall { && !mForegroundCall.isFull(); } private boolean canAddVideoCallDuringImsAudioCall(int videoState) { if (mAllowHoldingVideoCall) { return true; } ImsCall call = mForegroundCall.getImsCall(); if (call == null) { call = mBackgroundCall.getImsCall(); } boolean isImsAudioCallActiveOrHolding = (mForegroundCall.getState() == Call.State.ACTIVE || mBackgroundCall.getState() == Call.State.HOLDING) && call != null && !call.isVideoCall(); /* return TRUE if there doesn't exist ims audio call in either active or hold states */ return !isImsAudioCallActiveOrHolding || !VideoProfile.isVideo(videoState); } /** * Determines if there are issues which would preclude dialing an outgoing call. Throws a * {@link CallStateException} if there is an issue. Loading