Merge "Handle RIL_UNSOL_RESEND_INCALL_MUTE." into eclair
diff --git a/telephony/java/com/android/internal/telephony/BaseCommands.java b/telephony/java/com/android/internal/telephony/BaseCommands.java
index 7586ba2..7421854 100644
--- a/telephony/java/com/android/internal/telephony/BaseCommands.java
+++ b/telephony/java/com/android/internal/telephony/BaseCommands.java
@@ -65,6 +65,7 @@
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 @@
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 1d9f10a..d90c305 100644
--- a/telephony/java/com/android/internal/telephony/CommandsInterface.java
+++ b/telephony/java/com/android/internal/telephony/CommandsInterface.java
@@ -537,6 +537,18 @@
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 c113581..11386ae 100644
--- a/telephony/java/com/android/internal/telephony/Phone.java
+++ b/telephony/java/com/android/internal/telephony/Phone.java
@@ -407,6 +407,16 @@
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 1c03c5a..eb406b7 100644
--- a/telephony/java/com/android/internal/telephony/PhoneBase.java
+++ b/telephony/java/com/android/internal/telephony/PhoneBase.java
@@ -492,6 +492,16 @@
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 b1eaa93..1ef8d37 100644
--- a/telephony/java/com/android/internal/telephony/PhoneProxy.java
+++ b/telephony/java/com/android/internal/telephony/PhoneProxy.java
@@ -343,6 +343,14 @@
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 d802efa..86cb6fb 100644
--- a/telephony/java/com/android/internal/telephony/RIL.java
+++ b/telephony/java/com/android/internal/telephony/RIL.java
@@ -2323,6 +2323,7 @@
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);
@@ -2615,6 +2616,15 @@
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));
+ }
}
}
@@ -3251,6 +3261,7 @@
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 c29adcf..4d8c7ec 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -259,4 +259,5 @@
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;
}