summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wang <johnwang@google.com>2010-01-29 20:07:14 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-29 20:07:14 -0800
commit8deed914c2df15d71674deae591bcd3313093931 (patch)
tree25d04f9a1a3de2961401874c2a2a231c77467dc9
parentd8a3a8957b9d71ab75584b0cc98324fd70cc527c (diff)
parent1ccc41ed938ff005ae3d621292580a90601242ca (diff)
downloadbase-8deed914c2df15d71674deae591bcd3313093931.tar.gz
Merge "Handle RIL_UNSOL_RESEND_INCALL_MUTE." into eclair
-rw-r--r--telephony/java/com/android/internal/telephony/BaseCommands.java10
-rw-r--r--telephony/java/com/android/internal/telephony/CommandsInterface.java12
-rw-r--r--telephony/java/com/android/internal/telephony/Phone.java10
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneBase.java10
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneProxy.java8
-rw-r--r--telephony/java/com/android/internal/telephony/RIL.java11
-rw-r--r--telephony/java/com/android/internal/telephony/RILConstants.java1
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 c1135817a22f..11386aeab440 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 1c03c5a31c31..eb406b72da1c 100644
--- a/telephony/java/com/android/internal/telephony/PhoneBase.java
+++ b/telephony/java/com/android/internal/telephony/PhoneBase.java
@@ -492,6 +492,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 b1eaa9311563..1ef8d3744605 100644
--- a/telephony/java/com/android/internal/telephony/PhoneProxy.java
+++ b/telephony/java/com/android/internal/telephony/PhoneProxy.java
@@ -343,6 +343,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 d802efa221cd..86cb6fb79e71 100644
--- a/telephony/java/com/android/internal/telephony/RIL.java
+++ b/telephony/java/com/android/internal/telephony/RIL.java
@@ -2323,6 +2323,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);
@@ -2615,6 +2616,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));
+ }
}
}
@@ -3251,6 +3261,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;
}