aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenergy Meenan Ravuri <bravuri@codeaurora.org>2017-12-01 00:33:22 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-12-01 00:33:22 +0000
commit5b8070d89e172946d271a1402cb0a67d8b746524 (patch)
tree7cf517586bbbdd02cc20ea96d9dbfc143a38ca74
parent6074ed7581fac45989ebfeecef7b33740517d465 (diff)
parent7e083d8555eefdda4771899d5aafa85db510ada1 (diff)
downloadims-5b8070d89e172946d271a1402cb0a67d8b746524.tar.gz
IMS: use new callbarring functions with service class
am: 7e083d8555 Change-Id: I6a35378f14b013d233c0c5236c76e909de8edd2d
-rw-r--r--src/java/com/android/ims/ImsUt.java41
1 files changed, 36 insertions, 5 deletions
diff --git a/src/java/com/android/ims/ImsUt.java b/src/java/com/android/ims/ImsUt.java
index d8d70b05..83e90c0a 100644
--- a/src/java/com/android/ims/ImsUt.java
+++ b/src/java/com/android/ims/ImsUt.java
@@ -67,6 +67,10 @@ public class ImsUt implements ImsUtInterface {
private static final String TAG = "ImsUt";
private static final boolean DBG = true;
+ //These service class values are same as the one in CommandsInterface.java
+ private static final int SERVICE_CLASS_NONE = 0;
+ private static final int SERVICE_CLASS_VOICE = (1 << 0);
+
// For synchronization of private variables
private Object mLockObj = new Object();
private final IImsUt miUt;
@@ -117,16 +121,31 @@ public class ImsUt implements ImsUtInterface {
* @param cbType type of call barring to be queried; ImsUtInterface#CB_XXX
* @param result message to pass the result of this operation
* The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}.
+ * @deprecated Use {@link #queryCallBarring(int, Message, int)} instead.
*/
@Override
public void queryCallBarring(int cbType, Message result) {
+ queryCallBarring(cbType, result, SERVICE_CLASS_NONE);
+ }
+
+ /**
+ * Retrieves the configuration of the call barring for specified service class.
+ *
+ * @param cbType type of call barring to be queried; ImsUtInterface#CB_XXX
+ * @param result message to pass the result of this operation
+ * The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}.
+ * @param serviceClass service class for e.g. voice/video
+ */
+ @Override
+ public void queryCallBarring(int cbType, Message result, int serviceClass) {
if (DBG) {
- log("queryCallBarring :: Ut=" + miUt + ", cbType=" + cbType);
+ log("queryCallBarring :: Ut=" + miUt + ", cbType=" + cbType + ", serviceClass="
+ + serviceClass);
}
synchronized(mLockObj) {
try {
- int id = miUt.queryCallBarring(cbType);
+ int id = miUt.queryCallBarringForServiceClass(cbType, serviceClass);
if (id < 0) {
sendFailureReport(result,
@@ -306,9 +325,19 @@ public class ImsUt implements ImsUtInterface {
/**
* Modifies the configuration of the call barring.
+ * @deprecated Use {@link #updateCallBarring(int, int, Message, String[], int)} instead.
*/
@Override
public void updateCallBarring(int cbType, int action, Message result, String[] barrList) {
+ updateCallBarring(cbType, action, result, barrList, SERVICE_CLASS_NONE);
+ }
+
+ /**
+ * Modifies the configuration of the call barring for specified service class.
+ */
+ @Override
+ public void updateCallBarring(int cbType, int action, Message result,
+ String[] barrList, int serviceClass) {
if (DBG) {
if (barrList != null) {
String bList = new String();
@@ -316,17 +345,19 @@ public class ImsUt implements ImsUtInterface {
bList.concat(barrList[i] + " ");
}
log("updateCallBarring :: Ut=" + miUt + ", cbType=" + cbType
- + ", action=" + action + ", barrList=" + bList);
+ + ", action=" + action + ", serviceClass=" + serviceClass
+ + ", barrList=" + bList);
}
else {
log("updateCallBarring :: Ut=" + miUt + ", cbType=" + cbType
- + ", action=" + action);
+ + ", action=" + action + ", serviceClass=" + serviceClass);
}
}
synchronized(mLockObj) {
try {
- int id = miUt.updateCallBarring(cbType, action, barrList);
+ int id = miUt.updateCallBarringForServiceClass(cbType, action,
+ barrList, serviceClass);
if (id < 0) {
sendFailureReport(result,