Loading src/java/com/android/internal/telephony/CallManager.java +24 −1 Original line number Diff line number Diff line Loading @@ -610,8 +610,27 @@ public class CallManager { * @exception CallStateException when call is not ringing or waiting */ public void acceptCall(Call ringingCall) throws CallStateException { acceptCall(ringingCall, Phone.CALL_TYPE_VOICE); } /** * Answers a ringing or waiting call, with an option to downgrade a Video * call Active call, if any, go on hold. If active call can't be held, i.e., * a background call of the same channel exists, the active call will be * hang up. Answering occurs asynchronously, and final notification occurs * via * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, java.lang.Object) * registerForPreciseCallStateChanged()}. * * @param ringingCall The call to answer * @param callType The call type to use to answer the call. Values from * Phone.RIL_CALL_TYPE * @exception CallStateException when call is not ringing or waiting */ public void acceptCall(Call ringingCall, int callType) throws CallStateException { Phone ringingPhone = ringingCall.getPhone(); if (VDBG) { Rlog.d(LOG_TAG, "acceptCall api with calltype " + callType); Rlog.d(LOG_TAG, "acceptCall(" + ringingCall + " from " + ringingCall.getPhone() + ")"); Rlog.d(LOG_TAG, toString()); } Loading Loading @@ -651,7 +670,11 @@ public class CallManager { } } if (ringingPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) { ringingPhone.acceptCall(callType); } else { ringingPhone.acceptCall(); } if (VDBG) { Rlog.d(LOG_TAG, "End acceptCall(" +ringingCall + ")"); Loading src/java/com/android/internal/telephony/Phone.java +10 −0 Original line number Diff line number Diff line Loading @@ -709,6 +709,16 @@ public interface Phone { */ void acceptCall() throws CallStateException; /** * Answers a ringing or waiting call. Active calls, if any, go on hold. * Answering occurs asynchronously, and final notification occurs via * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, * java.lang.Object) registerForPreciseCallStateChanged()}. * * @exception CallStateException when no call is ringing or waiting */ void acceptCall(int callType) throws CallStateException; /** * Gets call type for IMS calls. * Loading src/java/com/android/internal/telephony/PhoneBase.java +5 −0 Original line number Diff line number Diff line Loading @@ -1500,6 +1500,11 @@ public abstract class PhoneBase extends Handler implements Phone { return mCi.getRadioState().isOn(); } // IMS APIs - Implemented only in ImsPhone public void acceptCall(int callType) throws CallStateException { throw new CallStateException("Accept with CallType is not supported in this phone " + this); } public int getCallType(Call call) throws CallStateException { throw new CallStateException("getCallType is not supported in this phone " + this); } Loading src/java/com/android/internal/telephony/PhoneProxy.java +5 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,11 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.acceptCall(); } @Override public void acceptCall(int callType) throws CallStateException { mActivePhone.acceptCall(callType); } @Override public int getCallType(Call call) throws CallStateException { return mActivePhone.getCallType(call); Loading Loading
src/java/com/android/internal/telephony/CallManager.java +24 −1 Original line number Diff line number Diff line Loading @@ -610,8 +610,27 @@ public class CallManager { * @exception CallStateException when call is not ringing or waiting */ public void acceptCall(Call ringingCall) throws CallStateException { acceptCall(ringingCall, Phone.CALL_TYPE_VOICE); } /** * Answers a ringing or waiting call, with an option to downgrade a Video * call Active call, if any, go on hold. If active call can't be held, i.e., * a background call of the same channel exists, the active call will be * hang up. Answering occurs asynchronously, and final notification occurs * via * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, java.lang.Object) * registerForPreciseCallStateChanged()}. * * @param ringingCall The call to answer * @param callType The call type to use to answer the call. Values from * Phone.RIL_CALL_TYPE * @exception CallStateException when call is not ringing or waiting */ public void acceptCall(Call ringingCall, int callType) throws CallStateException { Phone ringingPhone = ringingCall.getPhone(); if (VDBG) { Rlog.d(LOG_TAG, "acceptCall api with calltype " + callType); Rlog.d(LOG_TAG, "acceptCall(" + ringingCall + " from " + ringingCall.getPhone() + ")"); Rlog.d(LOG_TAG, toString()); } Loading Loading @@ -651,7 +670,11 @@ public class CallManager { } } if (ringingPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) { ringingPhone.acceptCall(callType); } else { ringingPhone.acceptCall(); } if (VDBG) { Rlog.d(LOG_TAG, "End acceptCall(" +ringingCall + ")"); Loading
src/java/com/android/internal/telephony/Phone.java +10 −0 Original line number Diff line number Diff line Loading @@ -709,6 +709,16 @@ public interface Phone { */ void acceptCall() throws CallStateException; /** * Answers a ringing or waiting call. Active calls, if any, go on hold. * Answering occurs asynchronously, and final notification occurs via * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, * java.lang.Object) registerForPreciseCallStateChanged()}. * * @exception CallStateException when no call is ringing or waiting */ void acceptCall(int callType) throws CallStateException; /** * Gets call type for IMS calls. * Loading
src/java/com/android/internal/telephony/PhoneBase.java +5 −0 Original line number Diff line number Diff line Loading @@ -1500,6 +1500,11 @@ public abstract class PhoneBase extends Handler implements Phone { return mCi.getRadioState().isOn(); } // IMS APIs - Implemented only in ImsPhone public void acceptCall(int callType) throws CallStateException { throw new CallStateException("Accept with CallType is not supported in this phone " + this); } public int getCallType(Call call) throws CallStateException { throw new CallStateException("getCallType is not supported in this phone " + this); } Loading
src/java/com/android/internal/telephony/PhoneProxy.java +5 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,11 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.acceptCall(); } @Override public void acceptCall(int callType) throws CallStateException { mActivePhone.acceptCall(callType); } @Override public int getCallType(Call call) throws CallStateException { return mActivePhone.getCallType(call); Loading