IMS: Define constants related to call progress info

- Define constants/extras related to call progress
  info during alerting stage and extras are used
  to show the appropriate toast message.

Change-Id: I2d3482695cd1bc5063c64e239126c6da826b1b29
CRs-Fixed: 2841434
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
index 63580b4..41bfacb 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
@@ -401,5 +401,17 @@
     public static final int CRS_TYPE_AUDIO = 1 << 0;
     //VIDEO if only video will be played.
     public static final int CRS_TYPE_VIDEO = 1 << 1;
-}
 
+    //Call progress info constants.
+    public static final int CALL_PROGRESS_INFO_TYPE_INVALID = -1;
+    public static final int CALL_PROGRESS_INFO_TYPE_CALL_REJ_Q850 = 0;
+    public static final int CALL_PROGRESS_INFO_TYPE_CALL_WAITING = 1;
+    public static final int CALL_PROGRESS_INFO_TYPE_CALL_FORWARDING = 2;
+    public static final int CALL_PROGRESS_INFO_TYPE_REMOTE_AVAILABLE = 3;
+    //Call progress info call rejection code
+    public static final int CALL_REJECTION_CODE_INVALID = -1;
+    //Call progress info extras
+    public static final String EXTRAS_CALL_PROGRESS_INFO_TYPE = "CallProgInfoType";
+    public static final String EXTRAS_CALL_PROGRESS_REASON_CODE = "CallProgReasonCode";
+    public static final String EXTRAS_CALL_PROGRESS_REASON_TEXT = "CallProgReasonText";
+}
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCarrierConfigs.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCarrierConfigs.java
index 447cd4a..32a2a06 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCarrierConfigs.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCarrierConfigs.java
@@ -127,4 +127,10 @@
      */
     public static final String KEY_CARRIER_VIDEO_CRBT_SUPPORTED =
             "config_enable_video_crbt";
+
+    /* Config to determine if Carrier supports showing call progress notiication during alerting.
+     * true - if call progress notification is supported else false
+     */
+    public static final String KEY_CARRIER_CALL_PROGRESS_NOTIFICATION_SUPPORTED =
+            "carrier_call_progress_notification";
 }
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java b/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java
index 66adac2..5eb7be1 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java
@@ -719,4 +719,10 @@
         return isCarrierConfigEnabled(phoneId, context,
                 QtiCarrierConfigs.KEY_CARRIER_VIDEO_CRBT_SUPPORTED);
     }
+
+    // Returns true if carrier supports call progress notification.
+    public static boolean isCallProgressNotificationSupported(int phoneId, Context context) {
+        return isCarrierConfigEnabled(phoneId, context,
+                QtiCarrierConfigs.KEY_CARRIER_CALL_PROGRESS_NOTIFICATION_SUPPORTED);
+    }
 }