aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuresh Koleti <skoleti@codeaurora.org>2017-08-05 11:29:39 +0530
committerSuresh Koleti <skoleti@codeaurora.org>2017-12-06 11:55:40 +0530
commitfd1611b65b78bccd53ca2bc1570e5fa103ecd8f5 (patch)
tree142e01d558b10a02ae28a4a1ca37705cee0da712
parent5b8070d89e172946d271a1402cb0a67d8b746524 (diff)
downloadims-fd1611b65b78bccd53ca2bc1570e5fa103ecd8f5.tar.gz
IMS: Add support for STK CC feature
-- Notifies STK CC supplementary service indication information to registered clients. Test: Manual Bug: 64685331 Change-Id: Ie9c0fd666d8087f8372b1752702178b0757453c8
-rw-r--r--src/java/com/android/ims/ImsUt.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/java/com/android/ims/ImsUt.java b/src/java/com/android/ims/ImsUt.java
index 83e90c0a..eaeb5511 100644
--- a/src/java/com/android/ims/ImsUt.java
+++ b/src/java/com/android/ims/ImsUt.java
@@ -22,7 +22,9 @@ import java.util.Map;
import android.content.res.Resources;
import android.os.AsyncResult;
import android.os.Bundle;
+import android.os.Handler;
import android.os.Message;
+import android.os.Registrant;
import android.os.RemoteException;
import android.telephony.Rlog;
@@ -76,6 +78,7 @@ public class ImsUt implements ImsUtInterface {
private final IImsUt miUt;
private HashMap<Integer, Message> mPendingCmds =
new HashMap<Integer, Message>();
+ private Registrant mSsIndicationRegistrant;
public ImsUt(IImsUt iUt) {
miUt = iUt;
@@ -112,6 +115,23 @@ public class ImsUt implements ImsUtInterface {
}
/**
+ * Registers a handler for Supplementary Service Indications. The
+ * result is returned in the {@link AsyncResult#result) field
+ * of the {@link AsyncResult} object returned by {@link Message.obj}.
+ * Value of ((AsyncResult)result.obj) is of {@link ImsSsData}.
+ */
+ public void registerForSuppServiceIndication(Handler h, int what, Object obj) {
+ mSsIndicationRegistrant = new Registrant (h, what, obj);
+ }
+
+ /**
+ * UnRegisters a handler for Supplementary Service Indications.
+ */
+ public void unregisterForSuppServiceIndication(Handler h) {
+ mSsIndicationRegistrant.clear();
+ }
+
+ /**
* Operations for the supplementary service configuration
*/
@@ -709,5 +729,15 @@ public class ImsUt implements ImsUtInterface {
mPendingCmds.remove(key);
}
}
+
+ /**
+ * Notifies client when Supplementary Service indication is received
+ */
+ @Override
+ public void onSupplementaryServiceIndication(ImsSsData ssData) {
+ if (mSsIndicationRegistrant != null) {
+ mSsIndicationRegistrant.notifyResult(ssData);
+ }
+ }
}
}