kopia lustrzana https://github.com/ryukoposting/Signal-Android
rodzic
72afb33c1b
commit
5be246ec8f
|
@ -1,6 +1,8 @@
|
||||||
package org.thoughtcrime.securesms.jobs;
|
package org.thoughtcrime.securesms.jobs;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
import android.telephony.SmsMessage;
|
import android.telephony.SmsMessage;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
@ -27,10 +29,10 @@ public class SmsReceiveJob extends ContextJob {
|
||||||
|
|
||||||
private static final String TAG = SmsReceiveJob.class.getSimpleName();
|
private static final String TAG = SmsReceiveJob.class.getSimpleName();
|
||||||
|
|
||||||
private final Object[] pdus;
|
private final @Nullable Object[] pdus;
|
||||||
private final int subscriptionId;
|
private final int subscriptionId;
|
||||||
|
|
||||||
public SmsReceiveJob(Context context, Object[] pdus, int subscriptionId) {
|
public SmsReceiveJob(@NonNull Context context, @Nullable Object[] pdus, int subscriptionId) {
|
||||||
super(context, JobParameters.newBuilder()
|
super(context, JobParameters.newBuilder()
|
||||||
.withPersistence()
|
.withPersistence()
|
||||||
.withWakeLock(true)
|
.withWakeLock(true)
|
||||||
|
@ -104,7 +106,11 @@ public class SmsReceiveJob extends ContextJob {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Optional<IncomingTextMessage> assembleMessageFragments(Object[] pdus, int subscriptionId) {
|
private Optional<IncomingTextMessage> assembleMessageFragments(@Nullable Object[] pdus, int subscriptionId) {
|
||||||
|
if (pdus == null) {
|
||||||
|
return Optional.absent();
|
||||||
|
}
|
||||||
|
|
||||||
List<IncomingTextMessage> messages = new LinkedList<>();
|
List<IncomingTextMessage> messages = new LinkedList<>();
|
||||||
|
|
||||||
for (Object pdu : pdus) {
|
for (Object pdu : pdus) {
|
||||||
|
|
Ładowanie…
Reference in New Issue