OSDN Git Service

Merge "Add an API call to update the status of a pending outbound SMS message and...
authorCheuksan Wang <edwang@google.com>
Mon, 23 Jun 2014 17:42:39 +0000 (17:42 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Mon, 23 Jun 2014 17:14:09 +0000 (17:14 +0000)
1  2 
telephony/java/com/android/internal/telephony/ISms.aidl

@@@ -182,47 -119,17 +182,58 @@@ interface ISms 
              in PendingIntent sentIntent, in PendingIntent deliveryIntent);
  
      /**
 +     * Send an SMS.
 +     *
 +     * @param smsc the SMSC to send the message through, or NULL for the
 +     *  default SMSC
 +     * @param text the body of the message to send
 +     * @param sentIntent if not NULL this <code>PendingIntent</code> is
 +     *  broadcast when the message is sucessfully sent, or failed.
 +     *  The result code will be <code>Activity.RESULT_OK<code> for success,
 +     *  or one of these errors:<br>
 +     *  <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
 +     *  <code>RESULT_ERROR_RADIO_OFF</code><br>
 +     *  <code>RESULT_ERROR_NULL_PDU</code><br>
 +     *  For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
 +     *  the extra "errorCode" containing a radio technology specific value,
 +     *  generally only useful for troubleshooting.<br>
 +     *  The per-application based SMS control checks sentIntent. If sentIntent
 +     *  is NULL the caller will be checked against all unknown applications,
 +     *  which cause smaller number of SMS to be sent in checking period.
 +     * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
 +     *  broadcast when the message is delivered to the recipient.  The
 +     *  raw pdu of the status report is in the extended data ("pdu").
 +     * @param subId the subId on which the SMS has to be sent.
 +     */
 +    void sendTextUsingSubId(in long subId, String callingPkg, in String destAddr,
 +            in String scAddr, in String text, in PendingIntent sentIntent,
 +            in PendingIntent deliveryIntent);
 +
 +    /**
 +     * Inject an SMS PDU into the android platform.
 +     *
 +     * @param pdu is the byte array of pdu to be injected into android application framework
 +     * @param format is the format of SMS pdu (android.telephony.SmsMessage.FORMAT_3GPP or
 +     * android.telephony.SmsMessage.FORMAT_3GPP2)
 +     * @param receivedIntent if not NULL this <code>PendingIntent</code> is
 +     *  broadcast when the message is successfully received by the
 +     *  android application framework. This intent is broadcasted at
 +     *  the same time an SMS received from radio is acknowledged back.
 +     */
 +    void injectSmsPdu(in byte[] pdu, String format, in PendingIntent receivedIntent);
 +
 +    /**
+      * Update the status of a pending (send-by-IP) SMS message and resend by PSTN if necessary.
+      * This outbound message was handled by the carrier app. If the carrier app fails to send
+      * this message, it would be resent by PSTN.
+      *
+      * @param messageRef the reference number of the SMS message.
+      * @param success True if and only if the message was sent successfully. If its value is
+      *  false, this message should be resent via PSTN.
+      */
+     void updateSmsSendStatus(int messageRef, boolean success);
+     /**
       * Send a multi-part text based SMS.
       *
       * @param destinationAddress the address to send the message to