mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Fix long SMS send with no service failure loop.
This commit is contained in:
@@ -20,15 +20,16 @@ public class SmsDeliveryListener extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
JobManager jobManager = ApplicationDependencies.getJobManager();
|
||||
long messageId = intent.getLongExtra("message_id", -1);
|
||||
int runAttempt = intent.getIntExtra("run_attempt", 0);
|
||||
JobManager jobManager = ApplicationDependencies.getJobManager();
|
||||
long messageId = intent.getLongExtra("message_id", -1);
|
||||
int runAttempt = intent.getIntExtra("run_attempt", 0);
|
||||
boolean isMultipart = intent.getBooleanExtra("is_multipart", true);
|
||||
|
||||
switch (intent.getAction()) {
|
||||
case SENT_SMS_ACTION:
|
||||
int result = getResultCode();
|
||||
|
||||
jobManager.add(new SmsSentJob(messageId, SENT_SMS_ACTION, result, runAttempt));
|
||||
jobManager.add(new SmsSentJob(messageId, isMultipart, SENT_SMS_ACTION, result, runAttempt));
|
||||
break;
|
||||
case DELIVERED_SMS_ACTION:
|
||||
byte[] pdu = intent.getByteArrayExtra("pdu");
|
||||
@@ -59,7 +60,7 @@ public class SmsDeliveryListener extends BroadcastReceiver {
|
||||
else if (status >> 24 == 3) status = SmsDatabase.Status.STATUS_FAILED;
|
||||
}
|
||||
|
||||
jobManager.add(new SmsSentJob(messageId, DELIVERED_SMS_ACTION, status, runAttempt));
|
||||
jobManager.add(new SmsSentJob(messageId, isMultipart, DELIVERED_SMS_ACTION, status, runAttempt));
|
||||
break;
|
||||
default:
|
||||
Log.w(TAG, "Unknown action: " + intent.getAction());
|
||||
|
||||
Reference in New Issue
Block a user