android sms流程

SMS发送流程

Android2.2packages/apps/Mms

1.      点击发送按钮Src/com/android/mms/ui/ComposeMessageActivity.java

  1. public void onClick(View v) {  
  2.         if ((v == mSendButton) && isPreparedForSending()) {  
  3.             confirmSendMessageIfNeeded(); //确认是否需要发送短信—-》  
  4.         }  
  5. }  

2.src/com/android/mms/ui/ComposeMessageActivity.java

  1. private void confirmSendMessageIfNeeded() {  
  2.         if (!isRecipientsEditorVisible()) {  //编辑联系人不可见时,也就是给已存在会话的联系人发送短信时  
  3.             sendMessage(true);  
  4.             return;  
  5.         }  
  6.    
  7.         boolean isMms = mWorkingMessage.requiresMms();   //是否需要以彩信形式发送  
  8.                 if (mRecipientsEditor.hasInvalidRecipient(isMms)) {//是否含有不合法的收件人  
  9.             if (mRecipientsEditor.hasValidRecipient(isMms)) {//有合法的和不合法的,弹出尝试发送对话框  
  10.                 String title =getResourcesString(R.string.has_invalid_recipient,  
  11.                         mRecipientsEditor.formatInvalidNumbers(isMms));  
  12.                 new AlertDialog.Builder(this)  
  13.                    .setIcon(android.R.drawable.ic_dialog_alert)  
  14.                     .setTitle(title)  
  15.                     .setMessage(R.string.invalid_recipient_message)  
  16.                    .setPositiveButton(R.string.try_to_send,  
  17.                             newSendIgnoreInvalidRecipientListener())  
  18.                    .setNegativeButton(R.string.no, new CancelSendingListener())  
  19.                     .show();  
  20.             } else {//如果全是不合法的联系人,提示不能发送信息  
  21.                 new AlertDialog.Builder(this)  
  22.                    .setIcon(android.R.drawable.ic_dialog_alert)  
  23.                     .setTitle(R.string.cannot_send_message)  
  24.                     .setMessage(R.string.cannot_send_message_reason)  
  25.                    .setPositiveButton(R.string.yes, new CancelSendingListener())  
  26.                     .show();  
  27.             }  
  28.         } else {//判断收件人没有问题,接着发送信息 --》  
  29.             sendMessage(true);  
  30.         }  
  31. }  

3. src/com/android/mms/ui/ComposeMessageActivity.java

  1. private void sendMessage(boolean bCheckEcmMode) {  
  2.     Log.v(TAG, "sendMessage");  
  3.         if (bCheckEcmMode) {  
  4.             // TODO: expose this in telephony layer for SDK build  
  5.             String inEcm = SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE);     //判断电话是否处于紧急拨号模式,得到的inEcm一般为空  
  6.             Log.v(TAG, "inEcm = " + inEcm);  
  7.             if (Boolean.parseBoolean(inEcm)) {  
  8.                 try {  
  9.                     startActivityForResult(  
  10.                             new Intent(TelephonyIntents.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS,null),  
  11.                             REQUEST_CODE_ECM_EXIT_DIALOG);  
  12.                     return;  
  13.                 } catch (ActivityNotFoundException e) {  
  14.                     // continue to send message  
  15.                     Log.e(TAG, "Cannot find EmergencyCallbackModeExitDialog", e);  
  16.                 }  
  17.             }  
  18.         }  
  19.    
  20.         if (!mSendingMessage) {  
  21.             // send can change the recipients. Make sure we remove the listeners firstand then add  
  22.             // them back once the recipient list has settled.  
  23.             removeRecipientsListeners();  //取消对收件人的监听  
  24.             mWorkingMessage.send();   //发送信息—-》  
  25.             mSentMessage = true;  
  26.             mSendingMessage = true;  
  27.             addRecipientsListeners(); //重新添加收件人监听  
  28.         }  
  29.         // But bail out if we are supposed to exit after the message is sent.  
  30.         if (mExitOnSent) {//如果mExitOnSent为true,信息发送完成后退出Activity  
  31.             finish();  
  32.         }  
  33.     }  

4. src/com/android/mms/data/WorkingMessage.java

  1. /** 
  2.      * Send this message over the network.  Will call back with onMessageSent() once 
  3.      * it has been dispatched to the telephonystack.  This WorkingMessage object is 
  4.      * no longer useful after this method hasbeen called. 
  5.      */  
  6.     public void send() {  
  7.         if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {  
  8.             LogTag.debug("send");  
  9.         }  
  10.    
  11.         // Get ready to write to disk.  
  12.         prepareForSave(true /* notify */);//主要做一下同步收件人和WorkingMessage,彩信时在准备其他一些东西  
  13.    
  14.         // We need the recipient list for both SMS and MMS.  
  15.         final Conversation conv = mConversation;  
  16.         String msgTxt = mText.toString();  
  17.         Log.v(TAG, "msgText = " + msgTxt);  
  18.         if (requiresMms() ||addressContainsEmailToMms(conv, msgTxt)) {  
  19.             // Make local copies of the bits we need for sending a message,  
  20.             // because we will be doing it off of the main thread, which will  
  21.             // immediately continue on to resetting some of this state.  
  22.             final Uri mmsUri = mMessageUri;  
  23.             final PduPersister persister = PduPersister.getPduPersister(mContext);  
  24.    
  25.             final SlideshowModel slideshow = mSlideshow;  
  26.             final SendReq sendReq = makeSendReq(conv,mSubject);  
  27.    
  28.             // Do the dirty work of sending the message off of the main UI thread.  
  29.             new Thread(new Runnable() {  
  30.                 public void run() {  
  31.                     // Make sure the text in slide 0 is no longer holding onto a reference to  
  32.                     // the text in the message text box.  
  33.                     slideshow.prepareForSend();  
  34.                     sendMmsWorker(conv, mmsUri,persister, slideshow, sendReq);  
  35.                 }  
  36.             }).start();  
  37.         } else {  
  38.             // Same rules apply as above.  
  39.             final String msgText = mText.toString();//取出短消息  
  40.             Log.v(TAG, "msgText = " + msgText);  
  41.             new Thread(new Runnable() {  
  42.                 public void run() {  
  43.                     preSendSmsWorker(conv, msgText);//发送信息--》  
  44.                 }  
  45.             }).start();  
  46.         }  
  47.    
  48.         // update the Recipient cache with the new to address, if it's different  
  49.         RecipientIdCache.updateNumbers(conv.getThreadId(),conv.getRecipients());  
  50.    
  51.         // Mark the message as discarded because it is "off the market"after being sent.  
  52.         mDiscarded = true;  
  53.     }  

5. src/com/android/mms/data/WorkingMessage.java

  1. private void preSendSmsWorker(Conversation conv, StringmsgText) {  
  2.         // If user tries to send the message, it's a signal the inputtedtext is what they wanted.  
  3.         UserHappinessSignals.userAcceptedImeText(mContext);  
  4.    
  5.         mStatusListener.onPreMessageSent();//重置一些信息,比如清空输入内容框、一些监听等等  
  6.    
  7.         // Make sure we are still using the correct thread ID for our  
  8.         // recipient set.  
  9.         long threadId = conv.ensureThreadId();//新建获得会话线程ID  
  10.         Log.v(TAG, "threadId = " + threadId);  
  11.         final String semiSepRecipients =conv.getRecipients().serialize();  
  12.    
  13.         // just do a regular send. We're already on a non-ui thread so noneed to fire  
  14.         // off another thread to do this work.  
  15.         sendSmsWorker(msgText, semiSepRecipients, threadId);//发送信息----》  
  16.    
  17.         // Be paranoid and clean any draft SMS up.  
  18.         deleteDraftSmsMessage(threadId);//删除草稿  
  19.     }  

 

6. src/com/android/mms/data/WorkingMessage.java

  1. private void sendSmsWorker(String msgText, String semiSepRecipients, longthreaded) {  
  2.         String[] dests = TextUtils.split(semiSepRecipients,“;”);  
  3.         Log.v(TAG, “sendSmsWorker – semiSepRecipients is “ + semiSepRecipients);  
  4.         if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {  
  5.             LogTag.debug(“sendSmsWorker sending message”);  
  6.         }  
  7.         MessageSender sender = new SmsMessageSender(mContext, dests, msgText, threaded);  
  8.         try {  
  9.             sender.sendMessage(threadId);//根据ThreadID发送信息----》  
  10.    
  11.             // Make sure this thread isn't over the limits in message count  
  12.             Recycler.getSmsRecycler().deleteOldMessagesByThreadId(mContext, threadId);  
  13.         } catch (Exception e) {  
  14.             Log.e(TAG, "Failed to send SMS message, threadId=" + threadId, e);  
  15.         }  
  16.    
  17.         mStatusListener.onMessageSent();  
  18.     }  

7. src/com/android/mms/transaction/SmsMessageSender.java

  1. public boolean sendMessage(long token) throwsMmsException {  
  2.         // In order to send the message one by one, instead of sending now, themessage will split,  
  3.         // and be put into the queue along with each destinations  
  4.         return queueMessage(token);  
  5.     }  

8. src/com/android/mms/transaction/SmsMessageSender.java

  1. private boolean queueMessage(long token) throwsMmsException {  
  2.         if ((mMessageText == null) || (mNumberOfDests == 0)) {  
  3.             // Don't try to send an empty message.  
  4.             throw new MmsException("Null message body or dest.");  
  5.         }  
  6.         Log.v("SMsMessageSender""queueMessage");  
  7.         SharedPreferences prefs =PreferenceManager.getDefaultSharedPreferences(mContext);  
  8.         boolean requestDeliveryReport =prefs.getBoolean(  
  9.                 MessagingPreferenceActivity.SMS_DELIVERY_REPORT_MODE,  
  10.                 DEFAULT_DELIVERY_REPORT_MODE);  
  11.         Log.v("SmsMessageSender""add Message to 'content://sms/queued'");  
  12.         for (int i = 0; i < mNumberOfDests; i++) {//根据收件人数目分别建立短信放入发送队列  
  13.             try {  
  14.                 Sms.addMessageToUri(mContext.getContentResolver(),  
  15.                         Uri.parse("content://sms/queued"), mDests[i],  
  16.                         mMessageText, null, mTimestamp,  
  17.                         true /* read */,  
  18.                         requestDeliveryReport,  
  19.                         mThreadId);  
  20.             } catch (SQLiteException e) {  
  21.                 SqliteWrapper.checkSQLiteException(mContext, e);  
  22.             }  
  23.         }  
  24.         // Notify the SmsReceiverService to send the message out  
  25.         mContext.sendBroadcast(new Intent(SmsReceiverService.ACTION_SEND_MESSAGE,  
  26.                 null,  
  27.                 mContext,  
  28.                 SmsReceiver.class));  //通知SmsReceiverService来发送短信,传递参数ACTION_SEND_MESSAGE  
  29.         return false;  
  30.     }  

9. src/com/android/mms/transaction/SmsReceiverService.java

  1. /** 
  2.          * Handle incoming transactionrequests. 
  3.          * The incoming requests are initiatedby the MMSC Server or by the MMS Client itself. 
  4.          */  
  5.         @Override  
  6.         public void handleMessage(Message msg) {  
  7.             int serviceId = msg.arg1;  
  8.             Intent intent = (Intent)msg.obj;  
  9.             if (intent != null) {  
  10.                 String action =intent.getAction();  
  11.    
  12.                 int error = intent.getIntExtra("errorCode"0);  
  13.    
  14.                 if (MESSAGE_SENT_ACTION.equals(intent.getAction())){  
  15.                     handleSmsSent(intent,error);  
  16.                 } else if (SMS_RECEIVED_ACTION.equals(action)) {  
  17.                     handleSmsReceived(intent,error);  
  18.                 } else if (ACTION_BOOT_COMPLETED.equals(action)) {  
  19.                     handleBootCompleted();  
  20.                 } else if (TelephonyIntents.ACTION_SERVICE_STATE_CHANGED.equals(action)){  
  21.                    handleServiceStateChanged(intent);  
  22.                 } else if (ACTION_SEND_MESSAGE.endsWith(action)) {  
  23.                     handleSendMessage();//处理发送信息  
  24.                 }  
  25.             }  
  26.             // NOTE: We MUST not call stopSelf() directly, since we need to  
  27.             // make sure the wake lock acquired by AlertReceiver is released.  
  28.             SmsReceiver.finishStartingService(SmsReceiverService.this, serviceId);  
  29.         }  
  30.     }  

10. src/com/android/mms/transaction/SmsReceiverService.java

  1. private void handleSendMessage(){  
  2.     Log.v(TAG, "handleSendMessage");  
  3.         if (!mSending) {//如果没有发送,则准备发送  
  4.             sendFirstQueuedMessage();  
  5.         }  
  6. }  

 

11. src/com/android/mms/transaction/SmsReceiverService.java

  1. public synchronized void sendFirstQueuedMessage() {  
  2.     Log.v(TAG, "sendFirstQueuedMessage");  
  3.         boolean success = true;  
  4.         // get all the queued messages from the database  
  5.         final Uri uri = Uri.parse("content://sms/queued");  
  6.         ContentResolver resolver =getContentResolver();  
  7. //查询队列中的信息,包括上次没有发送出去存放在发送队列的信息         
  8. Cursor c = SqliteWrapper.query(this, resolver, uri,  
  9.                         SEND_PROJECTION, nullnull"date ASC");   // date ASC so we send out in  
  10.                                                                    // same order the user tried  
  11.                                                                    // to send messages.  
  12.         if (c != null) {  
  13.             try {  
  14.                 if (c.moveToFirst()) {  
  15.                     String msgText =c.getString(SEND_COLUMN_BODY);  
  16.                     String address =c.getString(SEND_COLUMN_ADDRESS);  
  17.                     int threadId = c.getInt(SEND_COLUMN_THREAD_ID);  
  18.                     int status = c.getInt(SEND_COLUMN_STATUS);  
  19.                     Log.v(TAG, "address = " + address);  
  20.                     Log.v(TAG, "msgText = " + msgText);  
  21.                     Log.v(TAG, "status = " + status);  
  22.                      
  23.                     int msgId = c.getInt(SEND_COLUMN_ID);  
  24.                     Uri msgUri = ContentUris.withAppendedId(Sms.CONTENT_URI,msgId);  
  25.                     Log.v(TAG, "msgId = " + msgId);  
  26.                     SmsMessageSender sender = newSmsSingleRecipientSender(this,  
  27.                             address, msgText,threadId, status == Sms.STATUS_PENDING,  
  28.                             msgUri);  
  29.    
  30.                     if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {  
  31.                         Log.v(TAG, "sendFirstQueuedMessage " + msgUri +  
  32.                                 ", address: " + address +  
  33.                                 ", threadId: " + threadId +  
  34.                                 ", body: " + msgText);  
  35.                     }  
  36.                     try {  
  37.                         sender.sendMessage(SendingProgressTokenManager.NO_TOKEN);//进行单个信息发送  
  38.                         mSending = true;  
  39.                     } catch (MmsExceptione) {  
  40.                         Log.e(TAG, "sendFirstQueuedMessage: failed to send message" + msgUri  
  41.                                 + ", caught ", e);  
  42.                         success = false;  
  43.                     }  
  44.                 }  
  45.             } finally {  
  46.                 c.close();  
  47.             }  
  48.         }  
  49.         if (success) {  
  50.             // We successfully sent all the messages in the queue. We don't need to  
  51.             // be notified of any service changes any longer.  
  52.             unRegisterForServiceStateChanges();  
  53.         }  
  54. }  

12. src/com/android/mms/transaction/SmsSingleRecipientSender.java

  1. public boolean sendMessage(long token) throwsMmsException {  
  2.         if (mMessageText == null) {  
  3.             // Don't try to send an empty message, and destination should be just  
  4.             // one.  
  5.             throw new MmsException("Null message body or have multiple destinations.");  
  6.         }  
  7.         SmsManager smsManager = SmsManager.getDefault();  
  8.         ArrayList<String> messages = null;  
  9.         if ((MmsConfig.getEmailGateway() != null) &&  
  10.                 (Mms.isEmailAddress(mDest) || MessageUtils.isAlias(mDest))) {  
  11.             String msgText;  
  12.             msgText = mDest + "" + mMessageText;  
  13.             mDest = MmsConfig.getEmailGateway();  
  14.             messages =smsManager.divideMessage(msgText);  
  15.         } else {  
  16.         Log.v("SmsSingleRecipient""divideMessage");  
  17.            messages = smsManager.divideMessage(mMessageText);//短信通道被限制160个字节,因此内容过长将会以多条短信发送,这个动作就是将长短信拆分成合适的大小  
  18.            // remove spaces from destination number (e.g. "801 555 1212"-> "8015551212")  
  19.            mDest = mDest.replaceAll("""");  
  20.         }  
  21.         int messageCount = messages.size();  
  22.    
  23.         if (messageCount ==0) {  
  24.             // Don't try to send an empty message.  
  25.             throw new MmsException("SmsMessageSender.sendMessage: divideMessage returned " +  
  26.                     "empty messages. Original message is \"" + mMessageText + "\"");  
  27.         }  
  28.         Log.v("SmsSingleRecipientSender""move to Sms.MESSAGE_TYPE_OUTBOX");  
  29.         Log.v("SmsSingleRecipientSender""mUri = " + mUri);  
  30.         boolean moved = Sms.moveMessageToFolder(mContext, mUri, Sms.MESSAGE_TYPE_OUTBOX,0);//移动到发件箱  
  31.         if (!moved) {  
  32.             throw new MmsException("SmsMessageSender.sendMessage: couldn't move message " +  
  33.                     "to outbox: " + mUri);  
  34.         }  
  35.    
  36.         ArrayList<PendingIntent>deliveryIntents =  newArrayList<PendingIntent>(messageCount);  
  37.         ArrayList<PendingIntent>sentIntents = new ArrayList<PendingIntent>(messageCount);  
  38.         for (int i = 0; i < messageCount; i++) {  
  39.             if (mRequestDeliveryReport) {  
  40.                 // TODO: Fix: It should not be necessary to  
  41.                 // specifythe class in this intent.  Doing that  
  42.                 // unnecessarily limits customizability.  
  43.                deliveryIntents.add(PendingIntent.getBroadcast(  
  44.                         mContext, 0,  
  45.                         new Intent(  
  46.                                MessageStatusReceiver.MESSAGE_STATUS_RECEIVED_ACTION,  
  47.                                 mUri,  
  48.                                 mContext,  
  49.                                MessageStatusReceiver.class),  
  50.                         0));  
  51.             }  
  52.             Intent intent  = new Intent(SmsReceiverService.MESSAGE_SENT_ACTION,  
  53.                     mUri,  
  54.                     mContext,  
  55.                     SmsReceiver.class);//触发SmsReceiverService的MESSAGE_SENT_ACTION消息  
  56.             if (i == messageCount -1) {  
  57.                intent.putExtra(SmsReceiverService.EXTRA_MESSAGE_SENT_SEND_NEXT, true);  
  58.             }  
  59.             sentIntents.add(PendingIntent.getBroadcast(  
  60.                     mContext, 0, intent, 0));//设置回调的Intent为intent,  
  61.         }  
  62.         try {  
  63.             smsManager.sendMultipartTextMessage(mDest, mServiceCenter, messages, sentIntents, deliveryIntents);//调用Framework中的API来发送短信,会回调sentIntents来处理发送的情况  
  64.         } catch (Exception ex) {  
  65.             throw new MmsException("SmsMessageSender.sendMessage: caught " + ex +  
  66.                     " from SmsManager.sendTextMessage()");  
  67.         }  
  68.         if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {  
  69.             log("sendMessage: address=" + mDest + ", threadId=" + mThreadId +  
  70.                     ", uri=" + mUri + ", msgs.count=" + messageCount);  
  71.         }  
  72.         return false;  
  73.     }  

 

13. src/com/android/mms/transaction/SmsReceiverService.java

  1. /** 
  2.          * Handle incoming transactionrequests. 
  3.          * The incoming requests are initiatedby the MMSC Server or by the MMS Client itself. 
  4.          */  
  5.         @Override  
  6.         public void handleMessage(Message msg) {  
  7.             int serviceId = msg.arg1;  
  8.             Intent intent = (Intent)msg.obj;  
  9.             if (intent != null) {  
  10.                 String action =intent.getAction();  
  11.    
  12.                 int error = intent.getIntExtra("errorCode"0);  
  13.    
  14.                 if (MESSAGE_SENT_ACTION.equals(intent.getAction())) {  
  15.                     handleSmsSent(intent, error);  
  16.                 } else if (SMS_RECEIVED_ACTION.equals(action)) {  
  17.                     handleSmsReceived(intent,error);  
  18.                 } else if (ACTION_BOOT_COMPLETED.equals(action)) {  
  19.                     handleBootCompleted();  
  20.                 } else if (TelephonyIntents.ACTION_SERVICE_STATE_CHANGED.equals(action)){  
  21.                    handleServiceStateChanged(intent);  
  22.                 } else if (ACTION_SEND_MESSAGE.endsWith(action)) {  
  23.                     handleSendMessage();  
  24.                 }  
  25.             }  
  26.             // NOTE: We MUST not call stopSelf() directly, since we need to  
  27.             // make sure the wake lock acquired by AlertReceiver is released.  
  28.             SmsReceiver.finishStartingService(SmsReceiverService.this, serviceId);  
  29.         }  
  30.     }  

14. src/com/android/mms/transaction/SmsReceiverService.java

  1. private void handleSmsSent(Intentintent, int error) {  
  2.     Log.v(TAG, "handleSmsSent - error is " + error);  
  3.         Uri uri = intent.getData();  
  4.         Log.v(TAG, "uri = " + uri);  
  5.         mSending = false;  
  6.         boolean sendNextMsg =intent.getBooleanExtra(EXTRA_MESSAGE_SENT_SEND_NEXT, false);  
  7.    
  8.         if (mResultCode == Activity.RESULT_OK) {//发送成功的情况  
  9.         Log.v(TAG, "mResultCode == Activity.RESULT_OK");  
  10.             if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {  
  11.                 Log.v(TAG, "handleSmsSent sending uri: " + uri);  
  12.             }  
  13.             Log.v(TAG, "moveMessageToFolder intoSms.MESSAGE_TYPE_SENT");  
  14. //将短信移动到已发送  
  15.             if (!Sms.moveMessageToFolder(this, uri, Sms.MESSAGE_TYPE_SENT,error)) {  
  16.                 Log.e(TAG, "handleSmsSent: failed to move message " + uri + " to sentfolder");  
  17.             }  
  18.             if (sendNextMsg) {//如果需要,发送下一条  
  19.                 sendFirstQueuedMessage();//只是查发送队列的信息去发送  
  20.             }  
  21.    
  22.             // Update the notification for failed messages since they may be deleted.  
  23.             MessagingNotification.updateSendFailedNotification(this);  
  24.         } else if ((mResultCode == SmsManager.RESULT_ERROR_RADIO_OFF) ||  
  25.                 (mResultCode == SmsManager.RESULT_ERROR_NO_SERVICE)) {  
  26.         Log.v(TAG, "mResultCode ==SmsManager.RESULT_ERROR_RADIO_OFF");  
  27.             if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {  
  28.                 Log.v(TAG, "handleSmsSent: no service, queuing message w/ uri:" + uri);  
  29.             }  
  30.             // We got an error with no service or no radio. Register for state changesso  
  31.             // when the status of the connection/radio changes, we can try to send the  
  32.             // queued up messages.  
  33.             registerForServiceStateChanges();//来服务和信号时调用sendFirstQueuedMessage()去发送  
  34.             // We couldn't send the message, put in the queue to retry later.  
  35.             Log.v(TAG, "uri = " + uri);  
  36.             Log.v(TAG, "moveMessageToFolder intoSms.MESSAGE_TYPE_QUEUED");  
  37.             Sms.moveMessageToFolder(this, uri, Sms.MESSAGE_TYPE_QUEUED,error);  
  38.             mToastHandler.post(new Runnable() {  
  39.                 public void run() {  
  40.                     Toast.makeText(SmsReceiverService.this,getString(R.string.message_queued),  
  41.                             Toast.LENGTH_SHORT).show();  
  42.                 }  
  43.             });  
  44.         } else {  
  45.         Log.v(TAG, "mResultCode == Other exception");  
  46.             if (Log.isLoggable(LogTag.TRANSACTION, Log.VERBOSE)) {  
  47.                 Log.v(TAG, "handleSmsSent msg failed uri: " + uri);  
  48.             }  
  49.             Sms.moveMessageToFolder(this, uri, Sms.MESSAGE_TYPE_FAILED,error);  
  50.             MessagingNotification.notifySendFailed(getApplicationContext(),true);  
  51.             if (sendNextMsg) {  
  52.                 sendFirstQueuedMessage();  
  53.             }  
  54.         }  
  55.     } 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值