IMS: Added ims on/off changes & callbacks for features enabled.
ram [Wed, 16 Jul 2014 15:29:27 +0000 (20:29 +0530)]
Change-Id: Ie2ea119086d7beaee38f39881d3987b87b7a11ea

src/java/com/android/ims/ImsConfig.java
src/java/com/android/ims/ImsManager.java

index 070e4be..5c83ba9 100644 (file)
@@ -42,20 +42,28 @@ public class ImsConfig {
         public static final int FEATURE_TYPE_UNKNOWN = -1;
 
         /**
-         * FEATURE_TYPE_VOLTE supports the features defined in 3GPP & GSMA IR.92
+         * FEATURE_TYPE_VOLTE supports features defined in 3GPP and
+         * GSMA IR.92 over LTE.
          */
-        public static final int FEATURE_TYPE_VOLTE = 0;
+        public static final int FEATURE_TYPE_VOICE_OVER_LTE = 0;
 
         /**
-         *FEATURE_TYPE_VT supports the features defined in 3GPP & GSMA IR.94
+         * FEATURE_TYPE_LVC supports features defined in 3GPP and
+         * GSMA IR.94 over LTE.
          */
-        public static final int FEATURE_TYPE_VT = 1;
+        public static final int FEATURE_TYPE_VIDEO_OVER_LTE = 1;
 
         /**
-         * FEATURE_TYPE_UT supports the UT features defined in 3GPP & GSMA IR.92,
-         * IR.94
+         * FEATURE_TYPE_VOICE_OVER_WIFI supports features defined in 3GPP and
+         * GSMA IR.92 over WiFi.
          */
-        public static final int FEATURE_TYPE_UT = 2;
+        public static final int FEATURE_TYPE_VOICE_OVER_WIFI = 2;
+
+        /**
+         * FEATURE_TYPE_VIDEO_OVER_WIFI supports features defined in 3GPP and
+         * GSMA IR.94 over WiFi.
+         */
+        public static final int FEATURE_TYPE_VIDEO_OVER_WIFI = 3;
     }
 
     /**
@@ -320,4 +328,4 @@ public class ImsConfig {
                     ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE);
         }
     }
-}
\ No newline at end of file
+}
index b711671..b3ebf2c 100644 (file)
@@ -570,6 +570,29 @@ public class ImsManager {
     }
 
     /**
+     * Used for turning on IMS.if its off already
+     */
+    public void turnOnIms() throws ImsException {
+        try {
+            mImsService.turnOnIms();
+        } catch (RemoteException e) {
+            throw new ImsException("turnOnIms() ", e, ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN);
+        }
+    }
+
+    /**
+     * Used for turning off IMS completely in order to make the device CSFB'ed.
+     * Once turned off, all calls will be over CS.
+     */
+    public void turnOffIms() throws ImsException {
+        try {
+            mImsService.turnOffIms();
+        } catch (RemoteException e) {
+            throw new ImsException("turnOffIms() ", e, ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN);
+        }
+    }
+
+    /**
      * Death recipient class for monitoring IMS service.
      */
     private class ImsServiceDeathRecipient implements IBinder.DeathRecipient {
@@ -657,5 +680,13 @@ public class ImsManager {
                 mListener.onImsConnected();
             }
         }
+
+        @Override
+        public void registrationFeatureCapabilityChanged(int serviceClass,
+                int[] enabledFeatures, int[] disabledFeatures) {
+            log("registrationFeatureCapabilityChanged :: serviceClass=" +
+                    serviceClass);
+        }
+
     }
 }