Merge "Prevent merging conference calls hosted on peer device." into lmp-mr1-wfc-dev
[android/platform/frameworks/opt/net/ims.git] / src / java / com / android / ims / ImsCall.java
index d25765e..d2aef83 100644 (file)
@@ -29,6 +29,7 @@ import android.net.Uri;
 import android.os.Bundle;
 import android.os.Message;
 import android.telecom.ConferenceParticipant;
+import android.telecom.Connection;
 import android.util.Log;
 
 import com.android.ims.internal.ICall;
@@ -710,6 +711,26 @@ public class ImsCall implements ICall {
     }
 
     /**
+     * Gets the call substate.
+     *
+     * @return int callsubstate
+     */
+    public int getCallSubstate() throws ImsException {
+        synchronized(mLockObj) {
+            if (mSession == null) {
+                throw new ImsException("No call session",
+                    ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED);
+            }
+            try {
+                return mSession.getCallSubstate();
+            } catch (Throwable t) {
+                loge("getCallSubstate :: ", t);
+                throw new ImsException("getCallSubstate()", t, 0);
+            }
+        }
+    }
+
+    /**
      * Gets the last reason information when the call is not established, cancelled or terminated.
      *
      * @return the last reason information