MWI,phantom call,Suppl services
Shriram Ganesh [Sun, 31 May 2015 17:06:15 +0000 (10:06 -0700)]
1. IMS MWI Feature
- Add new API to update waiting
voice message count, for UI
propagation based on RFC 3842

2. phantom call support

Supplementary services
3. IMS: CallForward Unconditional Timer
- Add new API for callforward
   unconditional timer in aidl file.

4. IMS : Incoming Call Barring
- Added new field to display ICB
   anonymous number.
- Modified existing API to support
   request like registration,activation,
   deactivation,erasure,interogation.

5.Unsol supplementary service notification
- send unsol supplementary notification to UI
- add call history info

6.  Don't reset mUpdateRequest flag upon
receiving call update notification,
oncallSessionUpdated().

7. Reset mHold variable when hold request failed
reset mHold variable so that ImsCall's state corresponds to the
actual state of the call

Change-Id: I7a0293d21fca4bf40dbe764c5d9d9dbb8665d55d

src/java/com/android/ims/ImsCall.java
src/java/com/android/ims/ImsConnectionStateListener.java
src/java/com/android/ims/ImsManager.java
src/java/com/android/ims/ImsUt.java
src/java/com/android/ims/ImsUtInterface.java
src/java/com/android/ims/internal/ImsCallSession.java

index 706fa23..f4e3b5e 100644 (file)
@@ -384,6 +384,16 @@ public class ImsCall implements ICall {
         }
 
         /**
+         * Called when the call supp service is received
+         * The default implementation calls {@link #onCallStateChanged}.
+         *
+         * @param call the call object that carries out the IMS call
+         */
+        public void onCallSuppServiceReceived(ImsCall call,
+            ImsSuppServiceNotification suppServiceInfo) {
+        }
+
+        /**
          * Called when TTY mode of remote party changed
          *
          * @param call the call object that carries out the IMS call
@@ -2103,7 +2113,10 @@ public class ImsCall implements ICall {
                 return;
             }
 
-            synchronized(mLockObj) {
+            logi("callSessionHoldFailed :: session=" + session +
+                    ", reasonInfo=" + reasonInfo);
+
+            synchronized (mLockObj) {
                 mHold = false;
             }
 
@@ -2733,6 +2746,33 @@ public class ImsCall implements ICall {
                 }
             }
         }
+
+        @Override
+        public void callSessionSuppServiceReceived(ImsCallSession session,
+                ImsSuppServiceNotification suppServiceInfo ) {
+            if (isTransientConferenceSession(session)) {
+                logi("callSessionSuppServiceReceived :: not supported for transient conference"
+                        + " session=" + session);
+                return;
+            }
+
+            logi("callSessionSuppServiceReceived :: session=" + session +
+                     ", suppServiceInfo" + suppServiceInfo);
+
+            ImsCall.Listener listener;
+
+            synchronized(ImsCall.this) {
+                listener = mListener;
+            }
+
+            if (listener != null) {
+                try {
+                    listener.onCallSuppServiceReceived(ImsCall.this, suppServiceInfo);
+                } catch (Throwable t) {
+                    loge("callSessionSuppServiceReceived :: ", t);
+                }
+            }
+        }
     }
 
     /**
index b19141e..1afec8e 100644 (file)
@@ -67,4 +67,11 @@ public class ImsConnectionStateListener {
                 int[] enabledFeatures, int[] disabledFeatures) {
         // no-op
     }
+
+    /**
+     * Called when waiting voice message count changes.
+     */
+    public void onVoiceMessageCountChanged(int count) {
+        // no-op
+    }
 }
index 12a0f1f..d6b5d35 100644 (file)
@@ -138,6 +138,18 @@ public class ImsManager {
      */
     public static final String EXTRA_USSD = "android:ussd";
 
+    /**
+     * Part of the ACTION_IMS_INCOMING_CALL intents.
+     * A boolean value; Flag to indicate whether the call is an unknown
+     * dialing call. Such calls are originated by sending commands (like
+     * AT commands) directly to modem without Android involvement.
+     * Even though they are not incoming calls, they are propagated
+     * to Phone app using same ACTION_IMS_INCOMING_CALL intent.
+     * Internal use only.
+     * @hide
+     */
+    public static final String EXTRA_IS_UNKNOWN_CALL = "codeaurora:isUnknown";
+
     private static final String TAG = "ImsManager";
     private static final boolean DBG = true;
 
@@ -1092,6 +1104,15 @@ public class ImsManager {
             }
         }
 
+        @Override
+        public void voiceMessageCountUpdate(int count) {
+            log("voiceMessageCountUpdate :: count=" + count);
+
+            if (mListener != null) {
+                mListener.onVoiceMessageCountChanged(count);
+            }
+        }
+
     }
     /**
      * Gets the ECBM interface to request ECBM exit.
index 2152be7..d72e5fd 100644 (file)
@@ -307,7 +307,7 @@ public class ImsUt implements ImsUtInterface {
      * Modifies the configuration of the call barring.
      */
     @Override
-    public void updateCallBarring(int cbType, boolean enable, Message result, String[] barrList) {
+    public void updateCallBarring(int cbType, int action, Message result, String[] barrList) {
         if (DBG) {
             if (barrList != null) {
                 String bList = new String();
@@ -315,17 +315,17 @@ public class ImsUt implements ImsUtInterface {
                     bList.concat(barrList[i] + " ");
                 }
                 log("updateCallBarring :: Ut=" + miUt + ", cbType=" + cbType
-                        + ", enable=" + enable + ", barrList=" + bList);
+                        + ", action=" + action + ", barrList=" + bList);
             }
             else {
                 log("updateCallBarring :: Ut=" + miUt + ", cbType=" + cbType
-                        + ", enable=" + enable);
+                        + ", action=" + action);
             }
         }
 
         synchronized(mLockObj) {
             try {
-                int id = miUt.updateCallBarring(cbType, enable, barrList);
+                int id = miUt.updateCallBarring(cbType, action, barrList);
 
                 if (id < 0) {
                     sendFailureReport(result,
index fa8aef3..5984e78 100644 (file)
@@ -143,7 +143,7 @@ public interface ImsUtInterface {
     /**
      * Modifies the configuration of the call barring.
      */
-    public void updateCallBarring(int cbType, boolean enable,
+    public void updateCallBarring(int cbType, int action,
             Message result, String[] barrList);
 
     /**
index bf7a813..3545bb4 100644 (file)
@@ -24,6 +24,7 @@ import com.android.ims.ImsCallProfile;
 import com.android.ims.ImsConferenceState;
 import com.android.ims.ImsReasonInfo;
 import com.android.ims.ImsStreamMediaProfile;
+import com.android.ims.ImsSuppServiceNotification;
 
 /**
  * Provides the call initiation/termination, and media exchange between two IMS endpoints.
@@ -390,6 +391,15 @@ public class ImsCallSession {
                 boolean isMultiParty) {
             // no-op
         }
+
+        /**
+         * Called when the session supplementary service is received
+         *
+         * @param session the session object that carries out the IMS session
+         */
+        public void callSessionSuppServiceReceived(ImsCallSession session,
+                ImsSuppServiceNotification suppServiceInfo) {
+        }
     }
 
     private final IImsCallSession miSession;
@@ -1229,6 +1239,15 @@ public class ImsCallSession {
                 mListener.callSessionMultipartyStateChanged(ImsCallSession.this, isMultiParty);
             }
         }
+
+        @Override
+        public void callSessionSuppServiceReceived(IImsCallSession session,
+                ImsSuppServiceNotification suppServiceInfo ) {
+            if (mListener != null) {
+                mListener.callSessionSuppServiceReceived(ImsCallSession.this, suppServiceInfo);
+            }
+        }
+
     }
 
     /**