OSDN Git Service

Add UNSOL_CALL_RINGBACK_TONE to ril.
authorJohn Wang <johnwang@google.com>
Sat, 19 Sep 2009 00:17:48 +0000 (17:17 -0700)
committerJohn Wang <johnwang@google.com>
Sun, 20 Sep 2009 20:46:25 +0000 (13:46 -0700)
Some networks may not play ring back tone, RIL will send UNSOL ringback notification.

It indicates to play tone to user for receiving ALERTING message.

include/telephony/ril.h
libril/ril.cpp
libril/ril_unsol_commands.h

index e1d8bc1..471cdf2 100644 (file)
@@ -3274,6 +3274,18 @@ typedef struct {
  */
 #define RIL_UNSOL_OEM_HOOK_RAW 1028
 
+/**
+ * RIL_UNSOL_RINGBACK_TONE
+ *
+ * Indicates that nework doesn't have in-band information,  need to
+ * play out-band tone.
+ *
+ * "data" is an int *
+ * ((int *)data)[0] == 0 for stop play ringback tone.
+ * ((int *)data)[0] == 1 for start play ringback tone.
+ */
+#define RIL_UNSOL_RINGBACK_TONE 1029
+
 /***********************************************************************/
 
 
index f6f09cd..fc0a52a 100644 (file)
@@ -3024,6 +3024,7 @@ requestToString(int request) {
         case RIL_UNSOL_CDMA_OTA_PROVISION_STATUS: return "UNSOL_CDMA_OTA_PROVISION_STATUS";
         case RIL_UNSOL_CDMA_INFO_REC: return "UNSOL_CDMA_INFO_REC";
         case RIL_UNSOL_OEM_HOOK_RAW: return "UNSOL_OEM_HOOK_RAW";
+        case RIL_UNSOL_RINGBACK_TONE: return "UNSOL_RINGBACK_TONE";
         default: return "<unknown request>";
     }
 }
index ef2dcdb..2dc31e6 100644 (file)
@@ -42,4 +42,5 @@
     {RIL_UNSOL_CDMA_CALL_WAITING, responseCdmaCallWaiting, WAKE_PARTIAL},
     {RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, responseInts, WAKE_PARTIAL},
     {RIL_UNSOL_CDMA_INFO_REC, responseCdmaInformationRecords, WAKE_PARTIAL},
-    {RIL_UNSOL_OEM_HOOK_RAW, responseRaw, WAKE_PARTIAL}
+    {RIL_UNSOL_OEM_HOOK_RAW, responseRaw, WAKE_PARTIAL},
+    {RIL_UNSOL_RINGBACK_TONE, responseInts, WAKE_PARTIAL}