diff options
| author | 2010-02-01 14:34:50 -0800 | |
|---|---|---|
| committer | 2010-02-01 14:34:50 -0800 | |
| commit | 6a31dfa905695b3f6837fe76ab2f1c68e9d14b16 (patch) | |
| tree | 3c03606a37226d374699ba03018170a000759f43 | |
| parent | e4e460f67be01b433fceda6dae4c61424cbb0f83 (diff) | |
| parent | 1ef6fb3bbe17870673195f28eec9d1e4e43b4785 (diff) | |
am 1ef6fb3b: am 8deed914: Merge "Handle RIL_UNSOL_RESEND_INCALL_MUTE." into eclair
Merge commit '1ef6fb3bbe17870673195f28eec9d1e4e43b4785'
* commit '1ef6fb3bbe17870673195f28eec9d1e4e43b4785':
Handle RIL_UNSOL_RESEND_INCALL_MUTE.
7 files changed, 62 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/BaseCommands.java b/telephony/java/com/android/internal/telephony/BaseCommands.java index 7586ba29c435..74218547a300 100644 --- a/telephony/java/com/android/internal/telephony/BaseCommands.java +++ b/telephony/java/com/android/internal/telephony/BaseCommands.java @@ -65,6 +65,7 @@ public abstract class BaseCommands implements CommandsInterface { protected RegistrantList mT53ClirInfoRegistrants = new RegistrantList(); protected RegistrantList mT53AudCntrlInfoRegistrants = new RegistrantList(); protected RegistrantList mRingbackToneRegistrants = new RegistrantList(); + protected RegistrantList mResendIncallMuteRegistrants = new RegistrantList(); protected Registrant mSMSRegistrant; protected Registrant mNITZTimeRegistrant; @@ -579,6 +580,15 @@ public abstract class BaseCommands implements CommandsInterface { mRingbackToneRegistrants.remove(h); } + public void registerForResendIncallMute(Handler h, int what, Object obj) { + Registrant r = new Registrant (h, what, obj); + mResendIncallMuteRegistrants.add(r); + } + + public void unregisterForResendIncallMute(Handler h) { + mResendIncallMuteRegistrants.remove(h); + } + //***** Protected Methods /** * Store new RadioState and send notification based on the changes diff --git a/telephony/java/com/android/internal/telephony/CommandsInterface.java b/telephony/java/com/android/internal/telephony/CommandsInterface.java index 1d9f10a96e03..d90c3056bf76 100644 --- a/telephony/java/com/android/internal/telephony/CommandsInterface.java +++ b/telephony/java/com/android/internal/telephony/CommandsInterface.java @@ -537,6 +537,18 @@ public interface CommandsInterface { void registerForRingbackTone(Handler h, int what, Object obj); void unregisterForRingbackTone(Handler h); + /** + * Registers the handler when mute/unmute need to be resent to get + * uplink audio during a call.<p> + * + * @param h Handler for notification message. + * @param what User-defined message code. + * @param obj User object. + * + */ + void registerForResendIncallMute(Handler h, int what, Object obj); + void unregisterForResendIncallMute(Handler h); + /** * Supply the ICC PIN to the ICC card * diff --git a/telephony/java/com/android/internal/telephony/Phone.java b/telephony/java/com/android/internal/telephony/Phone.java index a8ad80e9d673..3adad6f712e5 100644 --- a/telephony/java/com/android/internal/telephony/Phone.java +++ b/telephony/java/com/android/internal/telephony/Phone.java @@ -407,6 +407,16 @@ public interface Phone { void unregisterForRingbackTone(Handler h); + /** + * Registers the handler to reset the uplink mute state to get + * uplink audio. + */ + void registerForResendIncallMute(Handler h, int what, Object obj); + + /** + * Unregisters for resend incall mute notifications. + */ + void unregisterForResendIncallMute(Handler h); /** * Notifies when a voice connection has disconnected, either due to local diff --git a/telephony/java/com/android/internal/telephony/PhoneBase.java b/telephony/java/com/android/internal/telephony/PhoneBase.java index bad9ab3e1611..358af9572f72 100644 --- a/telephony/java/com/android/internal/telephony/PhoneBase.java +++ b/telephony/java/com/android/internal/telephony/PhoneBase.java @@ -495,6 +495,16 @@ public abstract class PhoneBase extends Handler implements Phone { mCM.unregisterForRingbackTone(h); } + // Inherited documentation suffices. + public void registerForResendIncallMute(Handler h, int what, Object obj) { + mCM.registerForResendIncallMute(h,what,obj); + } + + // Inherited documentation suffices. + public void unregisterForResendIncallMute(Handler h) { + mCM.unregisterForResendIncallMute(h); + } + /** * Subclasses of Phone probably want to replace this with a * version scoped to their packages diff --git a/telephony/java/com/android/internal/telephony/PhoneProxy.java b/telephony/java/com/android/internal/telephony/PhoneProxy.java index d56d99fd395c..6d3798ed1459 100644 --- a/telephony/java/com/android/internal/telephony/PhoneProxy.java +++ b/telephony/java/com/android/internal/telephony/PhoneProxy.java @@ -351,6 +351,14 @@ public class PhoneProxy extends Handler implements Phone { mActivePhone.unregisterForRingbackTone(h); } + public void registerForResendIncallMute(Handler h, int what, Object obj) { + mActivePhone.registerForResendIncallMute(h,what,obj); + } + + public void unregisterForResendIncallMute(Handler h) { + mActivePhone.unregisterForResendIncallMute(h); + } + public boolean getIccRecordsLoaded() { return mActivePhone.getIccRecordsLoaded(); } diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java index 1ffcf9b0e5dc..2a7004d5ea6d 100644 --- a/telephony/java/com/android/internal/telephony/RIL.java +++ b/telephony/java/com/android/internal/telephony/RIL.java @@ -2333,6 +2333,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { case RIL_UNSOL_CDMA_INFO_REC: ret = responseCdmaInformationRecord(p); break; case RIL_UNSOL_OEM_HOOK_RAW: ret = responseRaw(p); break; case RIL_UNSOL_RINGBACK_TONE: ret = responseInts(p); break; + case RIL_UNSOL_RESEND_INCALL_MUTE: ret = responseVoid(p); break; default: throw new RuntimeException("Unrecognized unsol response: " + response); @@ -2625,6 +2626,15 @@ public final class RIL extends BaseCommands implements CommandsInterface { mRingbackToneRegistrants.notifyRegistrants( new AsyncResult (null, playtone, null)); } + break; + + case RIL_UNSOL_RESEND_INCALL_MUTE: + if (RILJ_LOGD) unsljLogRet(response, ret); + + if (mResendIncallMuteRegistrants != null) { + mResendIncallMuteRegistrants.notifyRegistrants( + new AsyncResult (null, ret, null)); + } } } @@ -3268,6 +3278,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { case RIL_UNSOL_CDMA_INFO_REC: return "UNSOL_CDMA_INFO_REC"; case RIL_UNSOL_OEM_HOOK_RAW: return "UNSOL_OEM_HOOK_RAW"; case RIL_UNSOL_RINGBACK_TONE: return "UNSOL_RINGBACK_TONG"; + case RIL_UNSOL_RESEND_INCALL_MUTE: return "UNSOL_RESEND_INCALL_MUTE"; default: return "<unknown reponse>"; } } diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index c29adcf7e103..4d8c7ec86e87 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -259,4 +259,5 @@ cat include/telephony/ril.h | \ int RIL_UNSOL_CDMA_INFO_REC = 1027; int RIL_UNSOL_OEM_HOOK_RAW = 1028; int RIL_UNSOL_RINGBACK_TONE = 1029; + int RIL_UNSOL_RESEND_INCALL_MUTE = 1030; } |