Loading src/java/com/android/internal/telephony/CallManager.java +30 −0 Original line number Original line Diff line number Diff line Loading @@ -84,6 +84,7 @@ public class CallManager { private static final int EVENT_SERVICE_STATE_CHANGED = 118; private static final int EVENT_SERVICE_STATE_CHANGED = 118; private static final int EVENT_POST_DIAL_CHARACTER = 119; private static final int EVENT_POST_DIAL_CHARACTER = 119; private static final int EVENT_SUPP_SERVICE_NOTIFY = 120; private static final int EVENT_SUPP_SERVICE_NOTIFY = 120; private static final int EVENT_CALL_MODIFY = 121; private static final String PROPERTY_QCHAT_ENABLED = "persist.atel.qchat_enabled"; private static final String PROPERTY_QCHAT_ENABLED = "persist.atel.qchat_enabled"; Loading Loading @@ -179,6 +180,9 @@ public class CallManager { protected final RegistrantList mPostDialCharacterRegistrants protected final RegistrantList mPostDialCharacterRegistrants = new RegistrantList(); = new RegistrantList(); protected final RegistrantList mCallModifyRegistrants = new RegistrantList(); protected CallManager() { protected CallManager() { mPhones = new ArrayList<Phone>(); mPhones = new ArrayList<Phone>(); mRingingCalls = new ArrayList<Call>(); mRingingCalls = new ArrayList<Call>(); Loading Loading @@ -552,6 +556,11 @@ public class CallManager { if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) { if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) { phone.registerForEcmTimerReset(mHandler, EVENT_ECM_TIMER_RESET, null); phone.registerForEcmTimerReset(mHandler, EVENT_ECM_TIMER_RESET, null); try { phone.registerForModifyCallRequest(mHandler, EVENT_CALL_MODIFY, null); } catch (CallStateException e) { Rlog.e(LOG_TAG, "registerForModifyCallRequest: CallStateException:" + e); } } } } } Loading Loading @@ -1655,6 +1664,17 @@ public class CallManager { mPostDialCharacterRegistrants.remove(h); mPostDialCharacterRegistrants.remove(h); } } /* * Registrants for CallModify */ public void registerForCallModify(Handler h, int what, Object obj) { mCallModifyRegistrants.addUnique(h, what, obj); } public void unregisterForCallModify(Handler h) { mCallModifyRegistrants.remove(h); } /* APIs to access foregroudCalls, backgroudCalls, and ringingCalls /* APIs to access foregroudCalls, backgroudCalls, and ringingCalls * 1. APIs to access list of calls * 1. APIs to access list of calls * 2. APIs to check if any active call, which has connection other than * 2. APIs to check if any active call, which has connection other than Loading Loading @@ -2002,6 +2022,16 @@ public class CallManager { if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_SERVICE_STATE_CHANGED)"); if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_SERVICE_STATE_CHANGED)"); mServiceStateChangedRegistrants.notifyRegistrants((AsyncResult) msg.obj); mServiceStateChangedRegistrants.notifyRegistrants((AsyncResult) msg.obj); break; break; case EVENT_CALL_MODIFY: if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_CALL_MODIFY)"); AsyncResult ar = (AsyncResult) msg.obj; if (ar != null && ar.result != null && ar.exception == null) { mCallModifyRegistrants.notifyRegistrants(new AsyncResult(null, (Connection) ar.result, null)); } else { Rlog.e(LOG_TAG, "Error EVENT_MODIFY_CALL AsyncResult ar= " + ar); } break; case EVENT_POST_DIAL_CHARACTER: case EVENT_POST_DIAL_CHARACTER: // we need send the character that is being processed in msg.arg1 // we need send the character that is being processed in msg.arg1 // so can't use notifyRegistrants() // so can't use notifyRegistrants() Loading src/java/com/android/internal/telephony/Phone.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1961,6 +1961,11 @@ public interface Phone { */ */ public void rejectConnectionTypeChange(Connection conn) throws CallStateException; public void rejectConnectionTypeChange(Connection conn) throws CallStateException; /* * To check VT call capability */ public boolean isVTModifyAllowed() throws CallStateException; /** /** * When a remote user requests to change the type of the connection (e.g. to * When a remote user requests to change the type of the connection (e.g. to * upgrade from voice to video), it will be possible to query the proposed * upgrade from voice to video), it will be possible to query the proposed Loading src/java/com/android/internal/telephony/PhoneBase.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1536,6 +1536,13 @@ public abstract class PhoneBase extends Handler implements Phone { + this); + this); } } /* * To check VT call capability */ public boolean isVTModifyAllowed() throws CallStateException { throw new CallStateException("isVTModifyAllowed is not supported in this phone " + this); } public void unregisterForModifyCallRequest(Handler h) throws CallStateException { public void unregisterForModifyCallRequest(Handler h) throws CallStateException { throw new CallStateException( throw new CallStateException( "unregisterForModifyCallRequest is not supported in this phone " + this); "unregisterForModifyCallRequest is not supported in this phone " + this); Loading src/java/com/android/internal/telephony/PhoneProxy.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1278,6 +1278,13 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.registerForModifyCallRequest(h, what, obj); mActivePhone.registerForModifyCallRequest(h, what, obj); } } /* * To check VT call capability */ public boolean isVTModifyAllowed() throws CallStateException { throw new CallStateException("isVTModifyAllowed is not supported in this phone " + this); } public void unregisterForModifyCallRequest(Handler h) throws CallStateException { public void unregisterForModifyCallRequest(Handler h) throws CallStateException { mActivePhone.unregisterForModifyCallRequest(h); mActivePhone.unregisterForModifyCallRequest(h); } } Loading Loading
src/java/com/android/internal/telephony/CallManager.java +30 −0 Original line number Original line Diff line number Diff line Loading @@ -84,6 +84,7 @@ public class CallManager { private static final int EVENT_SERVICE_STATE_CHANGED = 118; private static final int EVENT_SERVICE_STATE_CHANGED = 118; private static final int EVENT_POST_DIAL_CHARACTER = 119; private static final int EVENT_POST_DIAL_CHARACTER = 119; private static final int EVENT_SUPP_SERVICE_NOTIFY = 120; private static final int EVENT_SUPP_SERVICE_NOTIFY = 120; private static final int EVENT_CALL_MODIFY = 121; private static final String PROPERTY_QCHAT_ENABLED = "persist.atel.qchat_enabled"; private static final String PROPERTY_QCHAT_ENABLED = "persist.atel.qchat_enabled"; Loading Loading @@ -179,6 +180,9 @@ public class CallManager { protected final RegistrantList mPostDialCharacterRegistrants protected final RegistrantList mPostDialCharacterRegistrants = new RegistrantList(); = new RegistrantList(); protected final RegistrantList mCallModifyRegistrants = new RegistrantList(); protected CallManager() { protected CallManager() { mPhones = new ArrayList<Phone>(); mPhones = new ArrayList<Phone>(); mRingingCalls = new ArrayList<Call>(); mRingingCalls = new ArrayList<Call>(); Loading Loading @@ -552,6 +556,11 @@ public class CallManager { if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) { if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) { phone.registerForEcmTimerReset(mHandler, EVENT_ECM_TIMER_RESET, null); phone.registerForEcmTimerReset(mHandler, EVENT_ECM_TIMER_RESET, null); try { phone.registerForModifyCallRequest(mHandler, EVENT_CALL_MODIFY, null); } catch (CallStateException e) { Rlog.e(LOG_TAG, "registerForModifyCallRequest: CallStateException:" + e); } } } } } Loading Loading @@ -1655,6 +1664,17 @@ public class CallManager { mPostDialCharacterRegistrants.remove(h); mPostDialCharacterRegistrants.remove(h); } } /* * Registrants for CallModify */ public void registerForCallModify(Handler h, int what, Object obj) { mCallModifyRegistrants.addUnique(h, what, obj); } public void unregisterForCallModify(Handler h) { mCallModifyRegistrants.remove(h); } /* APIs to access foregroudCalls, backgroudCalls, and ringingCalls /* APIs to access foregroudCalls, backgroudCalls, and ringingCalls * 1. APIs to access list of calls * 1. APIs to access list of calls * 2. APIs to check if any active call, which has connection other than * 2. APIs to check if any active call, which has connection other than Loading Loading @@ -2002,6 +2022,16 @@ public class CallManager { if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_SERVICE_STATE_CHANGED)"); if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_SERVICE_STATE_CHANGED)"); mServiceStateChangedRegistrants.notifyRegistrants((AsyncResult) msg.obj); mServiceStateChangedRegistrants.notifyRegistrants((AsyncResult) msg.obj); break; break; case EVENT_CALL_MODIFY: if (VDBG) Rlog.d(LOG_TAG, " handleMessage (EVENT_CALL_MODIFY)"); AsyncResult ar = (AsyncResult) msg.obj; if (ar != null && ar.result != null && ar.exception == null) { mCallModifyRegistrants.notifyRegistrants(new AsyncResult(null, (Connection) ar.result, null)); } else { Rlog.e(LOG_TAG, "Error EVENT_MODIFY_CALL AsyncResult ar= " + ar); } break; case EVENT_POST_DIAL_CHARACTER: case EVENT_POST_DIAL_CHARACTER: // we need send the character that is being processed in msg.arg1 // we need send the character that is being processed in msg.arg1 // so can't use notifyRegistrants() // so can't use notifyRegistrants() Loading
src/java/com/android/internal/telephony/Phone.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -1961,6 +1961,11 @@ public interface Phone { */ */ public void rejectConnectionTypeChange(Connection conn) throws CallStateException; public void rejectConnectionTypeChange(Connection conn) throws CallStateException; /* * To check VT call capability */ public boolean isVTModifyAllowed() throws CallStateException; /** /** * When a remote user requests to change the type of the connection (e.g. to * When a remote user requests to change the type of the connection (e.g. to * upgrade from voice to video), it will be possible to query the proposed * upgrade from voice to video), it will be possible to query the proposed Loading
src/java/com/android/internal/telephony/PhoneBase.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1536,6 +1536,13 @@ public abstract class PhoneBase extends Handler implements Phone { + this); + this); } } /* * To check VT call capability */ public boolean isVTModifyAllowed() throws CallStateException { throw new CallStateException("isVTModifyAllowed is not supported in this phone " + this); } public void unregisterForModifyCallRequest(Handler h) throws CallStateException { public void unregisterForModifyCallRequest(Handler h) throws CallStateException { throw new CallStateException( throw new CallStateException( "unregisterForModifyCallRequest is not supported in this phone " + this); "unregisterForModifyCallRequest is not supported in this phone " + this); Loading
src/java/com/android/internal/telephony/PhoneProxy.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1278,6 +1278,13 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.registerForModifyCallRequest(h, what, obj); mActivePhone.registerForModifyCallRequest(h, what, obj); } } /* * To check VT call capability */ public boolean isVTModifyAllowed() throws CallStateException { throw new CallStateException("isVTModifyAllowed is not supported in this phone " + this); } public void unregisterForModifyCallRequest(Handler h) throws CallStateException { public void unregisterForModifyCallRequest(Handler h) throws CallStateException { mActivePhone.unregisterForModifyCallRequest(h); mActivePhone.unregisterForModifyCallRequest(h); } } Loading