mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Remove CellServiceConstraint in favor of NetworkOrCellServiceConstraint.
If a job was enqueued with a CellServiceConstraint (which is currently only SMS jobs), then it'll never run until it gets service, even if you flip the "enable SMS sending over wifi" toggle. This has created bad situations in the past, where SMS jobs just get stuck on devices that never report having cell service (like VM's or wifi only devices). This fixes it by *always* using NetworkOrCellServiceConstraint, and then deciding whether a constraint is met by checking the "wifi SMS" setting at decision-time.
This commit is contained in:
@@ -380,7 +380,7 @@ public class MessageSender {
|
||||
} else if (!forceSms && isPushTextSend(context, recipient, keyExchange)) {
|
||||
sendTextPush(recipient, messageId);
|
||||
} else {
|
||||
sendSms(context, recipient, messageId);
|
||||
sendSms(recipient, messageId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,9 +411,9 @@ public class MessageSender {
|
||||
}
|
||||
}
|
||||
|
||||
private static void sendSms(Context context, Recipient recipient, long messageId) {
|
||||
private static void sendSms(Recipient recipient, long messageId) {
|
||||
JobManager jobManager = ApplicationDependencies.getJobManager();
|
||||
jobManager.add(new SmsSendJob(context, messageId, recipient));
|
||||
jobManager.add(new SmsSendJob(messageId, recipient));
|
||||
}
|
||||
|
||||
private static void sendMms(Context context, long messageId) {
|
||||
|
||||
Reference in New Issue
Block a user