Loading src/java/com/android/internal/telephony/Phone.java +7 −0 Original line number Diff line number Diff line Loading @@ -897,6 +897,13 @@ public interface Phone { */ public void addParticipant(String dialString) throws CallStateException; /** * Initiate to add a participant in an IMS call. * * @exception CallStateException operation is not supported. */ public void addParticipant(String dialString, Message onComplete) throws CallStateException; /** * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated * without SEND (so <code>dial</code> is not appropriate). Loading src/java/com/android/internal/telephony/PhoneBase.java +6 −0 Original line number Diff line number Diff line Loading @@ -2138,4 +2138,10 @@ public abstract class PhoneBase extends Handler implements Phone { throw new CallStateException("addParticipant is not supported in this phone " + this); } @Override public void addParticipant(String dialString, Message onComplete) throws CallStateException { throw new CallStateException("addParticipant is not supported in this phone " + this); } } src/java/com/android/internal/telephony/PhoneProxy.java +5 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,11 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.addParticipant(dialString); } @Override public void addParticipant(String dialString, Message onComplete) throws CallStateException { mActivePhone.addParticipant(dialString, onComplete); } @Override public boolean handlePinMmi(String dialString) { return mActivePhone.handlePinMmi(dialString); Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +6 −1 Original line number Diff line number Diff line Loading @@ -560,7 +560,12 @@ public class ImsPhone extends ImsPhoneBase { @Override public void addParticipant(String dialString) throws CallStateException { mCT.addParticipant(dialString); addParticipant(dialString, null); } @Override public void addParticipant(String dialString, Message onComplete) throws CallStateException { mCT.addParticipant(dialString, onComplete); } @Override Loading src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +47 −3 Original line number Diff line number Diff line Loading @@ -227,6 +227,9 @@ public final class ImsPhoneCallTracker extends CallTracker { private int mPendingCallVideoState; private boolean pendingCallInEcm = false; private Object mAddParticipantLock = new Object(); private Message mAddPartResp; //***** Events Loading Loading @@ -428,7 +431,8 @@ public final class ImsPhoneCallTracker extends CallTracker { } public void addParticipant(String dialString) throws CallStateException { addParticipant(String dialString, Message onComplete) throws CallStateException { boolean isSuccess = false; if (mForegroundCall != null) { ImsCall imsCall = mForegroundCall.getImsCall(); if (imsCall == null) { Loading @@ -436,8 +440,12 @@ public final class ImsPhoneCallTracker extends CallTracker { } else { ImsCallSession imsCallSession = imsCall.getCallSession(); if (imsCallSession != null) { synchronized (mAddParticipantLock) { mAddPartResp = onComplete; String[] callees = new String[] { dialString }; imsCallSession.inviteParticipants(callees); isSuccess = true; } } else { loge("addParticipant : ImsCallSession does not exist"); } Loading @@ -445,6 +453,23 @@ public final class ImsPhoneCallTracker extends CallTracker { } else { loge("addParticipant : Foreground call does not exist"); } if (!isSuccess && onComplete != null) { sendAddParticipantResponse(false, onComplete); mAddPartResp = null; } } private void sendAddParticipantResponse(boolean success, Message onComplete) { loge("sendAddParticipantResponse : success = " + success); if (onComplete == null) return; Exception ex = null; if (!success) { ex = new Exception("Add participant failed"); } AsyncResult.forMessage(onComplete, null, ex); onComplete.sendToTarget(); } private void handleEcmTimer(int action) { Loading Loading @@ -1350,6 +1375,25 @@ public final class ImsPhoneCallTracker extends CallTracker { conn.updateConferenceParticipants(participants); } } @Override public void onCallInviteParticipantsRequestDelivered(ImsCall call) { if (DBG) log("invite participants delivered"); synchronized(mAddParticipantLock) { sendAddParticipantResponse(true, mAddPartResp); mAddPartResp = null; } } @Override public void onCallInviteParticipantsRequestFailed(ImsCall call, ImsReasonInfo reasonInfo) { if (DBG) log("invite participants failed."); synchronized(mAddParticipantLock) { sendAddParticipantResponse(false, mAddPartResp); mAddPartResp = null; } } }; /** Loading Loading
src/java/com/android/internal/telephony/Phone.java +7 −0 Original line number Diff line number Diff line Loading @@ -897,6 +897,13 @@ public interface Phone { */ public void addParticipant(String dialString) throws CallStateException; /** * Initiate to add a participant in an IMS call. * * @exception CallStateException operation is not supported. */ public void addParticipant(String dialString, Message onComplete) throws CallStateException; /** * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated * without SEND (so <code>dial</code> is not appropriate). Loading
src/java/com/android/internal/telephony/PhoneBase.java +6 −0 Original line number Diff line number Diff line Loading @@ -2138,4 +2138,10 @@ public abstract class PhoneBase extends Handler implements Phone { throw new CallStateException("addParticipant is not supported in this phone " + this); } @Override public void addParticipant(String dialString, Message onComplete) throws CallStateException { throw new CallStateException("addParticipant is not supported in this phone " + this); } }
src/java/com/android/internal/telephony/PhoneProxy.java +5 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,11 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.addParticipant(dialString); } @Override public void addParticipant(String dialString, Message onComplete) throws CallStateException { mActivePhone.addParticipant(dialString, onComplete); } @Override public boolean handlePinMmi(String dialString) { return mActivePhone.handlePinMmi(dialString); Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +6 −1 Original line number Diff line number Diff line Loading @@ -560,7 +560,12 @@ public class ImsPhone extends ImsPhoneBase { @Override public void addParticipant(String dialString) throws CallStateException { mCT.addParticipant(dialString); addParticipant(dialString, null); } @Override public void addParticipant(String dialString, Message onComplete) throws CallStateException { mCT.addParticipant(dialString, onComplete); } @Override Loading
src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java +47 −3 Original line number Diff line number Diff line Loading @@ -227,6 +227,9 @@ public final class ImsPhoneCallTracker extends CallTracker { private int mPendingCallVideoState; private boolean pendingCallInEcm = false; private Object mAddParticipantLock = new Object(); private Message mAddPartResp; //***** Events Loading Loading @@ -428,7 +431,8 @@ public final class ImsPhoneCallTracker extends CallTracker { } public void addParticipant(String dialString) throws CallStateException { addParticipant(String dialString, Message onComplete) throws CallStateException { boolean isSuccess = false; if (mForegroundCall != null) { ImsCall imsCall = mForegroundCall.getImsCall(); if (imsCall == null) { Loading @@ -436,8 +440,12 @@ public final class ImsPhoneCallTracker extends CallTracker { } else { ImsCallSession imsCallSession = imsCall.getCallSession(); if (imsCallSession != null) { synchronized (mAddParticipantLock) { mAddPartResp = onComplete; String[] callees = new String[] { dialString }; imsCallSession.inviteParticipants(callees); isSuccess = true; } } else { loge("addParticipant : ImsCallSession does not exist"); } Loading @@ -445,6 +453,23 @@ public final class ImsPhoneCallTracker extends CallTracker { } else { loge("addParticipant : Foreground call does not exist"); } if (!isSuccess && onComplete != null) { sendAddParticipantResponse(false, onComplete); mAddPartResp = null; } } private void sendAddParticipantResponse(boolean success, Message onComplete) { loge("sendAddParticipantResponse : success = " + success); if (onComplete == null) return; Exception ex = null; if (!success) { ex = new Exception("Add participant failed"); } AsyncResult.forMessage(onComplete, null, ex); onComplete.sendToTarget(); } private void handleEcmTimer(int action) { Loading Loading @@ -1350,6 +1375,25 @@ public final class ImsPhoneCallTracker extends CallTracker { conn.updateConferenceParticipants(participants); } } @Override public void onCallInviteParticipantsRequestDelivered(ImsCall call) { if (DBG) log("invite participants delivered"); synchronized(mAddParticipantLock) { sendAddParticipantResponse(true, mAddPartResp); mAddPartResp = null; } } @Override public void onCallInviteParticipantsRequestFailed(ImsCall call, ImsReasonInfo reasonInfo) { if (DBG) log("invite participants failed."); synchronized(mAddParticipantLock) { sendAddParticipantResponse(false, mAddPartResp); mAddPartResp = null; } } }; /** Loading